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.'); } }); }
public function load() { $this->replaceValues(); parent::load(); }