Exemplo n.º 1
0
 protected function redirect(ResponseHelper $responseHelper)
 {
     $session = new Session();
     $index = $this->component->getListingQueryParamsSessionName();
     $params = isset($session[$index]) ? $session[$index] : [];
     $responseHelper->redirectToAdminPage('index', $params);
 }
Exemplo n.º 2
0
 protected function redirect(ResponseHelper $responseHelper)
 {
     $session = new Session(Pimple::getInstance());
     $index = $this->component->getListingQueryParamsSessionName();
     $params = isset($session[$index]) ? $session[$index] : [];
     if (!is_array($params)) {
         $params = (array) $params;
     }
     $responseHelper->redirectToAdminPage('index', $params);
 }
Exemplo n.º 3
0
 /**
  * If our component is a BulkActionProcessorInterface implementer, then
  * process those here, handling the result and associated message.
  *
  * @param ResponseHelper $responseHelper
  */
 public function process(ResponseHelper $responseHelper)
 {
     if ($this->component instanceof BulkActionProcessorInterface) {
         $result = $this->component->getBulkActions()->process();
         if ($result) {
             if (!$result->isSuccess()) {
                 $this->bulkActionFailureMessage = $result->getMessage();
             } else {
                 $index = $this->component->getListingQueryParamsSessionName();
                 $params = isset($this->session[$index]) ? $this->session[$index] : [];
                 $responseHelper->setSuccessMessage($result->getMessage())->redirectToAdminPage('Index', $params);
             }
         }
     }
 }