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


PHP View::display方法代码示例

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


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

示例1: addedAction

 protected function addedAction($title, $content)
 {
     ArticlesModel::add($title, $content);
     $view = new View();
     $view->item = $single_article;
     $view->display('NewAddedArticle.php');
 }
开发者ID:GonikDaniel,项目名称:php_study_project,代码行数:7,代码来源:ArticlesController.php

示例2: actionShowLesson

 public function actionShowLesson()
 {
     $auth = Auth::checkAuth();
     $view = new View();
     $view->auth = $auth;
     if (!isset($_GET['id'])) {
         header("Location: /learns/");
     }
     if ($auth) {
         $user = Auth::getUser();
         $id = $_GET['id'];
         $lesson = Lessons::getLesson($id);
         $course = Courses::getCourse($lesson->course_id);
         $lesson_prew = Lessons::getLessonByNumber($lesson->lesson_number - 1, $lesson->course_id);
         $lesson_next = Lessons::getLessonByNumber($lesson->lesson_number + 1, $lesson->course_id);
         $view->user_login = $user->user_login;
         $view->user_group = $user->user_group;
         $view->lesson = $lesson;
         $view->course = $course;
         $view->lesson_prew = $lesson_prew;
         $view->lesson_next = $lesson_next;
         $view->display('header.php');
         $view->display('lessons/lesson_view.php');
         $view->display('footer.php');
     } else {
         header("Location: /learns/");
     }
 }
开发者ID:AK-VoronM,项目名称:learns,代码行数:28,代码来源:LessonsController.php

示例3: actionShow

 public function actionShow()
 {
     $id = $_GET['id'];
     $auth = Auth::checkAuth();
     if ($auth) {
         $user = Users::findOneByPK($auth);
         $user->getProfile();
     }
     $courses = Courses::findAllByColumn('parent_id', $id);
     $view = new View();
     $view->user = $user;
     $view->courses = $courses;
     //  $view->user_login = $user->user_login;
     // $view->user_group = $user->user_group;
     $parent_course = Courses::findOneByPK($id);
     $crumbs = Breadcrumbs::getCrumbs($parent_course);
     $view->crumbs = $crumbs;
     $view->page_title = $parent_course->name;
     $view->display('header.php');
     if (isset($id)) {
         $view->display('courses/child-list.php');
     } else {
         $view->display('courses/list.php');
     }
     $view->display('footer.php');
 }
开发者ID:AK-VoronM,项目名称:edu-znatok,代码行数:26,代码来源:CoursesController.php

示例4: display

 /**
  * 渲染模板
  * @param string $tpl 模板路径,如果为空则用类名作为模板名
  */
 protected function display($tpl = '', $data = [])
 {
     if ($tpl == '') {
         $tpl = $this->_widgetName;
     }
     $tpl = '../' . $tpl;
     $this->_view->display($tpl, $data);
 }
开发者ID:shampeak,项目名称:ap.so,代码行数:12,代码来源:Widget.php

示例5: actionAdd

 public function actionAdd()
 {
     $courses = Courses::findAll();
     $view = new View();
     $view->courses = $courses;
     $view->display('admin/header.php');
     $view->display('admin/courses/add.php');
     $view->display('admin/footer.php');
 }
开发者ID:AK-VoronM,项目名称:edu-znatok,代码行数:9,代码来源:CoursesController.php

示例6: actionShow

 public function actionShow()
 {
     $view = new View();
     $lessons = Lessons::findAll();
     $view->lessons = $lessons;
     $view->display('admin/header.php');
     $view->display('admin/lessons/list.php');
     $view->display('admin/footer.php');
 }
开发者ID:AK-VoronM,项目名称:edu-znatok,代码行数:9,代码来源:IndexController.php

示例7: actionRegister

 public function actionRegister()
 {
     $auth = Auth::checkAuth();
     if (!$auth) {
         $view = new View();
         $view->display('header.php');
         $view->display('auth/register.php');
         $view->display('footer.php');
     } else {
         header("Location: " . BASE_PATH . 'users/');
     }
 }
开发者ID:AK-VoronM,项目名称:edu-znatok,代码行数:12,代码来源:AuthController.php

示例8: actionEdit

 public function actionEdit()
 {
     $auth = Auth::checkAuth();
     if (!$auth) {
         header("Location: " . BASE_PATH . 'auth/');
     }
     $user = Users::findOneByPK($auth);
     $user->getProfile();
     $view = new View();
     $view->user = $user;
     $view->display('header.php');
     $view->display('users/edit_profile.php');
     $view->display('footer.php');
 }
开发者ID:AK-VoronM,项目名称:edu-znatok,代码行数:14,代码来源:UsersController.php

示例9: actionPanel

 public function actionPanel()
 {
     $auth = Auth::checkAuth();
     $view = new View();
     $view->auth = $auth;
     if ($auth) {
         $user = Auth::getUser();
         $view->display('header.php');
         $view->display('admin/main.php');
         $view->display('footer.php');
         $view->admin = $admin;
     } else {
         header("Location: /learns/");
     }
 }
开发者ID:AK-VoronM,项目名称:learns,代码行数:15,代码来源:AdminController.php

示例10: actionJSTasks

 public function actionJSTasks()
 {
     $task_list = Index::getTaskList();
     $view = new View();
     if (isset($_GET['task'])) {
         $task = 'jstasks/' . $_GET['task'] . '.php';
     } else {
         $task = 'jstasks/tasklist.php';
     }
     $view->date = $date_start;
     $view->task_list = $task_list;
     $view->display('header.php');
     $view->display($task);
     $view->display('footer.php');
 }
开发者ID:AK-VoronM,项目名称:learns,代码行数:15,代码来源:IndexController.php

示例11: actionLesson

 public function actionLesson()
 {
     $lesson_id = $_GET['lesson_id'];
     $view = new View();
     //  $view->user_login = $user->user_login;
     // $view->user_group = $user->user_group;
     if (isset($lesson_id)) {
         $view->display('header.php');
         $view->display('lessons/lesson.php');
         $view->display('footer.php');
     } else {
         header("HTTP/1.1 404 Not Found");
         $view->display('errors/404.php');
     }
 }
开发者ID:AK-VoronM,项目名称:edu-znatok,代码行数:15,代码来源:LessonsController.php

示例12: messageAction

 /**
  * Messages Example
  * @return null
  */
 public function messageAction()
 {
     $View = new View('examples/message');
     $View->assign('_title_', _('Message Examples'));
     $View->assign('_message_', "Ejemplo de como abrir un mensaje desde el controlador");
     $View->display();
 }
开发者ID:richistron,项目名称:TianguisCabal,代码行数:11,代码来源:ExamplesController.php

示例13: display

 public function display()
 {
     $model = $this->getModel();
     $this->itemsTable = $model->getTable();
     //$this->_layout= 'bs3';
     parent::display();
 }
开发者ID:kosir,项目名称:wp-pipes,代码行数:7,代码来源:view.php

示例14: action_generator

 public function action_generator()
 {
     $series = Series::get_all();
     $view = new View();
     $view->series = $series;
     $view->display('cards/cards_generator.php');
 }
开发者ID:ras263,项目名称:lc,代码行数:7,代码来源:Cardscontroller.php

示例15: actionAll

 public function actionAll()
 {
     $items = News::getAll();
     $view = new View();
     $view->items = $items;
     $view->display('view.php');
 }
开发者ID:serjnobelev,项目名称:web,代码行数:7,代码来源:NewsController.php


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