/** * Load the item data */ protected function loadData() { $this->id = $this->getParameter('id', 'int', null); if ($this->id == null || !BackendAgendaModel::exists($this->id)) { $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing'); } $this->record = BackendAgendaModel::get($this->id); // get recurring options if ($this->record['recurring'] == 'Y') { $this->recurringOptions = BackendAgendaModel::getRecurringOptions($this->record['id']); $this->recurringOptionsDays = explode(",", $this->recurringOptions['days']); } }