Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: AUREO SOUTO
Added: Dec 18, 2018 12:59 PM
Views: 11
Tags: no tags
  1.   public function beforeAction($action)
  2.  {
  3.         $app = Yii::$app;
  4.          $actionName = Yii::$app->controller->action->id;
  5.    
  6.     switch ($actionName){
  7.         case 'index':
  8.              $app->view->title = Yii::t('app', 'Tipo de Endereço');
  9.          break;
  10.       case 'create':
  11.              $app->view->title = Yii::t('app', 'Cadastrar Tipo de Endereço');
  12.          break;
  13.       case 'update':
  14.              $app->view->title = Yii::t('app', 'Atualizar Tipo de Endereço');
  15.          break;
  16.        
  17.         default:
  18.             break;
  19.     }
  20.    
  21.       return parent::beforeAction($action);
  22.  }