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


PHP view::forge方法代码示例

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


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

示例1: action_index

 public function action_index()
 {
     //$test = new Model_Studentmodel();
     //$students = $test->get_results();
     //$students = Model_Studentmodel::get_results();
     var_dump(1232142142);
     die;
     $students = Model_Teacher::find("all", array("where" => array("id" => 1)));
     // INSERT
     $t = new Model_Teacher();
     $t->name = "Model teacher";
     $t->dob = 25121991;
     $t->class = 124;
     $t->save();
     //
     //        SELECT
     $t = Model_Teacher::find(3);
     $t->name = "teacher";
     // UPDATE
     $t->save();
     //var_dump($students); die;
     //echo'<pre>';
     //var_dump($students);
     //die();
     $viewstudent = view::forge('students/studentView');
     //$edit = view::forge('students/studentView');
     $viewstudent->set('students', $students);
     //var_dump($students);die();
     //$this->studentView->edit=$edit;
     return $viewstudent;
 }
开发者ID:ThanhThan1992,项目名称:fuel_php_demo,代码行数:31,代码来源:student.php

示例2: set_theme

 protected function set_theme()
 {
     View::bind_global('before', $false);
     View::bind_global('navigation', $false);
     View::bind_global('after_navigation', $false);
     View::bind_global('sidebar', $false);
     View::bind_global('pageheader', $false);
     //echo "<pre>";var_dump(Uri::current()); exit;
     //$theme = Utils_Themer::get_theme(Uri::current());
     $theme = Utils_Themer::get_theme($this->request->uri->uri);
     //var_dump($theme); exit;
     $this->template = view::forge($theme['template']);
     View::bind_global('body_attr', $theme['body_attr']);
     Asset::css($theme['css'], array(), 'head_css');
     foreach ($theme['js'] as $js) {
         Casset\Casset::js($js);
     }
     if ($theme['navigation']) {
         $navigation = call_user_func('Utils_Navigation::get_links', $theme['navigation']);
         View::bind_global('navigation', $navigation, false);
     }
     if ($theme['pageheader']) {
         View::bind_global('pageheader', $theme['pageheader']);
     }
 }
开发者ID:sajans,项目名称:cms,代码行数:25,代码来源:base.php

示例3: action_insert

 public function action_insert()
 {
     $teacher = new Model_Teacher();
     //check action post submit on page insert
     ///if submit action insert
     ///else return page insert
     if (isset($_POST["submit"]) && $_POST["submit"]) {
         $teacher->name = $_POST["name"];
         $teacher->dob = $_POST["dob"];
         $teacher->class = $_POST["class"];
         $teacher->save();
         Response::redirect('http://localhost/fuelphp/fuelphp-1.7.3/public/');
     } else {
         $viewTeacher = view::forge('teachers/editTeacher');
         $viewTeacher->set('teacher', $teacher);
         return $viewTeacher;
     }
 }
开发者ID:ThanhThan1992,项目名称:fuel_php_demo,代码行数:18,代码来源:teacher.php

示例4: before

 public function before()
 {
     parent::before();
     /*
      if (Request::active()->controller !== 'Controller_Admin' or ! in_array(Request::active()->action, array('login', 'logout')))
      {
      if (Auth::check())
      {
      $admin_group_id = Config::get('auth.driver', 'Simpleauth') == 'Ormauth' ? 6 : 100;
      //var_dump($admin_group_id); exit;
      if ( ! Auth::member($admin_group_id))
      {
      Session::set_flash('error', e('You don\'t have access to the admin panel'));
      Response::redirect('/');
      }
      }
      else
      {
      Response::redirect('admin/login');
      }
      }
     */
     $this->template = view::forge('admin/template');
 }
开发者ID:sajans,项目名称:cms,代码行数:24,代码来源:admin.php

示例5: action_login

 public function action_login()
 {
     $this->theme->set_template('login');
     $this->theme->get_template()->set('content', \view::forge('index/login', $this->_arrParam));
 }
开发者ID:khoapossible,项目名称:vision_system,代码行数:5,代码来源:index.php

示例6: action_index

 public function action_index()
 {
     $this->theme->get_template()->set('content', \view::forge('index/index', $this->_arrParam));
 }
开发者ID:khoapossible,项目名称:vision_system,代码行数:4,代码来源:index.php

示例7: action_create

 public function action_create()
 {
     $this->theme->get_template()->set('_header', \view::forge('user/_header', $this->_arrParam));
     $this->theme->get_template()->set('content', \view::forge('user/form', $this->_arrParam));
 }
开发者ID:khoapossible,项目名称:vision_system,代码行数:5,代码来源:user.php

示例8: action_response

 public function action_response()
 {
     $this->theme->get_template()->set('content', \view::forge('default/response', $this->_arrParam));
 }
开发者ID:khoapossible,项目名称:vision_system,代码行数:4,代码来源:default.php


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