61 $this->dispatcher = $this->objectManager->get(
'TYPO3\\CMS\\Extbase\\Mvc\\Dispatcher');
72 $this->request = $this->objectManager->get(
'TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Request');
73 $this->response = $this->objectManager->get(
'TYPO3\\CMS\\Extbase\\Mvc\\Cli\\Response');
75 $this->configurationManager->setContentObject(\
TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer'));
76 $this->configurationManager->setConfiguration($configuration);
78 $frameworkConfiguration = $this->configurationManager->getConfiguration(\
TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
79 if (isset($frameworkConfiguration[
'objects'])) {
81 foreach ($frameworkConfiguration[
'objects'] as $classNameWithDot => $classConfiguration) {
82 if (isset($classConfiguration[
'className'])) {
83 $originalClassName = rtrim($classNameWithDot,
'.');
84 $objectContainer->registerImplementation($originalClassName, $classConfiguration[
'className']);
89 $reflectionService = $this->objectManager->get(
'TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService');
90 $reflectionService->setDataCache(\
TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Cache\\CacheManager')->getCache(
'extbase_reflection'));
91 if (!$reflectionService->isInitialized()) {
92 $reflectionService->initialize();
106 $commandIdentifier = $task->getCommandIdentifier();
107 list($extensionKey, $controllerName, $commandName) = explode(
':', $commandIdentifier);
109 $this->
initialize(array(
'extensionName' => $extensionName));
111 $command = $this->commandManager->getCommandByIdentifier($commandIdentifier);
112 $this->request->setControllerObjectName($command->getControllerClassName());
113 $this->request->setControllerCommandName($command->getControllerCommandName());
114 $this->request->setArguments($task->getArguments());
115 $this->dispatcher->dispatch($this->request, $this->response);
126 $persistenceManager = $this->objectManager->get(
'TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager');
127 $persistenceManager->persistAll();
128 $reflectionService = $this->objectManager->get(
'TYPO3\\CMS\\Extbase\\Reflection\\ReflectionService');
129 $reflectionService->shutdown();
execute(\TYPO3\CMS\Extbase\Scheduler\Task $task)
static makeInstance($className)
initialize(array $configuration)
static underscoredToUpperCamelCase($string)