您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace common\components ;
  3. class MyView extends \yii\web\View {
  4. var $title ;
  5. var $page_title ;
  6. public function setTitle($title, $page_title = '') {
  7. $this->title = $title ;
  8. if(strlen($page_title))
  9. $this->page_title = $page_title ;
  10. else
  11. $this->page_title = $title ;
  12. }
  13. public function getTitle() {
  14. return $this->title ;
  15. }
  16. public function setPageTitle($page_title) {
  17. $this->page_title = $page_title ;
  18. }
  19. public function getPageTitle() {
  20. return $this->page_title ;
  21. }
  22. public function getControllerAction() {
  23. return Yii::$app->controller->id.'/'.Yii::$app->controller->action->id ;
  24. }
  25. }