[TASK] Use name-resolution instead of strings where possible: 12
[Packages/TYPO3.CMS.git] / typo3 / sysext / scheduler / Documentation / DevelopersGuide / CreatingTasks / Index.rst
index 707aebb..c67cc78 100644 (file)
@@ -275,11 +275,11 @@ task. Let's look at one of the base classes declaration as an example:
 ::
 
        // Add caching framework garbage collection task
 ::
 
        // Add caching framework garbage collection task
-       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks']['TYPO3\\CMS\\Scheduler\\Task\\CachingFrameworkGarbageCollectionTask'] = array(
+       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\TYPO3\CMS\Scheduler\Task\CachingFrameworkGarbageCollectionTask::class] = array(
                'extension' => $_EXTKEY,
                'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:cachingFrameworkGarbageCollection.name',
                'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:cachingFrameworkGarbageCollection.description',
                'extension' => $_EXTKEY,
                'title' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:cachingFrameworkGarbageCollection.name',
                'description' => 'LLL:EXT:' . $_EXTKEY . '/locallang.xml:cachingFrameworkGarbageCollection.description',
-               'additionalFields' => 'TYPO3\\CMS\\Scheduler\\Task\\CachingFrameworkGarbageCollectionAdditionalFieldProvider'
+               'additionalFields' => \TYPO3\CMS\Scheduler\Task\CachingFrameworkGarbageCollectionAdditionalFieldProvider::class
        );
 
 The registration is made in the array
        );
 
 The registration is made in the array
@@ -328,7 +328,7 @@ simple as possible. Consider the following:
 
        class MyTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask {
                public function execute() {
 
        class MyTask extends \TYPO3\CMS\Scheduler\Task\AbstractTask {
                public function execute() {
-                       $businessLogic = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Vendor\\Extension\\BusinessLogic');
+                       $businessLogic = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\Vendor\Extension\BusinessLogic::class);
                        $businessLogic->run(arg1, arg2, …);
                }
        }
                        $businessLogic->run(arg1, arg2, …);
                }
        }