本文整理汇总了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;
}
示例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']);
}
}
示例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;
}
}
示例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');
}
示例5: action_login
public function action_login()
{
$this->theme->set_template('login');
$this->theme->get_template()->set('content', \view::forge('index/login', $this->_arrParam));
}
示例6: action_index
public function action_index()
{
$this->theme->get_template()->set('content', \view::forge('index/index', $this->_arrParam));
}
示例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));
}
示例8: action_response
public function action_response()
{
$this->theme->get_template()->set('content', \view::forge('default/response', $this->_arrParam));
}