/** * Подключение события * @param CComponent $owner - 'хозяин' события * @return void */ public function attach($owner) { $this->lm = $owner->getUrlManager(); if (is_array($this->lm->languages) && count($this->lm->languages) > 1) { $owner->attachEventHandler('onBeginRequest', [$this, 'handleLanguageBehavior']); } }