/** * 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')); /* @type \Joomla\Github\Github $gitHub */ $table->setGitHub($this->getContainer()->get('gitHub')); $table->save($app->input->get('article', array(), 'array')); $app->enqueueMessage(g11n3t('The article has been saved.'), 'success'); return parent::execute(); }