public function isBackend() { $url = trim($this->removeLangFromUrl(Yii::app()->getRequest()->getUrl()), '/'); return strpos($url, 'backend') === 0; }