TYPO3 CMS  TYPO3_6-2
TaskTypeRegistry.php
Go to the documentation of this file.
1 <?php
3 
21 
25  protected $registeredTaskTypes = array();
26 
30  public function __construct() {
31  $this->registeredTaskTypes = $GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['processingTaskTypes'];
32  }
33 
40  protected function getClassForTaskType($taskType) {
41  return isset($this->registeredTaskTypes[$taskType]) ? $this->registeredTaskTypes[$taskType] : NULL;
42  }
43 
51  public function getTaskForType($taskType, \TYPO3\CMS\Core\Resource\ProcessedFile $processedFile, array $processingConfiguration) {
52  $taskClass = $this->getClassForTaskType($taskType);
53  if ($taskClass === NULL) {
54  throw new \RuntimeException('Unknown processing task "' . $taskType . '"');
55  }
56 
57  return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($taskClass,
58  $processedFile, $processingConfiguration
59  );
60  }
61 }
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
getTaskForType($taskType, \TYPO3\CMS\Core\Resource\ProcessedFile $processedFile, array $processingConfiguration)