• File: DevelopmentEnvironment.php
  • Full Path: /var/www/crm_set/application/services/messages/DevelopmentEnvironment.php
  • Date Modified: 09/21/2026 4:20 AM
  • File size: 976 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

namespace app\services\messages;

defined('BASEPATH') or exit('No direct script access allowed');

use app\services\messages\AbstractMessage;

class DevelopmentEnvironment extends AbstractMessage
{
    protected $alertClass = 'warning';

    public function isVisible()
    {
        return ENVIRONMENT != 'production' && is_admin();
    }

    public function getMessage()
    {
        $html = '';
        $html .= '<h4>Environment set to ' . ENVIRONMENT . '!</h4><p></p>Don\'t forget to set back to <b>production</b> in the main <b>index.php</b> file after finishing your tests or development.</p>';
        $html .= '<p></p>Please be aware that in ' . ENVIRONMENT . ' mode <b>you may see some errors and deprecation warnings</b>, for this reason, it\'s always recommended to set the environment to "<b>production</b>" if you are not actually developing some features/modules or trying to test some code.</p>';

        return $html;
    }
}