public function init() { parent::init(); $this->addOverrideViewPath(); $this->setLayoutPath('@vendor/nullref/yii2-admin/src/views/layouts'); if (($builder = $this->get('menuBuilder', false)) !== null && !$builder instanceof IMenuBuilder) { throw new InvalidConfigException('Menu builder must implement IMenuBuilder interface'); } //@TODO add checking $globalWidgets }
public function init() { parent::init(); $config = $this->getComponents(); if (isset($config['productManager'])) { $config = $config['productManager']; } else { $config = []; } $config = EntityManager::getConfig('nullref\\product\\models\\', 'Product', $config); $this->setComponents(['productManager' => $config]); }