2 namespace TYPO3\CMS\Extensionmanager\Task
;
4 /***************************************************************
7 * (c) 2010-2012 Christian Kuhn <lolli@schwarzbu.ch>
10 * This script is part of the TYPO3 project. The TYPO3 project is
11 * free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * The GNU General Public License can be found at
17 * http://www.gnu.org/copyleft/gpl.html.
19 * This script is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * This copyright notice MUST APPEAR in all copies of the script!
25 ***************************************************************/
28 * Update extension list from TER task
30 * @author Christian Kuhn <lolli@schwarzbu.ch>
32 class UpdateExtensionListTask
extends \TYPO3\CMS\Scheduler\Task
{
35 * Public method, called by scheduler.
37 * @return boolean TRUE on success
39 public function execute() {
40 // Throws exceptions if something went wrong
41 $this->updateExtensionlist();
47 * Update extension list
49 * @TODO: Adapt to multiple repositories if the Helper can handle this
52 protected function updateExtensionlist() {
53 /** @var $objectManager \TYPO3\CMS\Extbase\Object\ObjectManager */
54 $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility
::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
55 /** @var $repositoryHelper \TYPO3\CMS\Extensionmanager\Utility\Repository\Helper */
56 $repositoryHelper = $objectManager->get('TYPO3\\CMS\\Extensionmanager\\Utility\\Repository\\Helper');
57 $repositoryHelper->updateExtList();