/** * Constructor for Login component * * @param type $config */ public function __construct($config = array(), $m = null) { if ($m === null) { $m = Yii::$app->getModule('user'); } if ($m->userTypes[$m->getUserType()]['models']) { $config = Module::mergeDefault($config, $m->userTypes[$m->getUserType()]['models']); } if (is_array($config)) { $this->models = array_replace_recursive($this->models, $config); } }
/** * @param array $behaviors * * @return array * @throws InvalidConfigException */ protected function mergeBehaviors($behaviors = []) { return Module::mergeDefault($this->_module->getControllerBehaviors($this->id), $behaviors); }