Example #1
2
 public function init()
 {
     parent::init();
     $session = \Yii::$app->session;
     $flashes = $session->getAllFlashes();
     $appendCss = isset($this->options['class']) ? ' ' . $this->options['class'] : '';
     foreach ($flashes as $type => $data) {
         //TOAST
         if (strpos($type, 'toast') !== false) {
             if (isset($this->toastTypes[$type])) {
                 $data = (array) $data;
                 foreach ($data as $i => $message) {
                     /* initialize css class for each alert box */
                     $tipo = $this->toastTypes[$type];
                     Toast::widget(['tipo' => $tipo, 'mensaje' => $message]);
                 }
                 $session->removeFlash($type);
             }
         } else {
             if (isset($this->alertTypes[$type])) {
                 $data = (array) $data;
                 foreach ($data as $i => $message) {
                     //echo '<pre>';print_r($i);die();
                     /* initialize css class for each alert box */
                     $this->options['class'] = $this->alertTypes[$type] . $appendCss;
                     /* assign unique id to each alert box */
                     $this->options['id'] = $this->getId() . '-' . $type . '-' . $i;
                     echo \yii\bootstrap\Alert::widget(['body' => $message, 'closeButton' => $this->closeButton, 'options' => $this->options]);
                 }
                 $session->removeFlash($type);
             }
         }
     }
 }
Example #2
2
 function User_tests()
 {
     parent::Toast(__FILE__);
     // Load any models, libraries etc. you need here
     $this->load->model('user_model');
     $this->config->config['unit_tests_running'] = true;
 }
Example #3
0
 function Sms_tests()
 {
     parent::Toast(__FILE__);
     // Load any models, libraries etc. you need here
     $this->load->model('user_model');
     $this->load->model('sms_model');
 }
 function __construct()
 {
     parent::__construct(__FILE__);
     $this->_ci =& get_instance();
     $this->_ci->load->model('users/user_model');
     $this->_ci->load->model('users/role_model');
     $this->_ci->load->model('users/capability_model');
 }
 function __construct()
 {
     parent::__construct(__FILE__);
     // Remember this
     $this->load->model('category');
     $this->m_category_id = NULL;
     $this->m_form_data = array('name' => 'TEST_name', 'category_id' => NULL);
 }
 function __construct()
 {
     parent::__construct(__FILE__);
     // Remember this
     $this->load->model('user');
     $this->load->model('group');
     $this->load->model('usersgroup');
     $this->load->library('sangar_auth');
     $this->load->config('sangar_auth');
     $this->m_email_user = '******';
     $this->m_password = '******';
     $this->m_data = array('username' => 'UsernameTest', 'email' => $this->m_email_user, 'first_name' => 'First Name Test', 'last_name' => 'Last Name Test', 'password' => User::new_password($this->m_password));
 }
 function __construct()
 {
     parent::__construct(__FILE__);
     // Remember this
     //creamos una categoria de test
     $this->load->model('category');
     $parent_id = NULL;
     $cat_attributes = array('name' => 'TEST_name', 'category_id' => $parent_id);
     Category::create($cat_attributes);
     $this->m_category = Category::find_by_id(Category::last()->id);
     $this->load->model('product');
     //buscamos cuantos productos hay de dicha categoria
     $this->m_category_products_count = Product::count_by_category_id($this->m_category->id);
 }
 function __construct()
 {
     parent::__construct(__FILE__);
     $this->load->model("user_states_model");
 }
 public function __construct()
 {
     parent::Toast(__FILE__);
 }
Example #10
0
 function Basic_ui_tests()
 {
     parent::Toast(__FILE__);
     // Load any models, libraries etc. you need here
     $this->config->config['unit_tests_running'] = true;
 }
Example #11
0
 function __construct()
 {
     parent::__construct(__FILE__);
     $this->load->model('fisico/maestroproducto', 'MaestroProducto');
 }
 public function __construct()
 {
     parent::Toast(__FILE__);
     //        $this->load->library("date");
 }
 function __construct()
 {
     parent::__construct(__FILE__);
     $this->load->library('ls_schedules');
 }
Example #14
0
 function __construct()
 {
     parent::__construct(__FILE__);
     $this->load->model('usuario/usuario', 'Usuario');
 }
 function __construct()
 {
     parent::__construct(__FILE__);
     $this->load->model("messages_model");
 }
Example #16
0
 function __construct()
 {
     parent::__construct(__FILE__);
     $this->load->model('administracion/minventario', 'Inventario');
 }
 function __construct()
 {
     parent::__construct(__FILE__);
 }
 function __construct()
 {
     parent::__construct(__FILE__);
     $this->load->model('user_recommendation_model');
 }
Example #19
0
 function My_test_class()
 {
     parent::Toast(__FILE__);
 }
 function __construct()
 {
     parent::__construct(__FILE__);
     $this->load->library('ls_user_recommendation');
 }
Example #21
0
 function __construct()
 {
     parent::__construct(__FILE__);
     // Load any models, libraries etc. you need here
 }
Example #22
0
 function __construct()
 {
     parent::__construct(__FILE__);
     // Load any models, libraries etc. you need here
     $this->load->helper('parsing');
 }
Example #23
0
 function __construct()
 {
     parent::__construct(__FILE__);
     $this->load->library('ls_survey');
 }
Example #24
0
 function __construct()
 {
     parent::__construct(__FILE__);
     $this->load->model('reserva/Sitio', 'Sitio');
 }
Example #25
0
 function Example_tests()
 {
     parent::Toast(__FILE__);
     // Load any models, libraries etc. you need here
 }