當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Controller_Action_Helper_FlashMessenger::clearCurrentMessages方法代碼示例

本文整理匯總了PHP中Zend_Controller_Action_Helper_FlashMessenger::clearCurrentMessages方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Controller_Action_Helper_FlashMessenger::clearCurrentMessages方法的具體用法?PHP Zend_Controller_Action_Helper_FlashMessenger::clearCurrentMessages怎麽用?PHP Zend_Controller_Action_Helper_FlashMessenger::clearCurrentMessages使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Controller_Action_Helper_FlashMessenger的用法示例。


在下文中一共展示了Zend_Controller_Action_Helper_FlashMessenger::clearCurrentMessages方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: searchAction

 public function searchAction()
 {
     $this->_helper->viewRenderer->setRender('index');
     $this->_helper->getHelper('layout')->disableLayout();
     $toolbar = new Sales_Form_Toolbar();
     $options = $this->_helper->Options->getOptions($toolbar, $this->_user['clientid']);
     $params = $this->_helper->Params->getParams($toolbar, $options);
     $quotes = $this->search($params, $options['categories']);
     $this->view->quotes = $quotes;
     $this->view->options = $options;
     $this->view->toolbar = $toolbar;
     $this->view->messages = array_merge($this->_flashMessenger->getMessages(), $this->_flashMessenger->getCurrentMessages());
     $this->_flashMessenger->clearCurrentMessages();
 }
開發者ID:dewawi,項目名稱:dewawi,代碼行數:14,代碼來源:QuoteController.php

示例2: testRemoveMessageToCustomNamespace

 /**
  * @group ZF-1705
  */
 public function testRemoveMessageToCustomNamespace()
 {
     // Place a message in foobar and default namespaces
     $this->helper->addMessage('testmessage', 'foobar');
     $this->assertTrue($this->helper->hasCurrentMessages('foobar'));
     $this->helper->addMessage('defaultmessage');
     $this->assertTrue($this->helper->hasCurrentMessages());
     // Erase the foobar namespace
     $this->helper->clearCurrentMessages('foobar');
     // Ensure it cleared the specified namespace
     $foobarMessages = $this->helper->getCurrentMessages('foobar');
     $this->assertTrue(empty($foobarMessages), 'Namespace foobar not empty');
     // Ensure it didnt' clear the default namespace
     $defaultMessages = $this->helper->getCurrentMessages();
     $this->assertEquals(1, count($defaultMessages));
     $this->assertEquals('defaultmessage', array_pop($defaultMessages));
 }
開發者ID:sasezaki,項目名稱:mirror-zf1-tests,代碼行數:20,代碼來源:FlashMessengerTest.php

示例3: searchAction

 public function searchAction()
 {
     $this->_helper->viewRenderer->setRender('index');
     $this->_helper->getHelper('layout')->disableLayout();
     $toolbar = new Processes_Form_Toolbar();
     $options = $this->_helper->Options->getOptions($toolbar, $this->_user['clientid']);
     $params = $this->_helper->Params->getParams($toolbar, $options);
     $processes = $this->search($params, $options['categories']);
     //Get positions
     $processIDs = array();
     foreach ($processes as $process) {
         array_push($processIDs, $process['id']);
     }
     $this->view->processes = $processes;
     $this->view->options = $options;
     $this->view->toolbar = $toolbar;
     $this->view->positions = $this->getPositions($processIDs);
     $this->view->paymentstatus = $this->_helper->PaymentStatus->getPaymentStatus();
     $this->view->deliverystatus = $this->_helper->DeliveryStatus->getDeliveryStatus();
     $this->view->supplierorderstatus = $this->_helper->SupplierOrderStatus->getSupplierOrderStatus();
     $this->view->messages = array_merge($this->_flashMessenger->getMessages(), $this->_flashMessenger->getCurrentMessages());
     $this->_flashMessenger->clearCurrentMessages();
 }
開發者ID:dewawi,項目名稱:dewawi,代碼行數:23,代碼來源:ProcessController.php


注:本文中的Zend_Controller_Action_Helper_FlashMessenger::clearCurrentMessages方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。