Esempio n. 1
0
 protected function configureEventHandlers()
 {
     Event::on(Model::className(), Model::EVENT_INIT, function ($event) {
         /* @var $model Model */
         $model = $event->sender;
         $model->instance = new $model->standardModel->className();
     });
     $this->on(self::EVENT_RUN, function () {
         if (!$this->_models) {
             throw new ImportException('No models for import.');
         }
     });
 }
Esempio n. 2
0
 public function load()
 {
     $this->replaceValues();
     parent::load();
 }