Пример #1
0
 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();
 }
Пример #2
0
 /**
  * getCurrentMessages() - get messages that have been added to the current
  * namespace within this request
  *
  * @return array
  */
 public function getCurrentMessages($type = null)
 {
     if ($type === null) {
         return parent::getCurrentMessages();
     }
     if (isset(self::$_session->{$this->_namespace}[$type])) {
         return self::$_session->{$this->_namespace}[$type];
     }
     return array();
 }
 /**
  * @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));
 }
Пример #4
0
 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();
 }
Пример #5
0
 /**
  * Contrôle de l'existance ou non de messages dans la pile
  *
  * @return int
  */
 public function hasMessages()
 {
     return count($this->flashMessenger) + count($this->flashMessenger->getCurrentMessages());
 }