protected function _onAccessible() { $type = $this->task->vars->get('type'); if (!$this->factory()->module->setTypes->has($type)) { $this->parseError(ResponseCode::CODE_404); return; } $this->status = new StatusContainer(); $this->type = $type; $this->id = $this->task->request->post->get('id', $this->task->vars->get('id')); if (!$this->_loadSet()) { $this->parseError(ResponseCode::CODE_404); return; } $q = ManagedFactory::get($this->app)->appQuick(); if ($this->request()->post->get('delete')) { if ($this->set->delete()) { $this->deleted = true; if (!$this->set->status->hasSuccessMessage('success')) { $this->set->postSuccess('success', $q->t('Der Inhalt wurde erfolgreich gelöscht.')); } } else { if (!$this->set->status->hasError('error')) { $this->set->postError('error', $q->t('Der Inhalt konnte nicht gelöscht werden.')); } } } $this->submitUrl = $this->factory()->module->getRouteUrl('delete-set', array('type' => $type, 'id' => $this->set->getId())); $this->setResult($this->factory()->appTemplates()->load('sets/delete.html')); }