|
- <?php
-
-
-
- namespace common\components ;
-
- class MyView extends \yii\web\View
- {
-
- var $title ;
- var $page_title ;
-
- public function setTitle($title, $page_title = '')
- {
- $this->title = $title ;
- if(strlen($page_title))
- $this->page_title = $page_title ;
- else
- $this->page_title = $title ;
- }
-
- public function getTitle()
- {
- return $this->title ;
- }
-
- public function setPageTitle($page_title)
- {
- $this->page_title = $page_title ;
- }
-
- public function getPageTitle()
- {
- return $this->page_title ;
- }
-
- public function getControllerAction()
- {
- return Yii::$app->controller->id.'/'.Yii::$app->controller->action->id ;
- }
-
- }
|