/** * Gets all data needed for this page */ private function getData() { // get parameters $id = $this->getParameter('mailing_id', 'int'); // does the item exist if (!BackendMailmotorModel::existsMailing($id)) { $this->redirect(BackendModel::createURLForAction('Index') . '&error=mailing-does-not-exist'); } // fetch the mailing $this->mailing = BackendMailmotorModel::getMailing($id); // fetch the bounces $this->bounces = BackendMailmotorCMHelper::getBounces($this->mailing['id']); // does the item exist if (empty($this->bounces)) { $this->redirect(BackendModel::createURLForAction('Statistics') . '&id=' . $this->mailing['id'] . '&error=no-bounces'); } }