Advertisement
christiansalazarh

yii under construction

Aug 9th, 2013
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.71 KB | None | 0 0
  1. <?php
  2. class Controller extends CController
  3. {
  4.     public $layout='//layouts/column1';
  5.     public $menu=array();
  6.     public $breadcrumbs=array();
  7.     // cuida que filters no este en uso por otros sistemas
  8.     // por ejemplo si usas cruge o si tu usas otros mecanismo de autenticacion
  9.     // que usen a filters() entonces a mano agregas el filtro en esas controladoras
  10.     // quitando previamente a este codigo de filters()
  11.     public function filters(){
  12.         return array('Underconstruction');
  13.     }
  14.     public function filterUnderconstruction($chain){
  15.         if($this->getFlagUnderconstruction()){
  16.         $this->renderText("estamos en construccion");
  17.         }else
  18.             $chain->run();
  19.     }
  20.     public function getFlagUnderconstruction(){
  21.         return true;
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement