当前位置: 首页>>代码示例>>PHP>>正文


PHP View::setLayout方法代码示例

本文整理汇总了PHP中View::setLayout方法的典型用法代码示例。如果您正苦于以下问题:PHP View::setLayout方法的具体用法?PHP View::setLayout怎么用?PHP View::setLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在View的用法示例。


在下文中一共展示了View::setLayout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testRenderLayout

 public function testRenderLayout()
 {
     $this->view->setLayout('layout');
     $output = $this->view->render('page', true);
     $this->assertContains('Page text', $output);
     $this->assertContains('Layout start', $output);
     $this->assertContains('Layout end', $output);
 }
开发者ID:starweb,项目名称:starlit-app,代码行数:8,代码来源:ViewTest.php

示例2: errorAction

 /**
  * This action will be called by the Request object when an exception has
  * been encountered. 
  * 
  * @return Response
  */
 public function errorAction($request)
 {
     $response = $request->getResponse();
     $viewScript = DEBUG ? 'development' : 'production';
     // get the Exception from the Response
     $exception = $response->getException();
     switch ($exception->getCode()) {
         case Response::NOT_FOUND:
             // 404 error - controller or action not found
             $viewScript = 'pagenotfound';
             break;
         case Response::NOT_ACCEPTABLE:
             // 406 error - content type missing or invalid
             break;
         default:
             // other error code
             break;
     }
     if ('html' === $request->getContentType()) {
         $view = new View();
         $view->setScript($viewScript);
         $view->setLayout('error');
         $response->setView($view);
     }
     return $response;
 }
开发者ID:sayi21cn,项目名称:apify-library,代码行数:32,代码来源:ErrorController.php

示例3: indexAction

 /**
  * indexAction
  *
  * Index action of main controller forum module
  *
  * @return null
  */
 public function indexAction()
 {
     // assign data into view
     \View::assign(array('title' => \View::$language->forum_main_title, 'h1' => \View::$language->forum_main_title, 'forumsTree' => helpers\ForumsTreeHelper::getTree()));
     // set output layout
     \View::setLayout('forum-main.phtml');
 }
开发者ID:nsedenkov,项目名称:phpsu,代码行数:14,代码来源:mainController.php

示例4: save

 public function save()
 {
     $obj = new asistenciaalumno();
     if ($_POST['identificador_editar'] == true) {
         $p = $obj->update($_POST);
         if ($p[0]) {
             die("<script> window.location='index.php?controller=asistenciaalumno'; </script>");
         } else {
             $data = array();
             $view = new View();
             $data['msg'] = $p[1];
             $data['url'] = 'index.php?controller=asistenciaalumno';
             $view->setData($data);
             $view->setTemplate('../view/_Error_App.php');
             $view->setLayout('../template/Layout.php');
             $view->render();
         }
     } else {
         $p = $obj->insert($_POST);
         if ($p[0]) {
             header('Location:index.php?controller=asistenciaalumno');
         } else {
             $data = array();
             $view = new View();
             $data['msg'] = $p[1];
             $data['url'] = 'index.php?controller=asistenciaalumno';
             $view->setData($data);
             $view->setTemplate('../view/_Error_App.php');
             $view->setLayout('../template/Layout.php');
             $view->render();
         }
     }
 }
开发者ID:ewo1991,项目名称:sisacreditacion,代码行数:33,代码来源:asistenciaalumnoController.php

示例5: config

 public function config()
 {
     $view = new View();
     $view->setTemplate('../view/_PanelConfig.php');
     $view->setLayout('../template/Layout.php');
     $view->render();
 }
开发者ID:AnthonyWainer,项目名称:sisacreditacion,代码行数:7,代码来源:BaseDatosController.php

示例6: index

 public function index()
 {
     //        if (!isset($_GET['p'])) {
     //            $_GET['p'] = 1;
     //        }
     //        if (!isset($_GET['q'])) {
     //            $_GET['q'] = "";
     //        }
     //        if (!isset($_GET['criterio'])) {
     //            $_GET['criterio'] = "detalle_asignacion_tutoria.CodigoSemestre";
     //        }
     //         $obj = new asignaciontutoria();
     //        $data = array();
     //        $data['data'] = $obj->index($_GET['q'], $_GET['p'], $_GET['criterio']);
     //        $data['query'] = $_GET['q'];
     //        $data['pag'] = $this->Pagination(array('rows' => $data['data']['rowspag'], 'url' => 'index.php?controller=alumno&action=index', 'query' => $_GET['q']));
     //        $cols = array("CODIGO", "Docente");
     //         $opt = array("" => "------","CodigoSemestre" => "Semestre");
     //
     //         $data['facultades'] = $this->Select(array('id' => 'CodigoFacultad', 'name' => 'CodigoFacultad', 'table' => 'facultades', 'code' => $obj->CodigoFacultad));
     //         $data['semestreacademico'] = $this->SelectActual(array('id' => 'CodigoSemestre', 'name' => 'CodigoSemestre', 'table' => 'semestreacademico', 'code' => $obj->CodigoSemestre));
     $data['contenido'] = $this->grilla_informativo();
     //        $data['grilla'] = $this->grilla("asignaciontutoria", $cols, $data['data']['rows'], $data['pag'], false, false);
     $view = new View();
     $view->setData($data);
     $view->setTemplate('../view/contenido/_Index.php');
     $view->setLayout('../template/LayoutInformativo.php');
     $view->render();
 }
开发者ID:AnthonyWainer,项目名称:sisacreditacion,代码行数:29,代码来源:contenidoController.php

示例7: index

 public function index()
 {
     if (!isset($_GET['p'])) {
         $_GET['p'] = 1;
     }
     if (!isset($_GET['q'])) {
         $_GET['q'] = "";
     }
     if (!isset($_GET['criterio'])) {
         $_GET['criterio'] = "descripcion";
     }
     $obj = new plancursos();
     $data = array();
     $data['data'] = $obj->index($_GET['q'], $_GET['p'], $_GET['criterio']);
     //SI EXISTE CRITERIO QUE BUSQUE
     $data['query'] = $_GET['q'];
     $data['pag'] = $this->Pagination(array('rows' => $data['data']['rowspag'], 'url' => 'index.php?controller=plancursos&action=index', 'query' => $_GET['q']));
     $cols = array("CODIGO", "Curso", "HP", "HT", "ESCUELA", "FACULTAD");
     //CABECERA DE LOS CAMPOS DE GRILLA
     $opt = array("idplan" => "CODIGO PLAN");
     //BUSQUEDA DE CAMPOS
     $data['plancurricular'] = $this->Select(array('id' => 'CodigoPlan', 'name' => 'CodigoPlan', 'table' => 'v_plan', 'code' => $obj->CodigoPlan));
     $data['grilla'] = $this->grilla("plancursos", $cols, $data['data']['rows'], $opt, $data['pag'], true, true);
     $view = new View();
     $view->setData($data);
     $view->setTemplate('../view/plancursos/_Index.php');
     $view->setLayout('../template/Layout.php');
     $view->render();
 }
开发者ID:AnthonyWainer,项目名称:sisacreditacion,代码行数:29,代码来源:plancursosController.php

示例8: index

 public function index()
 {
     if (!isset($_GET['p'])) {
         $_GET['p'] = 1;
     }
     if (!isset($_GET['q'])) {
         $_GET['q'] = "";
     }
     if (!isset($_GET['criterio'])) {
         $_GET['criterio'] = "evento.tema";
     }
     $obj = new eventoT();
     $data = array();
     $semestre_ultimo = $this->mostrar_semestre_ultimo();
     if ($_SESSION['cargo'] == 'Presidente' && $_SESSION['comicion'] == 'COMISION ESPECIAL DE TUTORIA') {
         $presidente = true;
     }
     $data['data'] = $obj->index($_GET['q'], $_GET['p'], $_GET['criterio'], $semestre_ultimo, $_SESSION['idusuario']);
     $data['query'] = $_GET['q'];
     $cols = array("CODIGO", "Tema", "Tipo Evento", "Fecha", "Hora");
     $opt = array("evento.Tema" => "Tema", "evento.fecha" => "Fecha ", "evento.hora" => "Hora");
     $data['grilla'] = $this->grilla("eventoT", $cols, $data['data']['rows'], $opt, $data['pag'], FALSE, FALSE, false, false, false, false, $presidente);
     $view = new View();
     $view->setData($data);
     $view->setTemplate('../view/eventoT/_Index.php');
     $view->setLayout('../template/Layout3.php');
     $view->render();
 }
开发者ID:AnthonyWainer,项目名称:sisacreditacion,代码行数:28,代码来源:eventoTController.php

示例9: create

 public function create()
 {
     $b = $_POST['a'];
     $data = array();
     $view = new View();
     //$data['comision'] = $this->Select(array('id' => 'idcomision', 'name' => 'idcomision', 'table' => 'comision_cca', 'code' => $obj->idcomision));
     $data['docente'] = $this->Select(array('id' => 'iddocente', 'name' => 'iddocente', 'table' => 'docente_cca', 'code' => $obj->iddocente));
     $view->setData($data);
     if (isset($b)) {
         $view->setTemplate('../view/asignatura_cca/_Form.php');
         $view->setLayout('../template/List.php');
         return $view->render();
     } else {
         $view->setTemplate('../view/asignatura_cca/_Form.php');
         $view->setLayout('../template/Layout.php');
         $view->render();
     }
 }
开发者ID:AnthonyWainer,项目名称:sisacreditacion,代码行数:18,代码来源:cambiar_claveController.php

示例10: index

 public function index()
 {
     $data['semestreacademico'] = $this->cinco_ultimos_semestres(array('id' => 'CodigoSemestre', 'name' => 'CodigoSemestre', 'table' => 'semestreacademico', 'code' => $obj->CodigoSemestre));
     $view = new View();
     $view->setData($data);
     $view->setTemplate('../view/misasistenciasAlumno/_Index.php');
     $view->setLayout('../template/Layout.php');
     $view->render();
 }
开发者ID:ewo1991,项目名称:sisacreditacion,代码行数:9,代码来源:misasistenciasAlumnoController.php

示例11: index

 public function index()
 {
     $data = array();
     $data['semestreacademico'] = $this->Select1(array('id' => 'semestreacademico', 'name' => 'semestreacademico', 'filtro' => $_SESSION['idusuario']));
     $view = new View();
     $view->setData($data);
     $view->setTemplate('../view/alumnoproyecto/_Index.php');
     $view->setLayout('../template/Layout.php');
     $view->render();
 }
开发者ID:ewo1991,项目名称:sisacreditacion,代码行数:10,代码来源:alumnoproyectosController.php

示例12: create

 public function create()
 {
     $data = array();
     $view = new View();
     $data['tipo_bibliografia'] = $this->Select(array('id' => 'idtipo_bibliografia', 'name' => 'idtipo_bibliografia', 'table' => 'tipo_bibliografia', 'code' => $obj->idtipo_bibliografia));
     $view->setData($data);
     $view->setTemplate('../view/bibliografia/_Form.php');
     $view->setLayout('../template/Layout.php');
     $view->render();
 }
开发者ID:AnthonyWainer,项目名称:sisacreditacion,代码行数:10,代码来源:bibliografiaController.php

示例13: index

 public function index()
 {
     $data = array();
     $data['sucursal'] = $this->Select(array('id' => 'idsucursal', 'name' => 'idsucursal', 'table' => 'sucursal'));
     $view = new View();
     $view->setData($data);
     $view->setTemplate('../view/_seleccion.php');
     $view->setLayout('../template/Layout.php');
     $view->render();
 }
开发者ID:ewo1991,项目名称:sisacreditacion,代码行数:10,代码来源:seleccionController.php

示例14: execute

 public function execute()
 {
     if (Request::getModule() == 'user' and Request::getAction() == 'login' || strtolower(Request::getAction()) == 'loginsubmit') {
     } else {
         if ($_SESSION['user_id'] == '') {
             Zee::redirect(Zee::url("user", "login"));
         }
     }
     View::setLayout('default.tpl.php');
 }
开发者ID:happyxlq,项目名称:pd,代码行数:10,代码来源:PreFilter.class.php

示例15: Index

 public function Index()
 {
     $data = array();
     $view = new View();
     $data['perfiles'] = $this->Select(array('id' => 'idperfil', 'name' => 'idperfil', 'table' => 'perfil'));
     $view->setData($data);
     $view->setTemplate('../view/Permisos/_Permisos.php');
     $view->setLayout('../template/Layout.php');
     $view->render();
 }
开发者ID:ewo1991,项目名称:sisacreditacion,代码行数:10,代码来源:PermisosController.php


注:本文中的View::setLayout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。