/** * Execute the controller. * * @return string * * @since 1.0 */ public function execute() { $app = $this->getContainer()->get('app'); $app->getUser()->authorize('admin'); $table = new ArticlesTable($this->getContainer()->get('db')); $table->delete($app->input->getInt('id')); $app->enqueueMessage(g11n3t('The article has been deleted.'), 'success'); $this->getContainer()->get('app')->input->set('view', 'articles'); return parent::execute(); }