protected function redirect(ResponseHelper $responseHelper) { $session = new Session(); $index = $this->component->getListingQueryParamsSessionName(); $params = isset($session[$index]) ? $session[$index] : []; $responseHelper->redirectToAdminPage('index', $params); }
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); }
/** * 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); } } } }