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


PHP Flash::get方法代码示例

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


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

示例1: _redirect

 private function _redirect($do = false)
 {
     $redirect = "";
     if (empty($do)) {
         if (!empty(Flash::get("redirect"))) {
             $redirect = Flash::get("redirect");
         } else {
             if (!empty(Flash::get("HTTP_REFERER"))) {
                 $redirect = Flash::get("HTTP_REFERER");
             }
         }
         $redirect = $this->_sanitizeRedirect($redirect);
     }
     if ($do === true || is_string($do)) {
         if (is_string($do)) {
             $redirect = $this->_sanitizeRedirect($do);
         }
         if (empty($redirect)) {
             $redirect = get_url();
         }
         redirect($redirect);
         die;
     }
     return $redirect;
 }
开发者ID:pawedWolf,项目名称:wolfcms-pawusers,代码行数:25,代码来源:controller.login.php

示例2: add

 public function add($parent_id = 1)
 {
     // check if trying to save
     if (get_request_method() == 'POST') {
         return $this->_add();
     }
     $data = Flash::get('post_data');
     $page = new Page($data);
     $page->parent_id = $parent_id;
     $page->status_id = Setting::get('default_status_id');
     $page_parts = Flash::get('post_parts_data');
     if (empty($page_parts)) {
         // check if we have a big sister ...
         $big_sister = Page::findBigSister($parent_id);
         if ($big_sister) {
             // get all is part and create the same for the new little sister
             $big_sister_parts = Record::findAllFrom('PagePart', 'page_id=? ORDER BY id', array($big_sister->id));
             $page_parts = array();
             foreach ($big_sister_parts as $parts) {
                 $page_parts[] = new PagePart(array('name' => $parts->name, 'filter_id' => Setting::get('default_filter_id')));
             }
         } else {
             $page_parts = array(new PagePart(array('filter_id' => Setting::get('default_filter_id'))));
         }
     }
     // display things ...
     $this->setLayout('backend');
     $this->display('page/edit', array('action' => 'add', 'page' => $page, 'tags' => array(), 'filters' => Filter::findAll(), 'behaviors' => Behavior::findAll(), 'page_parts' => $page_parts, 'layouts' => Layout::find()));
 }
开发者ID:albertobraschi,项目名称:toad,代码行数:29,代码来源:PageController.php

示例3: forgot

 function forgot()
 {
     if (get_request_method() == 'POST') {
         return $this->_sendPasswordTo($_POST['forgot']['email']);
     }
     $this->display('login/forgot', array('email' => Flash::get('email')));
 }
开发者ID:albertobraschi,项目名称:toad,代码行数:7,代码来源:LoginController.php

示例4: add

 /**
  * Action to add a page.
  *
  * @param int $parent_id The page id for the new page's parent. Defaults to page 1.
  * @return <type>
  */
 public function add($parent_id = 1)
 {
     // Check if trying to save.
     if (get_request_method() == 'POST') {
         return $this->_store('add');
     }
     // If not trying to save, display "Add page" view.
     $data = Flash::get('post_data');
     $page = new Page($data);
     $page->parent_id = $parent_id;
     $page->status_id = Setting::get('default_status_id');
     $page->needs_login = Page::LOGIN_INHERIT;
     $page_parts = Flash::get('post_parts_data');
     if (empty($page_parts)) {
         // Check if we have a big sister.
         $big_sister = Record::findOneFrom('Page', 'parent_id=? ORDER BY id DESC', array($parent_id));
         if ($big_sister) {
             // Get list of parts create the same for the new little sister
             $big_sister_parts = Record::findAllFrom('PagePart', 'page_id=? ORDER BY id', array($big_sister->id));
             $page_parts = array();
             foreach ($big_sister_parts as $parts) {
                 $page_parts[] = new PagePart(array('name' => $parts->name, 'filter_id' => Setting::get('default_filter_id')));
             }
         } else {
             $page_parts = array(new PagePart(array('filter_id' => Setting::get('default_filter_id'))));
         }
     }
     // Display actual view.
     $this->setLayout('backend');
     $this->display('page/edit', array('action' => 'add', 'csrf_token' => SecureToken::generateToken(BASE_URL . 'page/add'), 'page' => $page, 'tags' => array(), 'filters' => Filter::findAll(), 'behaviors' => Behavior::findAll(), 'page_parts' => $page_parts, 'layouts' => Record::findAllFrom('Layout')));
 }
开发者ID:chaobj001,项目名称:tt,代码行数:37,代码来源:PageController.php

示例5: action_logout

 /**
  *
  */
 public function action_logout()
 {
     $this->auto_render = false;
     Auth::instance()->logout();
     if ($next_url = Flash::get('redirect')) {
         $this->go($next_url);
     }
     $this->go_home();
 }
开发者ID:NegoCore,项目名称:auth,代码行数:12,代码来源:Auth.php

示例6: action_logout

 public function action_logout()
 {
     $this->auto_render = FALSE;
     Auth::instance()->logout(TRUE);
     Observer::notify('admin_after_logout', Auth::get_username());
     if ($next_url = Flash::get('redirect')) {
         $this->go($next_url);
     }
     $this->go_home();
 }
开发者ID:ZerGabriel,项目名称:cms-1,代码行数:10,代码来源:login.php

示例7: action_add

 public function action_add()
 {
     $data = Flash::get('roles::add::data', array());
     $role = ORM::factory('role')->values($data);
     if (Request::current()->method() == Request::POST) {
         return $this->_add($role);
     }
     $this->set_title(__('Add role'));
     $this->template->content = View::factory('roles/edit', array('action' => 'add', 'role' => $role));
 }
开发者ID:ortodesign,项目名称:cms,代码行数:10,代码来源:roles.php

示例8: action_add

 public function action_add()
 {
     $data = Flash::get('post_data', array());
     $job = ORM::factory('job')->values($data);
     // check if trying to save
     if (Request::current()->method() == Request::POST) {
         return $this->_add($job);
     }
     $this->set_title(__('Add job'));
     $this->template->content = View::factory('jobs/edit', array('action' => 'add', 'job' => $job));
 }
开发者ID:ZerGabriel,项目名称:cms-1,代码行数:11,代码来源:jobs.php

示例9: action_add

 public function action_add()
 {
     $data = Flash::get('users::add::data', array());
     $user = ORM::factory('user')->values($data);
     // check if trying to save
     if (Request::current()->method() == Request::POST) {
         return $this->_add($user);
     }
     $this->set_title(__('Add user'));
     $this->template->content = View::factory('users/edit', array('action' => 'add', 'user' => $user, 'permissions' => array()));
 }
开发者ID:ZerGabriel,项目名称:cms-1,代码行数:11,代码来源:users.php

示例10: action_add

 public function action_add()
 {
     // check if user have already enter something
     $data = Flash::get('post_data', array());
     $type = ORM::factory('email_type');
     // check if trying to save
     if (Request::current()->method() == Request::POST) {
         return $this->_add($type);
     }
     $this->set_title(__('Add email type'));
     $this->template->content = View::factory('email/types/edit', array('action' => 'add', 'type' => $type, 'templates' => $type->templates->find_all()));
 }
开发者ID:ZerGabriel,项目名称:cms-1,代码行数:12,代码来源:types.php

示例11: add

 public function add()
 {
     // check if trying to save
     if (get_request_method() == 'POST') {
         return $this->_add();
     }
     // check if user have already enter something
     $tag = Flash::get('post_data');
     if (empty($tag)) {
         $tag = new Tagger();
     }
     $this->display('tagger/views/edit', array('action' => 'add', 'tag' => $tag));
 }
开发者ID:silentworks,项目名称:tagger,代码行数:13,代码来源:TaggerController.php

示例12: add

 function add()
 {
     // check if trying to save
     if (get_request_method() == 'POST') {
         return $this->_add();
     }
     // check if user have already enter something
     $layout = Flash::get('post_data');
     if (empty($layout)) {
         $layout = new Layout();
     }
     $this->display('layout/edit', array('action' => 'add', 'layout' => $layout));
 }
开发者ID:albertobraschi,项目名称:toad,代码行数:13,代码来源:LayoutController.php

示例13: add

 function add()
 {
     // check if trying to save
     if (get_request_method() == 'POST') {
         return $this->_add();
     }
     // check if user have already enter something
     $snippet = Flash::get('post_data');
     if (empty($snippet)) {
         $snippet = new Snippet();
     }
     $this->display('snippet/edit', array('action' => 'add', 'filters' => Filter::findAll(), 'snippet' => $snippet));
 }
开发者ID:albertobraschi,项目名称:toad,代码行数:13,代码来源:SnippetController.php

示例14: add

 public function add()
 {
     // check if trying to save
     if (get_request_method() == 'POST') {
         return $this->_add();
     }
     // check if user have already enter something
     $data = Flash::get('post_data');
     $testimonial = null;
     if (isset($data)) {
         $testimonial = new Testimonial($data);
     }
     $this->display('testimonial/edit', array('action' => 'add', 'csrf_token' => SecureToken::generateToken(BASE_URL . 'testimonial/add'), 'testimonial' => $testimonial, 'pages' => Record::findAllFrom('Page', 'parent_id=1 order by parent_id,position')));
 }
开发者ID:sindotnet,项目名称:cona,代码行数:14,代码来源:TestimonialController.php

示例15: action_add

 public function action_add()
 {
     // check if trying to save
     if (Request::current()->method() == Request::POST) {
         return $this->_add();
     }
     Assets::package('ace');
     $this->set_title(__('Add layout'));
     // check if user have already enter something
     $layout = Flash::get('post_data');
     if (empty($layout)) {
         $layout = new Model_File_Layout();
     }
     $this->template->content = View::factory('layout/edit', array('action' => 'add', 'layout' => $layout));
 }
开发者ID:ZerGabriel,项目名称:cms-1,代码行数:15,代码来源:layout.php


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