yupe\components\urlManager\LanguageBehavior::attach PHP Method

attach() public method

public attach ( CWebApplication $owner )
$owner CWebApplication
    public function attach($owner)
    {
        $this->lm = $owner->getUrlManager();
        if (count($this->lm->getAvailableLanguages()) > 1) {
            $owner->attachEventHandler('onBeginRequest', [$this, 'handleLanguageBehavior']);
        }
    }