Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Controller extends CController
- {
- public $layout='//layouts/column1';
- public $menu=array();
- public $breadcrumbs=array();
- // cuida que filters no este en uso por otros sistemas
- // por ejemplo si usas cruge o si tu usas otros mecanismo de autenticacion
- // que usen a filters() entonces a mano agregas el filtro en esas controladoras
- // quitando previamente a este codigo de filters()
- public function filters(){
- return array('Underconstruction');
- }
- public function filterUnderconstruction($chain){
- if($this->getFlagUnderconstruction()){
- $this->renderText("estamos en construccion");
- }else
- $chain->run();
- }
- public function getFlagUnderconstruction(){
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement