當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。