You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 6 години
преди 6 години
преди 6 години
преди 6 години
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. }