public function init() { parent::init(); $this->manager = Yii::$app->authManager; if ($this->user_id === null) { throw new InvalidConfigException('user_id must be set'); } $this->items = array_keys($this->manager->getItemsByUser($this->user_id)); }