[TASK] Shorten namespaces in EXT:frontend 01/37801/6
authorFrank Nägler <typo3@naegler.net>
Thu, 12 Mar 2015 22:27:03 +0000 (23:27 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sun, 15 Mar 2015 19:08:25 +0000 (20:08 +0100)
Resolves: #65706
Releases: master
Change-Id: Idaf2d06d8f0b209a8a052a9b7635092dd752ecfa
Reviewed-on: http://review.typo3.org/37801
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Stephan Großberndt <stephan@grossberndt.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
30 files changed:
typo3/sysext/frontend/Classes/Authentication/FrontendUserAuthentication.php
typo3/sysext/frontend/Classes/Category/Collection/CategoryCollection.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectStdWrapHookInterface.php
typo3/sysext/frontend/Classes/ContentObject/HierarchicalMenuContentObject.php
typo3/sysext/frontend/Classes/ContentObject/TemplateContentObject.php
typo3/sysext/frontend/Classes/Controller/ExtDirectEidController.php
typo3/sysext/frontend/Classes/Controller/PageInformationController.php
typo3/sysext/frontend/Classes/Controller/ShowImageController.php
typo3/sysext/frontend/Classes/Controller/TranslationStatusController.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/EidRequestHandler.php
typo3/sysext/frontend/Classes/Hooks/MediaItemHooks.php
typo3/sysext/frontend/Classes/Hooks/TableColumnHooks.php
typo3/sysext/frontend/Classes/Hooks/TreelistCacheUpdateHooks.php
typo3/sysext/frontend/Classes/Imaging/GifBuilder.php
typo3/sysext/frontend/Classes/MediaWizard/MediaWizardProvider.php
typo3/sysext/frontend/Classes/MediaWizard/MediaWizardProviderManager.php
typo3/sysext/frontend/Classes/Page/CacheHashCalculator.php
typo3/sysext/frontend/Classes/Page/FramesetRenderer.php
typo3/sysext/frontend/Classes/Page/PageGenerator.php
typo3/sysext/frontend/Classes/Page/PageRepository.php
typo3/sysext/frontend/Classes/Page/PageRepositoryGetPageHookInterface.php
typo3/sysext/frontend/Classes/Page/PageRepositoryGetPageOverlayHookInterface.php
typo3/sysext/frontend/Classes/Page/PageRepositoryGetRecordOverlayHookInterface.php
typo3/sysext/frontend/Classes/Plugin/AbstractPlugin.php
typo3/sysext/frontend/Classes/RequestHandler.php
typo3/sysext/frontend/Classes/Utility/EidUtility.php
typo3/sysext/frontend/Classes/View/AdminPanelView.php
typo3/sysext/frontend/Classes/View/AdminPanelViewHookInterface.php

index 67957ef..f2db9bc 100644 (file)
@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Frontend\Authentication;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Authentication\AbstractUserAuthentication;
+use TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -22,7 +24,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  * @author René Fritz <r.fritz@colorcube.de>
  */
-class FrontendUserAuthentication extends \TYPO3\CMS\Core\Authentication\AbstractUserAuthentication {
+class FrontendUserAuthentication extends AbstractUserAuthentication {
 
        /**
         * form field with 0 or 1
@@ -159,7 +161,7 @@ class FrontendUserAuthentication extends \TYPO3\CMS\Core\Authentication\Abstract
         * Starts a user session
         *
         * @return void
-        * @see \TYPO3\CMS\Core\Authentication\AbstractUserAuthentication::start()
+        * @see AbstractUserAuthentication::start()
         */
        public function start() {
                if ((int)$this->auth_timeout_field > 0 && (int)$this->auth_timeout_field < $this->lifetime) {
@@ -210,7 +212,7 @@ class FrontendUserAuthentication extends \TYPO3\CMS\Core\Authentication\Abstract
         * Returns an info array with Login/Logout data submitted by a form or params
         *
         * @return array
-        * @see \TYPO3\CMS\Core\Authentication\AbstractUserAuthentication::getLoginFormData()
+        * @see AbstractUserAuthentication::getLoginFormData()
         */
        public function getLoginFormData() {
                $loginData = parent::getLoginFormData();
@@ -224,7 +226,7 @@ class FrontendUserAuthentication extends \TYPO3\CMS\Core\Authentication\Abstract
                                $isPermanent = $GLOBALS['TYPO3_CONF_VARS']['FE']['permalogin'];
                        } elseif (!$isPermanent) {
                                // To make sure the user gets a session cookie and doesn't keep a possibly existing time based cookie,
-                               // we need to force seeting the session cookie here
+                               // we need to force setting the session cookie here
                                $this->forceSetCookie = TRUE;
                        }
                        $isPermanent = $isPermanent ? 1 : 0;
@@ -276,9 +278,9 @@ class FrontendUserAuthentication extends \TYPO3\CMS\Core\Authentication\Abstract
                $authInfo = $this->getAuthInfoArray();
                if ($this->writeDevLog) {
                        if (is_array($this->user)) {
-                               GeneralUtility::devLog('Get usergroups for user: ' . GeneralUtility::arrayToLogString($this->user, array($this->userid_column, $this->username_column)), \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::class);
+                               GeneralUtility::devLog('Get usergroups for user: ' . GeneralUtility::arrayToLogString($this->user, array($this->userid_column, $this->username_column)), __CLASS__);
                        } else {
-                               GeneralUtility::devLog('Get usergroups for "anonymous" user', \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::class);
+                               GeneralUtility::devLog('Get usergroups for "anonymous" user', __CLASS__);
                        }
                }
                $groupDataArr = array();
@@ -296,13 +298,13 @@ class FrontendUserAuthentication extends \TYPO3\CMS\Core\Authentication\Abstract
                        unset($serviceObj);
                }
                if ($this->writeDevLog && $serviceChain) {
-                       GeneralUtility::devLog($subType . ' auth services called: ' . $serviceChain, \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::class);
+                       GeneralUtility::devLog($subType . ' auth services called: ' . $serviceChain, __CLASS__);
                }
                if ($this->writeDevLog && !count($groupDataArr)) {
-                       GeneralUtility::devLog('No usergroups found by services', \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::class);
+                       GeneralUtility::devLog('No usergroups found by services', __CLASS__);
                }
                if ($this->writeDevLog && count($groupDataArr)) {
-                       GeneralUtility::devLog(count($groupDataArr) . ' usergroup records found by services', \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::class);
+                       GeneralUtility::devLog(count($groupDataArr) . ' usergroup records found by services', __CLASS__);
                }
                // Use 'auth' service to check the usergroups if they are really valid
                foreach ($groupDataArr as $groupData) {
@@ -316,7 +318,7 @@ class FrontendUserAuthentication extends \TYPO3\CMS\Core\Authentication\Abstract
                                if (!$serviceObj->authGroup($this->user, $groupData)) {
                                        $validGroup = FALSE;
                                        if ($this->writeDevLog) {
-                                               GeneralUtility::devLog($subType . ' auth service did not auth group: ' . GeneralUtility::arrayToLogString($groupData, 'uid,title'), \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::class, 2);
+                                               GeneralUtility::devLog($subType . ' auth service did not auth group: ' . GeneralUtility::arrayToLogString($groupData, 'uid,title'), __CLASS__, 2);
                                        }
                                        break;
                                }
@@ -353,9 +355,9 @@ class FrontendUserAuthentication extends \TYPO3\CMS\Core\Authentication\Abstract
        public function getUserTSconf() {
                if (!$this->userTSUpdated) {
                        // Parsing the user TS (or getting from cache)
-                       $this->TSdataArray = \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::checkIncludeLines_array($this->TSdataArray);
+                       $this->TSdataArray = TypoScriptParser::checkIncludeLines_array($this->TSdataArray);
                        $userTS = implode(LF . '[GLOBAL]' . LF, $this->TSdataArray);
-                       $parseObj = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::class);
+                       $parseObj = GeneralUtility::makeInstance(TypoScriptParser::class);
                        $parseObj->parse($userTS);
                        $this->userTS = $parseObj->setup;
                        $this->userTSUpdated = TRUE;
index 3354305..189cba0 100644 (file)
@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Frontend\Category\Collection;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Extend category collection for the frontend, to collect related records
  * while respecting language, enable fields, etc.
@@ -34,8 +36,7 @@ class CategoryCollection extends \TYPO3\CMS\Core\Category\Collection\CategoryCol
         */
        static public function create(array $collectionRecord, $fillItems = FALSE) {
                /** @var $collection \TYPO3\CMS\Frontend\Category\Collection\CategoryCollection */
-               $collection = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-                       \TYPO3\CMS\Frontend\Category\Collection\CategoryCollection::class,
+               $collection = GeneralUtility::makeInstance(__CLASS__,
                        $collectionRecord['table_name'],
                        $collectionRecord['field_name']
                );
index be39616..1d838df 100644 (file)
@@ -19,9 +19,11 @@ use TYPO3\CMS\Core\FrontendEditing\FrontendEditingController;
 use TYPO3\CMS\Core\Html\HtmlParser;
 use TYPO3\CMS\Core\Imaging\GraphicalFunctions;
 use TYPO3\CMS\Core\Log\LogManager;
+use TYPO3\CMS\Core\Mail\MailMessage;
 use TYPO3\CMS\Core\Resource\Exception;
 use TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException;
 use TYPO3\CMS\Core\Resource\File;
+use TYPO3\CMS\Core\Resource\FileInterface;
 use TYPO3\CMS\Core\Resource\FileReference;
 use TYPO3\CMS\Core\Resource\Folder;
 use TYPO3\CMS\Core\Resource\ProcessedFile;
@@ -32,6 +34,8 @@ use TYPO3\CMS\Core\TypoScript\TemplateService;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Core\Utility\DebugUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\HttpUtility;
+use TYPO3\CMS\Core\Utility\MailUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
 use TYPO3\CMS\Core\Utility\StringUtility;
 use TYPO3\CMS\Core\Versioning\VersionState;
@@ -1772,7 +1776,7 @@ class ContentObjectRenderer {
         *
         * @param int $tstamp Unix timestamp (number of seconds since 1970)
         * @return void
-        * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::setSysLastChanged()
+        * @see TypoScriptFrontendController::setSysLastChanged()
         */
        public function lastChanged($tstamp) {
                $tstamp = (int)$tstamp;
@@ -5741,7 +5745,7 @@ class ContentObjectRenderer {
                        $fileObject = NULL;
                }
 
-               if ($fileObject instanceof \TYPO3\CMS\Core\Resource\FileInterface) {
+               if ($fileObject instanceof FileInterface) {
                        // All properties of the \TYPO3\CMS\Core\Resource\FileInterface are available here:
                        switch ($requestedFileInformationKey) {
                                case 'name':
@@ -6334,7 +6338,7 @@ class ContentObjectRenderer {
                                                        if (isset($conf['forceAbsoluteUrl.']['scheme']) && $conf['forceAbsoluteUrl.']['scheme']) {
                                                                $absoluteUrlScheme = $conf['forceAbsoluteUrl.']['scheme'];
                                                        } elseif ($page['url_scheme'] > 0) {
-                                                               $absoluteUrlScheme = (int)$page['url_scheme'] === \TYPO3\CMS\Core\Utility\HttpUtility::SCHEME_HTTP ? 'http' : 'https';
+                                                               $absoluteUrlScheme = (int)$page['url_scheme'] === HttpUtility::SCHEME_HTTP ? 'http' : 'https';
                                                        } elseif ($this->getEnvironmentVariable('TYPO3_SSL')) {
                                                                $absoluteUrlScheme = 'https';
                                                        }
@@ -7053,8 +7057,8 @@ class ContentObjectRenderer {
         */
        public function sendNotifyEmail($message, $recipients, $cc, $senderAddress, $senderName = '', $replyTo = '') {
                $result = FALSE;
-               /** @var $mail \TYPO3\CMS\Core\Mail\MailMessage */
-               $mail = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Mail\MailMessage::class);
+               /** @var $mail MailMessage */
+               $mail = GeneralUtility::makeInstance(MailMessage::class);
                $senderName = trim($senderName);
                $senderAddress = trim($senderAddress);
                if ($senderName !== '' && $senderAddress !== '') {
@@ -7062,10 +7066,10 @@ class ContentObjectRenderer {
                } elseif ($senderAddress !== '') {
                        $sender = array($senderAddress);
                } else {
-                       $sender = \TYPO3\CMS\Core\Utility\MailUtility::getSystemFrom();
+                       $sender = MailUtility::getSystemFrom();
                }
                $mail->setFrom($sender);
-               $parsedReplyTo = \TYPO3\CMS\Core\Utility\MailUtility::parseAddresses($replyTo);
+               $parsedReplyTo = MailUtility::parseAddresses($replyTo);
                if (count($parsedReplyTo) > 0) {
                        $mail->setReplyTo($parsedReplyTo);
                }
@@ -7075,17 +7079,17 @@ class ContentObjectRenderer {
                        $messageParts = explode(LF, $message, 2);
                        $subject = trim($messageParts[0]);
                        $plainMessage = trim($messageParts[1]);
-                       $parsedRecipients = \TYPO3\CMS\Core\Utility\MailUtility::parseAddresses($recipients);
+                       $parsedRecipients = MailUtility::parseAddresses($recipients);
                        if (count($parsedRecipients) > 0) {
                                $mail->setTo($parsedRecipients)
                                        ->setSubject($subject)
                                        ->setBody($plainMessage);
                                $mail->send();
                        }
-                       $parsedCc = \TYPO3\CMS\Core\Utility\MailUtility::parseAddresses($cc);
+                       $parsedCc = MailUtility::parseAddresses($cc);
                        if (count($parsedCc) > 0) {
-                               /** @var $mail \TYPO3\CMS\Core\Mail\MailMessage */
-                               $mail = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Mail\MailMessage::class);
+                               /** @var $mail MailMessage */
+                               $mail = GeneralUtility::makeInstance(MailMessage::class);
                                if (count($parsedReplyTo) > 0) {
                                        $mail->setReplyTo($parsedReplyTo);
                                }
@@ -7550,7 +7554,7 @@ class ContentObjectRenderer {
         * @param array $prevId_array array of IDs from previous recursions. In order to prevent infinite loops with mount pages.
         * @param int $recursionLevel Internal: Zero for the first recursion, incremented for each recursive call.
         * @return string Returns the list of ids as a comma separated string
-        * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::checkEnableFields(), \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::checkPagerecordForIncludeSection()
+        * @see TypoScriptFrontendController::checkEnableFields(), TypoScriptFrontendController::checkPagerecordForIncludeSection()
         */
        public function getTreeList($id, $depth, $begin = 0, $dontCheckEnableFields = FALSE, $addSelectFields = '', $moreWhereClauses = '', array $prevId_array = array(), $recursionLevel = 0) {
                $id = (int)$id;
index eb04475..1f10e6c 100644 (file)
@@ -26,7 +26,7 @@ interface ContentObjectStdWrapHookInterface {
         *
         * @param string $content Input value undergoing processing in this function. Possibly substituted by other values fetched from another source.
         * @param array $configuration TypoScript stdWrap properties
-        * @param \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $parentObject Parent content object
+        * @param ContentObjectRenderer $parentObject Parent content object
         * @return string Further processed $content
         */
        public function stdWrapPreProcess($content, array $configuration, ContentObjectRenderer &$parentObject);
@@ -36,7 +36,7 @@ interface ContentObjectStdWrapHookInterface {
         *
         * @param string $content Input value undergoing processing in this function. Possibly substituted by other values fetched from another source.
         * @param array $configuration TypoScript stdWrap properties
-        * @param \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $parentObject Parent content object
+        * @param ContentObjectRenderer $parentObject Parent content object
         * @return string Further processed $content
         */
        public function stdWrapOverride($content, array $configuration, ContentObjectRenderer &$parentObject);
@@ -46,7 +46,7 @@ interface ContentObjectStdWrapHookInterface {
         *
         * @param string $content Input value undergoing processing in this function. Possibly substituted by other values fetched from another source.
         * @param array $configuration TypoScript "stdWrap properties".
-        * @param \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $parentObject Parent content object
+        * @param ContentObjectRenderer $parentObject Parent content object
         * @return string Further processed $content
         */
        public function stdWrapProcess($content, array $configuration, ContentObjectRenderer &$parentObject);
@@ -56,7 +56,7 @@ interface ContentObjectStdWrapHookInterface {
         *
         * @param string $content Input value undergoing processing in this function. Possibly substituted by other values fetched from another source.
         * @param array $configuration TypoScript stdWrap properties
-        * @param \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $parentObject Parent content object
+        * @param ContentObjectRenderer $parentObject Parent content object
         * @return string Further processed $content
         */
        public function stdWrapPostProcess($content, array $configuration, ContentObjectRenderer &$parentObject);
index eeee125..32f16e8 100644 (file)
@@ -13,6 +13,7 @@ namespace TYPO3\CMS\Frontend\ContentObject;
  *
  * The TYPO3 project - inspiring people to share!
  */
+
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
index 80e9e01..5170bce 100644 (file)
@@ -13,6 +13,7 @@ namespace TYPO3\CMS\Frontend\ContentObject;
  *
  * The TYPO3 project - inspiring people to share!
  */
+
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Html\HtmlParser;
 
index 39a873c..22aa171 100644 (file)
@@ -14,6 +14,10 @@ namespace TYPO3\CMS\Frontend\Controller;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Frontend\Utility\EidUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Http\AjaxRequestHandler;
+
 /**
  * eID controller for ExtDirect
  *
@@ -24,7 +28,7 @@ class ExtDirectEidController {
        /**
         * Ajax Instance
         *
-        * @var \TYPO3\CMS\Core\Http\AjaxRequestHandler
+        * @var AjaxRequestHandler
         */
        protected $ajaxObject = NULL;
 
@@ -35,12 +39,12 @@ class ExtDirectEidController {
         * @return void
         */
        public function routeAction() {
-               \TYPO3\CMS\Frontend\Utility\EidUtility::initLanguage();
-               $ajaxID = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('action');
+               EidUtility::initLanguage();
+               $ajaxID = GeneralUtility::_GP('action');
                $ajaxScript = $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX']['ExtDirect::' . $ajaxID]['callbackMethod'];
-               $this->ajaxObject = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Http\AjaxRequestHandler::class, 'ExtDirect::' . $ajaxID);
+               $this->ajaxObject = GeneralUtility::makeInstance(AjaxRequestHandler::class, 'ExtDirect::' . $ajaxID);
                $parameters = array();
-               \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($ajaxScript, $parameters, $this->ajaxObject, FALSE, TRUE);
+               GeneralUtility::callUserFunction($ajaxScript, $parameters, $this->ajaxObject, FALSE, TRUE);
        }
 
        /**
@@ -49,7 +53,7 @@ class ExtDirectEidController {
         * @return bool
         */
        public function actionIsAllowed() {
-               if (!in_array(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('action'), array('route', 'getAPI'))) {
+               if (!in_array(GeneralUtility::_GP('action'), array('route', 'getAPI'))) {
                        return FALSE;
                }
                return TRUE;
index cbeee8b..19d8d5d 100644 (file)
@@ -15,6 +15,8 @@ namespace TYPO3\CMS\Frontend\Controller;
  */
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Backend\View\PageLayoutView;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
  * Class for displaying page information (records, page record properties)
@@ -51,7 +53,7 @@ class PageInformationController extends \TYPO3\CMS\Backend\Module\AbstractFuncti
         * @return string Output HTML for the module.
         */
        public function main() {
-               $dblist = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\View\PageLayoutView::class);
+               $dblist = GeneralUtility::makeInstance(PageLayoutView::class);
                $dblist->descrTable = '_MOD_' . $GLOBALS['MCONF']['name'];
                $dblist->backPath = $GLOBALS['BACK_PATH'];
                $dblist->thumbs = 0;
@@ -75,7 +77,7 @@ class PageInformationController extends \TYPO3\CMS\Backend\Module\AbstractFuncti
                if (is_array($footerContentHook)) {
                        foreach ($footerContentHook as $hook) {
                                $params = array();
-                               $theOutput .= \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($hook, $params, $this);
+                               $theOutput .= GeneralUtility::callUserFunction($hook, $params, $this);
                        }
                }
                return $theOutput;
index 83cce45..f5f7914 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Frontend\Controller;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Resource\ResourceFactory;
 use TYPO3\CMS\Core\Utility\HttpUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
@@ -134,9 +135,9 @@ EOF;
 
                try {
                        if (MathUtility::canBeInterpretedAsInteger($fileUid)) {
-                               $this->file = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->getFileObject((int)$fileUid);
+                               $this->file = ResourceFactory::getInstance()->getFileObject((int)$fileUid);
                        } else {
-                               $this->file = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($fileUid);
+                               $this->file = ResourceFactory::getInstance()->retrieveFileOrFolderObject($fileUid);
                        }
                } catch (\TYPO3\CMS\Core\Exception $e) {
                        HttpUtility::setResponseCodeAndExit(HttpUtility::HTTP_STATUS_404);
index 1d1cadb..18be7fa 100644 (file)
@@ -14,8 +14,10 @@ namespace TYPO3\CMS\Frontend\Controller;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Backend\Tree\View\PageTreeView;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
  * Class for displaying translation status of pages in the tree.
@@ -71,7 +73,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                        $treeStartingRecord = BackendUtility::getRecordWSOL('pages', $treeStartingPoint);
                        $depth = $this->pObj->MOD_SETTINGS['depth'];
                        // Initialize tree object:
-                       $tree = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Tree\View\PageTreeView::class);
+                       $tree = GeneralUtility::makeInstance(PageTreeView::class);
                        $tree->init('AND ' . $this->getBackendUser()->getPagePermsClause(1));
                        $tree->addField('l18n_cfg');
                        // Creating top icon; the current page
@@ -115,9 +117,9 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                                '<a href="#" onclick="' . htmlspecialchars(
                                        'top.loadEditId(' . (int)$data['row']['uid'] . ',"&SET[language]=0"); return false;'
                                ) . '" title="' . $lang->sL('LLL:EXT:cms/web_info/locallang.xlf:lang_renderl10n_editPage') . '">' .
-                               htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($data['row']['title'], $titleLen)) .
+                               htmlspecialchars(GeneralUtility::fixed_lgd_cs($data['row']['title'], $titleLen)) .
                                '</a>' .
-                               ((string)$data['row']['nav_title'] !== '' ? ' [Nav: <em>' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($data['row']['nav_title'], $titleLen)) . '</em>]' : '') .
+                               ((string)$data['row']['nav_title'] !== '' ? ' [Nav: <em>' . htmlspecialchars(GeneralUtility::fixed_lgd_cs($data['row']['nav_title'], $titleLen)) . '</em>]' : '') .
                                '</td>';
                        // DEFAULT language:
                        // "View page" link is created:
@@ -138,14 +140,14 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                        $info .= str_replace('###LANG_UID###', '0', $viewPageLink);
                        $info .= '&nbsp;';
                        $info .= $data['row']['l18n_cfg'] & 1 ? '<span title="' . $lang->sL('LLL:EXT:cms/locallang_tca.xlf:pages.l18n_cfg.I.1', TRUE) . '">D</span>' : '&nbsp;';
-                       $info .= \TYPO3\CMS\Core\Utility\GeneralUtility::hideIfNotTranslated($data['row']['l18n_cfg']) ? '<span title="' . $lang->sL('LLL:EXT:cms/locallang_tca.xlf:pages.l18n_cfg.I.2', TRUE) . '">N</span>' : '&nbsp;';
+                       $info .= GeneralUtility::hideIfNotTranslated($data['row']['l18n_cfg']) ? '<span title="' . $lang->sL('LLL:EXT:cms/locallang_tca.xlf:pages.l18n_cfg.I.2', TRUE) . '">N</span>' : '&nbsp;';
                        // Put into cell:
                        $tCells[] = '<td class="' . $status . ' col-border-left">' . $info . '</td>';
                        $tCells[] = '<td class="' . $status . '" title="' . $lang->sL(
                                        'LLL:EXT:cms/web_info/locallang.xlf:lang_renderl10n_CEcount'
                                ) . '" align="center">' . $this->getContentElementCount($data['row']['uid'], 0) . '</td>';
                        $modSharedTSconfig = BackendUtility::getModTSconfig($data['row']['uid'], 'mod.SHARED');
-                       $disableLanguages = isset($modSharedTSconfig['properties']['disableLanguages']) ? \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $modSharedTSconfig['properties']['disableLanguages'], TRUE) : array();
+                       $disableLanguages = isset($modSharedTSconfig['properties']['disableLanguages']) ? GeneralUtility::trimExplode(',', $modSharedTSconfig['properties']['disableLanguages'], TRUE) : array();
                        // Traverse system languages:
                        foreach ($languages as $langRow) {
                                if ($this->pObj->MOD_SETTINGS['lang'] == 0 || (int)$this->pObj->MOD_SETTINGS['lang'] === (int)$langRow['uid']) {
@@ -153,16 +155,16 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                                        $info = '';
                                        if (is_array($row)) {
                                                $langRecUids[$langRow['uid']][] = $row['uid'];
-                                               $status = $row['_HIDDEN'] ? (\TYPO3\CMS\Core\Utility\GeneralUtility::hideIfNotTranslated($data['row']['l18n_cfg']) || $data['row']['l18n_cfg'] & 1 ? 'danger' : '') : 'success';
+                                               $status = $row['_HIDDEN'] ? (GeneralUtility::hideIfNotTranslated($data['row']['l18n_cfg']) || $data['row']['l18n_cfg'] & 1 ? 'danger' : '') : 'success';
                                                $icon = IconUtility::getSpriteIconForRecord(
                                                        'pages_language_overlay',
                                                        $row,
                                                        array('class' => 'c-recIcon')
                                                );
                                                $info = $icon . htmlspecialchars(
-                                                               \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($row['title'], $titleLen)
+                                                               GeneralUtility::fixed_lgd_cs($row['title'], $titleLen)
                                                        ) . ((string)$row['nav_title'] !== '' ? ' [Nav: <em>' . htmlspecialchars(
-                                                               \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($row['nav_title'], $titleLen)
+                                                               GeneralUtility::fixed_lgd_cs($row['nav_title'], $titleLen)
                                                        ) . '</em>]' : '') . ($row['_COUNT'] > 1 ? '<div>' . $lang->sL(
                                                                'LLL:EXT:cms/web_info/locallang.xlf:lang_renderl10n_badThingThereAre'
                                                        ) . '</div>' : '');
@@ -192,7 +194,7 @@ class TranslationStatusController extends \TYPO3\CMS\Backend\Module\AbstractFunc
                                                        $status = 'danger';
                                                        $info = '';
                                                } else {
-                                                       $status = \TYPO3\CMS\Core\Utility\GeneralUtility::hideIfNotTranslated($data['row']['l18n_cfg']) || $data['row']['l18n_cfg'] & 1 ? 'danger' : '';
+                                                       $status = GeneralUtility::hideIfNotTranslated($data['row']['l18n_cfg']) || $data['row']['l18n_cfg'] & 1 ? 'danger' : '';
                                                        $info = '<input type="checkbox" name="newOL[' . $langRow['uid'] . '][' . $data['row']['uid'] . ']" value="1" />';
                                                        $newOL_js[$langRow['uid']] .= '
                                                                +(document.webinfoForm[\'newOL[' . $langRow['uid'] . '][' . $data['row']['uid'] . ']\'].checked ? \'&edit[pages_language_overlay][' . $data['row']['uid'] . ']=new\' : \'\')
index a030108..166f25a 100644 (file)
@@ -14,11 +14,29 @@ namespace TYPO3\CMS\Frontend\Controller;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Backend\FrontendBackendUserAuthentication;
+use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
+use TYPO3\CMS\Core\Cache\CacheManager;
+use TYPO3\CMS\Core\Charset\CharsetConverter;
 use TYPO3\CMS\Core\Error\Http\PageNotFoundException;
+use TYPO3\CMS\Core\Error\Http\ServiceUnavailableException;
+use TYPO3\CMS\Core\Localization\Locales;
+use TYPO3\CMS\Core\Locking\Locker;
+use TYPO3\CMS\Core\Messaging\ErrorpageMessage;
+use TYPO3\CMS\Core\Page\PageRenderer;
+use TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser;
+use TYPO3\CMS\Core\TypoScript\TemplateService;
+use TYPO3\CMS\Core\Utility\ArrayUtility;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\HttpUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
+use TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication;
+use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
+use TYPO3\CMS\Frontend\Page\CacheHashCalculator;
+use TYPO3\CMS\Frontend\Page\PageGenerator;
 use TYPO3\CMS\Frontend\Page\PageRepository;
+use TYPO3\CMS\Frontend\View\AdminPanelView;
 
 /**
  * Class for the built TypoScript based frontend. Instantiated in
@@ -160,7 +178,7 @@ class TypoScriptFrontendController {
        /**
         * The frontend user
         *
-        * @var \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication
+        * @var FrontendUserAuthentication
         */
        public $fe_user = '';
 
@@ -257,7 +275,7 @@ class TypoScriptFrontendController {
        /**
         * The TypoScript template object. Used to parse the TypoScript template
         *
-        * @var \TYPO3\CMS\Core\TypoScript\TemplateService
+        * @var TemplateService
         */
        public $tmpl = NULL;
 
@@ -684,7 +702,7 @@ class TypoScriptFrontendController {
        /**
         * Page content render object
         *
-        * @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
+        * @var ContentObjectRenderer
         */
        public $cObj = '';
 
@@ -709,7 +727,7 @@ class TypoScriptFrontendController {
         * Character set (charset) conversion object:
         * charset conversion class. May be used by any application.
         *
-        * @var \TYPO3\CMS\Core\Charset\CharsetConverter
+        * @var CharsetConverter
         */
        public $csConvObj;
 
@@ -767,19 +785,19 @@ class TypoScriptFrontendController {
        /**
         * Locking object for accessing "cache_pagesection"
         *
-        * @var \TYPO3\CMS\Core\Locking\Locker
+        * @var Locker
         */
        public $pagesection_lockObj;
 
        /**
         * Locking object for accessing "cache_pages"
         *
-        * @var \TYPO3\CMS\Core\Locking\Locker
+        * @var Locker
         */
        public $pages_lockObj;
 
        /**
-        * @var \TYPO3\CMS\Core\Page\PageRenderer
+        * @var PageRenderer
         */
        protected $pageRenderer;
 
@@ -797,7 +815,9 @@ class TypoScriptFrontendController {
        protected $pageCacheTags = array();
 
        /**
-        * @var \TYPO3\CMS\Frontend\Page\CacheHashCalculator The cHash Service class used for cHash related functionality
+        * The cHash Service class used for cHash related functionality
+        *
+        * @var CacheHashCalculator
         */
        protected $cacheHash;
 
@@ -870,7 +890,7 @@ class TypoScriptFrontendController {
                $this->RDCT = $RDCT;
                $this->clientInfo = GeneralUtility::clientInfo();
                $this->uniqueString = md5(microtime());
-               $this->csConvObj = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Charset\CharsetConverter::class);
+               $this->csConvObj = GeneralUtility::makeInstance(CharsetConverter::class);
                // Call post processing function for constructor:
                if (is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['tslib_fe-PostProc'])) {
                        $_params = array('pObj' => &$this);
@@ -878,7 +898,7 @@ class TypoScriptFrontendController {
                                GeneralUtility::callUserFunction($_funcRef, $_params, $this);
                        }
                }
-               $this->cacheHash = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Page\CacheHashCalculator::class);
+               $this->cacheHash = GeneralUtility::makeInstance(CacheHashCalculator::class);
                $this->initCaches();
        }
 
@@ -895,7 +915,7 @@ class TypoScriptFrontendController {
         * or some JavaScript redirecting to the install tool.
         *
         * @throws \RuntimeException
-        * @throws \TYPO3\CMS\Core\Error\Http\ServiceUnavailableException
+        * @throws ServiceUnavailableException
         * @return void
         */
        public function connectToDB() {
@@ -910,7 +930,7 @@ class TypoScriptFrontendController {
                                                $this->pageUnavailableAndExit($message);
                                        } else {
                                                GeneralUtility::sysLog($message, 'cms', GeneralUtility::SYSLOG_SEVERITY_ERROR);
-                                               throw new \TYPO3\CMS\Core\Error\Http\ServiceUnavailableException($message, 1301648782);
+                                               throw new ServiceUnavailableException($message, 1301648782);
                                        }
                                        break;
                                case 1270853884:
@@ -920,7 +940,7 @@ class TypoScriptFrontendController {
                                                $this->pageUnavailableAndExit($message);
                                        } else {
                                                GeneralUtility::sysLog($message, 'cms', GeneralUtility::SYSLOG_SEVERITY_ERROR);
-                                               throw new \TYPO3\CMS\Core\Error\Http\ServiceUnavailableException('Database Error: ' . $message, 1301648945);
+                                               throw new ServiceUnavailableException('Database Error: ' . $message, 1301648945);
                                        }
                                        break;
                                default:
@@ -958,11 +978,11 @@ class TypoScriptFrontendController {
        /**
         * Gets instance of PageRenderer
         *
-        * @return \TYPO3\CMS\Core\Page\PageRenderer
+        * @return PageRenderer
         */
        public function getPageRenderer() {
                if (!isset($this->pageRenderer)) {
-                       $this->pageRenderer = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class);
+                       $this->pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
                        $this->pageRenderer->setTemplateFile('EXT:frontend/Resources/Private/Templates/MainPage.html');
                        $this->pageRenderer->setBackPath(TYPO3_mainDir);
                }
@@ -972,9 +992,9 @@ class TypoScriptFrontendController {
        /**
         * This is needed for USER_INT processing
         *
-        * @param \TYPO3\CMS\Core\Page\PageRenderer $pageRenderer
+        * @param PageRenderer $pageRenderer
         */
-       protected function setPageRenderer(\TYPO3\CMS\Core\Page\PageRenderer $pageRenderer) {
+       protected function setPageRenderer(PageRenderer $pageRenderer) {
                $this->pageRenderer = $pageRenderer;
        }
 
@@ -989,7 +1009,7 @@ class TypoScriptFrontendController {
         * @return void
         */
        protected function initCaches() {
-               $this->pageCache = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Cache\CacheManager::class)->getCache('cache_pages');
+               $this->pageCache = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_pages');
        }
 
        /**
@@ -998,7 +1018,7 @@ class TypoScriptFrontendController {
         * @return void
         */
        public function initFEuser() {
-               $this->fe_user = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::class);
+               $this->fe_user = GeneralUtility::makeInstance(FrontendUserAuthentication::class);
                $this->fe_user->lockIP = $this->TYPO3_CONF_VARS['FE']['lockIP'];
                $this->fe_user->checkPid = $this->TYPO3_CONF_VARS['FE']['checkFeUserPid'];
                $this->fe_user->lifetime = (int)$this->TYPO3_CONF_VARS['FE']['lifetime'];
@@ -1010,7 +1030,7 @@ class TypoScriptFrontendController {
                        $fe_sParts = explode('-', GeneralUtility::_GP('FE_SESSION_KEY'));
                        // If the session key hash check is OK:
                        if (md5(($fe_sParts[0] . '/' . $this->TYPO3_CONF_VARS['SYS']['encryptionKey'])) === (string)$fe_sParts[1]) {
-                               $cookieName = \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::getCookieName();
+                               $cookieName = FrontendUserAuthentication::getCookieName();
                                $_COOKIE[$cookieName] = $fe_sParts[0];
                                if (isset($_SERVER['HTTP_COOKIE'])) {
                                        // See http://forge.typo3.org/issues/27740
@@ -1140,7 +1160,7 @@ class TypoScriptFrontendController {
        /**
         * Creates the backend user object and returns it.
         *
-        * @return \TYPO3\CMS\Backend\FrontendBackendUserAuthentication the backend user object
+        * @return FrontendBackendUserAuthentication the backend user object
         */
        public function initializeBackendUser() {
                // PRE BE_USER HOOK
@@ -1150,11 +1170,11 @@ class TypoScriptFrontendController {
                                GeneralUtility::callUserFunction($_funcRef, $_params, $this);
                        }
                }
-               /** @var $BE_USER \TYPO3\CMS\Backend\FrontendBackendUserAuthentication */
+               /** @var $BE_USER FrontendBackendUserAuthentication */
                $BE_USER = NULL;
                // If the backend cookie is set,
                // we proceed and check if a backend user is logged in.
-               if ($_COOKIE[\TYPO3\CMS\Core\Authentication\BackendUserAuthentication::getCookieName()]) {
+               if ($_COOKIE[BackendUserAuthentication::getCookieName()]) {
                        $GLOBALS['TYPO3_MISC']['microtime_BE_USER_start'] = microtime(TRUE);
                        $GLOBALS['TT']->push('Back End user initialized', '');
                        // @todo validate the comment below: is this necessary? if so,
@@ -1164,7 +1184,7 @@ class TypoScriptFrontendController {
                        // the value this->formfield_status is set to empty in order to
                        // disable login-attempts to the backend account through this script
                        // New backend user object
-                       $BE_USER = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\FrontendBackendUserAuthentication::class);
+                       $BE_USER = GeneralUtility::makeInstance(FrontendBackendUserAuthentication::class);
                        $BE_USER->lockIP = $this->TYPO3_CONF_VARS['BE']['lockIP'];
                        // Object is initialized
                        $BE_USER->start();
@@ -1214,7 +1234,7 @@ class TypoScriptFrontendController {
                $originalFrontendUser = NULL;
                if ($this->beUserLogin || $this->doWorkspacePreview()) {
                        // Backend user preview features:
-                       if ($this->beUserLogin && $GLOBALS['BE_USER']->adminPanel instanceof \TYPO3\CMS\Frontend\View\AdminPanelView) {
+                       if ($this->beUserLogin && $GLOBALS['BE_USER']->adminPanel instanceof AdminPanelView) {
                                $this->fePreview = (bool)$GLOBALS['BE_USER']->adminPanel->extGetFeAdminValue('preview');
                                // If admin panel preview is enabled...
                                if ($this->fePreview) {
@@ -1351,7 +1371,7 @@ class TypoScriptFrontendController {
         * This gets the id of the page, checks if the page is in the domain and if the page is accessible
         * Sets variables such as $this->sys_page, $this->loginUser, $this->gr_list, $this->id, $this->type, $this->domainStartPage
         *
-        * @throws \TYPO3\CMS\Core\Error\Http\ServiceUnavailableException
+        * @throws ServiceUnavailableException
         * @return void
         * @access private
         */
@@ -1399,7 +1419,7 @@ class TypoScriptFrontendController {
                                                $this->pageUnavailableAndExit($message);
                                        } else {
                                                GeneralUtility::sysLog($message, 'cms', GeneralUtility::SYSLOG_SEVERITY_ERROR);
-                                               throw new \TYPO3\CMS\Core\Error\Http\ServiceUnavailableException($message, 1301648975);
+                                               throw new ServiceUnavailableException($message, 1301648975);
                                        }
                                }
                        }
@@ -1463,7 +1483,7 @@ class TypoScriptFrontendController {
         *
         * Sets or manipulates internal variables such as: $this->id, $this->page, $this->rootLine, $this->MP, $this->pageNotFound
         *
-        * @throws \TYPO3\CMS\Core\Error\Http\ServiceUnavailableException
+        * @throws ServiceUnavailableException
         * @throws PageNotFoundException
         * @return void
         * @access private
@@ -1553,7 +1573,7 @@ class TypoScriptFrontendController {
                                } else {
                                        $rootline = '(' . $this->sys_page->error_getRootLine . ')';
                                        GeneralUtility::sysLog($message, 'cms', GeneralUtility::SYSLOG_SEVERITY_ERROR);
-                                       throw new \TYPO3\CMS\Core\Error\Http\ServiceUnavailableException($message . '<br /><br />' . $rootline, 1301648167);
+                                       throw new ServiceUnavailableException($message . '<br /><br />' . $rootline, 1301648167);
                                }
                        }
                        $this->fePreview = 1;
@@ -1566,7 +1586,7 @@ class TypoScriptFrontendController {
                                        $this->pageUnavailableAndExit($message);
                                } else {
                                        GeneralUtility::sysLog($message, 'cms', GeneralUtility::SYSLOG_SEVERITY_ERROR);
-                                       throw new \TYPO3\CMS\Core\Error\Http\ServiceUnavailableException($message, 1301648234);
+                                       throw new ServiceUnavailableException($message, 1301648234);
                                }
                        } else {
                                $el = reset($this->rootLine);
@@ -1978,7 +1998,7 @@ class TypoScriptFrontendController {
                if (gettype($code) == 'boolean' || (string)$code === '1') {
                        $title = 'Page Not Found';
                        $message = 'The page did not exist or was inaccessible.' . ($reason ? ' Reason: ' . htmlspecialchars($reason) : '');
-                       $messagePage = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\ErrorpageMessage::class, $message, $title);
+                       $messagePage = GeneralUtility::makeInstance(ErrorpageMessage::class, $message, $title);
                        $messagePage->output();
                        die;
                } elseif (GeneralUtility::isFirstPartOfStr($code, 'USER_FUNCTION:')) {
@@ -2086,7 +2106,7 @@ class TypoScriptFrontendController {
                } else {
                        $title = 'Page Not Found';
                        $message = $reason ? 'Reason: ' . htmlspecialchars($reason) : 'Page cannot be found.';
-                       $messagePage = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\ErrorpageMessage::class, $message, $title);
+                       $messagePage = GeneralUtility::makeInstance(ErrorpageMessage::class, $message, $title);
                        $messagePage->output();
                }
                die;
@@ -2124,7 +2144,7 @@ class TypoScriptFrontendController {
                                $realGet = array();
                        }
                        // Merge new values on top:
-                       \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($realGet, $GET_VARS);
+                       ArrayUtility::mergeRecursiveWithOverrule($realGet, $GET_VARS);
                        // Write values back to $_GET:
                        GeneralUtility::_GETset($realGet);
                        // Setting these specifically (like in the init-function):
@@ -2212,7 +2232,7 @@ class TypoScriptFrontendController {
         * @return void
         */
        public function initTemplate() {
-               $this->tmpl = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\TemplateService::class);
+               $this->tmpl = GeneralUtility::makeInstance(TemplateService::class);
                $this->tmpl->setVerbose((bool)$this->beUserLogin);
                $this->tmpl->init();
                $this->tmpl->tt_track = (bool)$this->beUserLogin;
@@ -2412,7 +2432,7 @@ class TypoScriptFrontendController {
        /**
         * Checks if config-array exists already but if not, gets it
         *
-        * @throws \TYPO3\CMS\Core\Error\Http\ServiceUnavailableException
+        * @throws ServiceUnavailableException
         * @return void
         */
        public function getConfigArray() {
@@ -2437,7 +2457,7 @@ class TypoScriptFrontendController {
                                        } else {
                                                $explanation = 'This means that there is no TypoScript object of type PAGE with typeNum=' . $this->type . ' configured.';
                                                GeneralUtility::sysLog($message, 'cms', GeneralUtility::SYSLOG_SEVERITY_ERROR);
-                                               throw new \TYPO3\CMS\Core\Error\Http\ServiceUnavailableException($message . ' ' . $explanation, 1294587217);
+                                               throw new ServiceUnavailableException($message . ' ' . $explanation, 1294587217);
                                        }
                                } else {
                                        $this->config['config'] = array();
@@ -2447,7 +2467,7 @@ class TypoScriptFrontendController {
                                        }
                                        // override it with the page/type-specific "config."
                                        if (is_array($this->pSetup['config.'])) {
-                                               \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($this->config['config'], $this->pSetup['config.']);
+                                               ArrayUtility::mergeRecursiveWithOverrule($this->config['config'], $this->pSetup['config.']);
                                        }
                                        if ($this->config['config']['typolinkEnableLinksAcrossDomains']) {
                                                $this->config['config']['typolinkCheckRootline'] = TRUE;
@@ -2482,7 +2502,7 @@ class TypoScriptFrontendController {
                                } else {
                                        $message = 'No TypoScript template found!';
                                        GeneralUtility::sysLog($message, 'cms', GeneralUtility::SYSLOG_SEVERITY_ERROR);
-                                       throw new \TYPO3\CMS\Core\Error\Http\ServiceUnavailableException($message, 1294587218);
+                                       throw new ServiceUnavailableException($message, 1294587218);
                                }
                        }
                }
@@ -2495,7 +2515,7 @@ class TypoScriptFrontendController {
                // Merge GET with defaultGetVars
                if (!empty($this->config['config']['defaultGetVars.'])) {
                        $modifiedGetVars = GeneralUtility::removeDotsFromTS($this->config['config']['defaultGetVars.']);
-                       \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($modifiedGetVars, GeneralUtility::_GET());
+                       ArrayUtility::mergeRecursiveWithOverrule($modifiedGetVars, GeneralUtility::_GET());
                        GeneralUtility::_GETset($modifiedGetVars);
                }
                // Hook for postProcessing the configuration array
@@ -2599,7 +2619,7 @@ class TypoScriptFrontendController {
                        if (is_array($sys_language_row)) {
                                if (!empty($sys_language_row['language_isocode'])) {
                                        $this->sys_language_isocode = $sys_language_row['language_isocode'];
-                               } elseif ($sys_language_row['static_lang_isocode'] && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables')) {
+                               } elseif ($sys_language_row['static_lang_isocode'] && ExtensionManagementUtility::isLoaded('static_info_tables')) {
                                        GeneralUtility::deprecationLog('Usage of the field "static_lang_isocode" is discouraged, and will stop working with CMS 8. Use the built-in language field "language_isocode" in your sys_language records.');
                                        $stLrow = $this->sys_page->getRawRecord('static_languages', $sys_language_row['static_lang_isocode'], 'lg_iso_2', TRUE);
                                        $this->sys_language_isocode = $stLrow['lg_iso_2'];
@@ -2897,7 +2917,7 @@ class TypoScriptFrontendController {
                        }
                        if (!is_array($getData[$linkVar])) {
                                $temp = rawurlencode($getData[$linkVar]);
-                               if ($test !== '' && !\TYPO3\CMS\Frontend\Page\PageGenerator::isAllowedLinkVarValue($temp, $test)) {
+                               if ($test !== '' && !PageGenerator::isAllowedLinkVarValue($temp, $test)) {
                                        // Error: This value was not allowed for this key
                                        continue;
                                }
@@ -2950,8 +2970,8 @@ class TypoScriptFrontendController {
        protected function redirectToCurrentPage() {
                $this->calculateLinkVars();
                // Instantiate \TYPO3\CMS\Frontend\ContentObject to generate the correct target URL
-               /** @var $cObj \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer */
-               $cObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+               /** @var $cObj ContentObjectRenderer */
+               $cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
                $parameter = $this->page['uid'];
                $type = GeneralUtility::_GET('type');
                if ($type && MathUtility::canBeInterpretedAsInteger($type)) {
@@ -3130,7 +3150,7 @@ class TypoScriptFrontendController {
         * Setting the SYS_LASTCHANGED value in the pagerecord: This value will thus be set to the highest tstamp of records rendered on the page. This includes all records with no regard to hidden records, userprotection and so on.
         *
         * @return void
-        * @see \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::lastChanged()
+        * @see ContentObjectRenderer::lastChanged()
         */
        public function setSysLastChanged() {
                if ($this->page['SYS_LASTCHANGED'] < (int)$this->register['SYS_LASTCHANGED']) {
@@ -3142,7 +3162,7 @@ class TypoScriptFrontendController {
         * Lock the page generation process
         * The lock is used to queue page requests until this page is successfully stored in the cache.
         *
-        * @param \TYPO3\CMS\Core\Locking\Locker $lockObj Reference to a locking object
+        * @param Locker $lockObj Reference to a locking object
         * @param string $key String to identify the lock in the system
         * @return bool Returns TRUE if the lock could be obtained, FALSE otherwise (= process had to wait for existing lock to be released)
         * @see releasePageGenerationLock()
@@ -3155,7 +3175,7 @@ class TypoScriptFrontendController {
                }
                try {
                        if (!is_object($lockObj)) {
-                               $lockObj = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Locking\Locker::class, $key, $this->TYPO3_CONF_VARS['SYS']['lockingMode']);
+                               $lockObj = GeneralUtility::makeInstance(Locker::class, $key, $this->TYPO3_CONF_VARS['SYS']['lockingMode']);
                        }
                        $success = FALSE;
                        if ($key !== '') {
@@ -3177,14 +3197,14 @@ class TypoScriptFrontendController {
        /**
         * Release the page generation lock
         *
-        * @param \TYPO3\CMS\Core\Locking\Locker $lockObj Reference to a locking object
+        * @param Locker $lockObj Reference to a locking object
         * @return bool Returns TRUE on success, FALSE otherwise
         * @see acquirePageGenerationLock()
         */
        public function releasePageGenerationLock(&$lockObj) {
                $success = FALSE;
                // If lock object is set and was acquired (may also happen if no_cache was enabled during runtime), release it:
-               if (is_object($lockObj) && $lockObj instanceof \TYPO3\CMS\Core\Locking\Locker && $lockObj->getLockStatus()) {
+               if (is_object($lockObj) && $lockObj instanceof Locker && $lockObj->getLockStatus()) {
                        $success = $lockObj->release();
                        $lockObj->sysLog('Released lock');
                        $lockObj = NULL;
@@ -3311,7 +3331,7 @@ class TypoScriptFrontendController {
         * @return void
         */
        protected function regeneratePageTitle() {
-               \TYPO3\CMS\Frontend\Page\PageGenerator::generatePageTitle();
+               PageGenerator::generatePageTitle();
        }
 
        /**
@@ -3407,7 +3427,7 @@ class TypoScriptFrontendController {
                                        $GLOBALS['TT']->push('Include ' . $INTiS_config[$INTiS_key]['file'], '');
                                        $incContent = '';
                                        $INTiS_cObj = unserialize($INTiS_config[$INTiS_key]['cObj']);
-                                       /* @var $INTiS_cObj \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer */
+                                       /* @var $INTiS_cObj ContentObjectRenderer */
                                        $INTiS_cObj->INT_include = 1;
                                        switch ($INTiS_config[$INTiS_key]['type']) {
                                                case 'COA':
@@ -3870,7 +3890,7 @@ class TypoScriptFrontendController {
         * @see pagegen.php
         */
        public function newCObj() {
-               $this->cObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+               $this->cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
                $this->cObj->start($this->page, 'pages');
        }
 
@@ -4011,7 +4031,7 @@ class TypoScriptFrontendController {
                        return FALSE;
                }
                if ($returnTitle) {
-                       if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('workspaces')) {
+                       if (ExtensionManagementUtility::isLoaded('workspaces')) {
                                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('title', 'sys_workspace', 'uid=' . (int)$ws);
                                if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                        return $row['title'];
@@ -4084,14 +4104,14 @@ class TypoScriptFrontendController {
                                $TSdataArray[] = $v['TSconfig'];
                        }
                        // Parsing the user TS (or getting from cache)
-                       $TSdataArray = \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::checkIncludeLines_array($TSdataArray);
+                       $TSdataArray = TypoScriptParser::checkIncludeLines_array($TSdataArray);
                        $userTS = implode(LF . '[GLOBAL]' . LF, $TSdataArray);
                        $hash = md5('pageTS:' . $userTS);
                        $cachedContent = $this->sys_page->getHash($hash);
                        if (is_array($cachedContent)) {
                                $this->pagesTSconfig = $cachedContent;
                        } else {
-                               $parseObj = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::class);
+                               $parseObj = GeneralUtility::makeInstance(TypoScriptParser::class);
                                $parseObj->parse($userTS);
                                $this->pagesTSconfig = $parseObj->setup;
                                $this->sys_page->storeHash($hash, $this->pagesTSconfig, 'PAGES_TSconfig');
@@ -4106,7 +4126,7 @@ class TypoScriptFrontendController {
         * @param string $key is the key in the array, for num-key let the value be empty. Note reserved keys 'openPic' and 'mouseOver'
         * @param string $content is the content if you want any
         * @return void
-        * @see \TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject::writeMenu(), \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::imageLinkWrap()
+        * @see \TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject::writeMenu(), ContentObjectRenderer::imageLinkWrap()
         */
        public function setJS($key, $content = '') {
                if ($key) {
@@ -4229,7 +4249,7 @@ class TypoScriptFrontendController {
         */
        public function get_cache_timeout() {
                /** @var $runtimeCache \TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend */
-               $runtimeCache = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Cache\CacheManager::class)->getCache('cache_runtime');
+               $runtimeCache = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_runtime');
                $cachedCacheLifetimeIdentifier = 'core-tslib_fe-get_cache_timeout';
                $cachedCacheLifetime = $runtimeCache->get($cachedCacheLifetimeIdentifier);
                if ($cachedCacheLifetime === FALSE) {
@@ -4350,7 +4370,7 @@ class TypoScriptFrontendController {
                        if ($this->lang !== 'default' && isset($tempLL[$language])) {
                                // Merge current language labels onto labels from previous language
                                // This way we have a label with fall back applied
-                               \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($localLanguage[$this->lang], $tempLL[$language], TRUE, FALSE);
+                               ArrayUtility::mergeRecursiveWithOverrule($localLanguage[$this->lang], $tempLL[$language], TRUE, FALSE);
                        }
                }
 
@@ -4387,8 +4407,8 @@ class TypoScriptFrontendController {
 
                // Finding the requested language in this list based
                // on the $lang key being inputted to this function.
-               /** @var $locales \TYPO3\CMS\Core\Localization\Locales */
-               $locales = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Localization\Locales::class);
+               /** @var $locales Locales */
+               $locales = GeneralUtility::makeInstance(Locales::class);
                $locales->initialize();
 
                // Language is found. Configure it:
@@ -4414,7 +4434,7 @@ class TypoScriptFrontendController {
         * @param string $str String to convert charset for
         * @param string $from Optional "from" charset.
         * @return string Output string, converted if needed.
-        * @see \TYPO3\CMS\Core\Charset\CharsetConverter
+        * @see CharsetConverter
         */
        public function csConv($str, $from = '') {
                if ($from) {
@@ -4542,7 +4562,7 @@ class TypoScriptFrontendController {
        protected function getSysDomainCache() {
                $entryIdentifier = 'core-database-sys_domain-complete';
                /** @var $runtimeCache \TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend */
-               $runtimeCache = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Cache\CacheManager::class)->getCache('cache_runtime');
+               $runtimeCache = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_runtime');
 
                $sysDomainData = array();
                if ($runtimeCache->has($entryIdentifier)) {
index fc4910a..febae47 100644 (file)
@@ -15,6 +15,8 @@ namespace TYPO3\CMS\Frontend;
  */
 
 use TYPO3\CMS\Core\Core\Bootstrap;
+use TYPO3\CMS\Core\TimeTracker\NullTimeTracker;
+use TYPO3\CMS\Core\TimeTracker\TimeTracker;
 use TYPO3\CMS\Frontend\Utility\EidUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Core\RequestHandlerInterface;
@@ -52,9 +54,9 @@ class EidRequestHandler implements RequestHandlerInterface {
                        $configuredCookieName = 'be_typo_user';
                }
                if ($_COOKIE[$configuredCookieName]) {
-                       $GLOBALS['TT'] = new \TYPO3\CMS\Core\TimeTracker\TimeTracker();
+                       $GLOBALS['TT'] = new TimeTracker();
                } else {
-                       $GLOBALS['TT'] = new \TYPO3\CMS\Core\TimeTracker\NullTimeTracker();
+                       $GLOBALS['TT'] = new NullTimeTracker();
                }
 
                $GLOBALS['TT']->start();
index c3bb333..f1887a0 100644 (file)
@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Frontend\Hooks;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Adds extra fields into 'media' flexform
  */
@@ -29,7 +31,7 @@ class MediaItemHooks implements \TYPO3\CMS\Core\SingletonInterface {
        public function customMediaRenderTypes(&$params, $conf) {
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/hooks/class.tx_cms_mediaitems.php']['customMediaRenderTypes'])) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/hooks/class.tx_cms_mediaitems.php']['customMediaRenderTypes'] as $classRef) {
-                               $hookObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classRef);
+                               $hookObj = GeneralUtility::getUserObj($classRef);
                                $hookObj->customMediaRenderTypes($params, $conf);
                        }
                }
@@ -45,7 +47,7 @@ class MediaItemHooks implements \TYPO3\CMS\Core\SingletonInterface {
        public function customMediaParams(&$params, $conf) {
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/hooks/class.tx_cms_mediaitems.php']['customMediaParams'])) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/hooks/class.tx_cms_mediaitems.php']['customMediaParams'] as $classRef) {
-                               $hookObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classRef);
+                               $hookObj = GeneralUtility::getUserObj($classRef);
                                $hookObj->customMediaParams($params, $conf);
                        }
                }
index 2b36747..24c98d7 100644 (file)
@@ -15,6 +15,8 @@ namespace TYPO3\CMS\Frontend\Hooks;
  */
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\DataHandling\DataHandler;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
  * Class that hooks into TCEmain and listens for updates to pages to update the
@@ -50,7 +52,7 @@ class TreelistCacheUpdateHooks {
                // update of the treelist cache, too; so we also add those
                // example: $TYPO3_CONF_VARS['BE']['additionalTreelistUpdateFields'] .= ',my_field';
                if (!empty($GLOBALS['TYPO3_CONF_VARS']['BE']['additionalTreelistUpdateFields'])) {
-                       $additionalTreelistUpdateFields = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['BE']['additionalTreelistUpdateFields'], TRUE);
+                       $additionalTreelistUpdateFields = GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['BE']['additionalTreelistUpdateFields'], TRUE);
                        $this->updateRequiringFields = array_merge($this->updateRequiringFields, $additionalTreelistUpdateFields);
                }
        }
@@ -63,10 +65,10 @@ class TreelistCacheUpdateHooks {
         * @param string $table The DB table the operation was carried out on
         * @param mixed $recordId The record's uid for update records, a string to look the record's uid up after it has been created
         * @param array $updatedFields Array of changed fiels and their new values
-        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tceMain TCEmain parent object
+        * @param DataHandler $tceMain TCEmain parent object
         * @return void
         */
-       public function processDatamap_afterDatabaseOperations($status, $table, $recordId, array $updatedFields, \TYPO3\CMS\Core\DataHandling\DataHandler $tceMain) {
+       public function processDatamap_afterDatabaseOperations($status, $table, $recordId, array $updatedFields, DataHandler $tceMain) {
                if ($table == 'pages' && $this->requiresUpdate($updatedFields)) {
                        $affectedPagePid = 0;
                        $affectedPageUid = 0;
@@ -96,10 +98,10 @@ class TreelistCacheUpdateHooks {
         * @param string $table The record's table
         * @param int $recordId The record's uid
         * @param array $commandValue The commands value, typically an array with more detailed command information
-        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tceMain The TCEmain parent object
+        * @param DataHandler $tceMain The TCEmain parent object
         * @return void
         */
-       public function processCmdmap_postProcess($command, $table, $recordId, $commandValue, \TYPO3\CMS\Core\DataHandling\DataHandler $tceMain) {
+       public function processCmdmap_postProcess($command, $table, $recordId, $commandValue, DataHandler $tceMain) {
                if ($table == 'pages' && $command == 'delete') {
                        $deletedRecord = BackendUtility::getRecord($table, $recordId, '*', '', FALSE);
                        $affectedPageUid = $deletedRecord['uid'];
@@ -120,10 +122,10 @@ class TreelistCacheUpdateHooks {
         * @param int $destinationPid The record's destination page id
         * @param array $movedRecord The record that moved
         * @param array $updatedFields Array of changed fields
-        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tceMain TCEmain parent object
+        * @param DataHandler $tceMain TCEmain parent object
         * @return void
         */
-       public function moveRecord_firstElementPostProcess($table, $recordId, $destinationPid, array $movedRecord, array $updatedFields, \TYPO3\CMS\Core\DataHandling\DataHandler $tceMain) {
+       public function moveRecord_firstElementPostProcess($table, $recordId, $destinationPid, array $movedRecord, array $updatedFields, DataHandler $tceMain) {
                if ($table == 'pages' && $this->requiresUpdate($updatedFields)) {
                        $affectedPageUid = $recordId;
                        $affectedPageOldPid = $movedRecord['pid'];
@@ -146,10 +148,10 @@ class TreelistCacheUpdateHooks {
         * @param int $originalDestinationPid (negative) page id th page has been moved after
         * @param array $movedRecord The record that moved
         * @param array $updatedFields Array of changed fields
-        * @param \TYPO3\CMS\Core\DataHandling\DataHandler $tceMain TCEmain parent object
+        * @param DataHandler $tceMain TCEmain parent object
         * @return void
         */
-       public function moveRecord_afterAnotherElementPostProcess($table, $recordId, $destinationPid, $originalDestinationPid, array $movedRecord, array $updatedFields, \TYPO3\CMS\Core\DataHandling\DataHandler $tceMain) {
+       public function moveRecord_afterAnotherElementPostProcess($table, $recordId, $destinationPid, $originalDestinationPid, array $movedRecord, array $updatedFields, DataHandler $tceMain) {
                if ($table == 'pages' && $this->requiresUpdate($updatedFields)) {
                        $affectedPageUid = $recordId;
                        $affectedPageOldPid = $movedRecord['pid'];
index 92a2e4f..1cd5ba6 100644 (file)
@@ -14,7 +14,12 @@ namespace TYPO3\CMS\Frontend\Imaging;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Resource\File;
+use TYPO3\CMS\Core\Resource\ProcessedFile;
+use TYPO3\CMS\Core\TypoScript\TemplateService;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\MathUtility;
+use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
 
 /**
  * GIFBUILDER
@@ -132,13 +137,13 @@ class GifBuilder extends \TYPO3\CMS\Core\Imaging\GraphicalFunctions {
         * @param array $conf TypoScript properties for the GIFBUILDER session. Stored internally in the variable ->setup
         * @param array $data The current data record from \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer. Stored internally in the variable ->data
         * @return void
-        * @see \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getImgResource(), \TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject::makeGifs(), \TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject::findLargestDims()
+        * @see ContentObjectRenderer::getImgResource(), \TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject::makeGifs(), \TYPO3\CMS\Frontend\ContentObject\Menu\GraphicalMenuContentObject::findLargestDims()
         */
        public function start($conf, $data) {
                if (is_array($conf)) {
                        $this->setup = $conf;
                        $this->data = $data;
-                       $this->cObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+                       $this->cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
                        $this->cObj->start($this->data);
                        // Hook preprocess gifbuilder conf
                        // Added by Julle for 3.8.0
@@ -168,7 +173,7 @@ class GifBuilder extends \TYPO3\CMS\Core\Imaging\GraphicalFunctions {
                                }
                        }
                        // Getting sorted list of TypoScript keys from setup.
-                       $sKeyArray = \TYPO3\CMS\Core\TypoScript\TemplateService::sortedKeyList($this->setup);
+                       $sKeyArray = TemplateService::sortedKeyList($this->setup);
                        // Setting the background color, passing it through stdWrap
                        if ($conf['backColor.'] || $conf['backColor']) {
                                $this->setup['backColor'] = isset($this->setup['backColor.']) ? trim($this->cObj->stdWrap($this->setup['backColor'], $this->setup['backColor.'])) : $this->setup['backColor'];
@@ -217,10 +222,10 @@ class GifBuilder extends \TYPO3\CMS\Core\Imaging\GraphicalFunctions {
                                                        $fileInfo = $this->getResource($conf['file'], $conf['file.']);
                                                        if ($fileInfo) {
                                                                $this->combinedFileNames[] = preg_replace('/\\.[[:alnum:]]+$/', '', basename($fileInfo[3]));
-                                                               if ($fileInfo['processedFile'] instanceof \TYPO3\CMS\Core\Resource\ProcessedFile) {
+                                                               if ($fileInfo['processedFile'] instanceof ProcessedFile) {
                                                                        // Use processed file, if a FAL file has been processed by GIFBUILDER (e.g. scaled/cropped)
                                                                        $this->setup[$theKey . '.']['file'] = $fileInfo['processedFile']->getForLocalProcessing(FALSE);
-                                                               } elseif (!isset($fileInfo['origFile']) && $fileInfo['originalFile'] instanceof \TYPO3\CMS\Core\Resource\File) {
+                                                               } elseif (!isset($fileInfo['origFile']) && $fileInfo['originalFile'] instanceof File) {
                                                                        // Use FAL file with getForLocalProcessing to circumvent problems with umlauts, if it is a FAL file (origFile not set)
                                                                        $this->setup[$theKey . '.']['file'] = $fileInfo['originalFile']->getForLocalProcessing(FALSE);
                                                                } else {
@@ -233,9 +238,9 @@ class GifBuilder extends \TYPO3\CMS\Core\Imaging\GraphicalFunctions {
                                                                        $maskInfo = $this->getResource($conf['mask'], $conf['mask.']);
                                                                        if ($maskInfo) {
                                                                                // the same selection criteria as regarding fileInfo above apply here
-                                                                               if ($maskInfo['processedFile'] instanceof \TYPO3\CMS\Core\Resource\ProcessedFile) {
+                                                                               if ($maskInfo['processedFile'] instanceof ProcessedFile) {
                                                                                        $this->setup[$theKey . '.']['mask'] = $maskInfo['processedFile']->getForLocalProcessing(FALSE);
-                                                                               } elseif (!isset($maskInfo['origFile']) && $maskInfo['originalFile'] instanceof \TYPO3\CMS\Core\Resource\File) {
+                                                                               } elseif (!isset($maskInfo['origFile']) && $maskInfo['originalFile'] instanceof File) {
                                                                                        $this->setup[$theKey . '.']['mask'] = $maskInfo['originalFile']->getForLocalProcessing(FALSE);
                                                                                } else {
                                                                                        $this->setup[$theKey . '.']['mask'] = $maskInfo[3];
@@ -251,7 +256,7 @@ class GifBuilder extends \TYPO3\CMS\Core\Imaging\GraphicalFunctions {
                                        }
                                        // Checks if disabled is set... (this is also done in menu.php / imgmenu!!)
                                        if ($conf['if.']) {
-                                               $cObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+                                               $cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
                                                $cObj->start($this->data);
                                                if (!$cObj->checkIf($conf['if.'])) {
                                                        unset($this->setup[$theKey]);
@@ -332,8 +337,8 @@ class GifBuilder extends \TYPO3\CMS\Core\Imaging\GraphicalFunctions {
                        $XY = GeneralUtility::intExplode(',', $this->setup['XY']);
                        $maxWidth = isset($this->setup['maxWidth.']) ? (int)$this->cObj->stdWrap($this->setup['maxWidth'], $this->setup['maxWidth.']) : (int)$this->setup['maxWidth'];
                        $maxHeight = isset($this->setup['maxHeight.']) ? (int)$this->cObj->stdWrap($this->setup['maxHeight'], $this->setup['maxHeight.']) : (int)$this->setup['maxHeight'];
-                       $XY[0] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($XY[0], 1, $maxWidth ?: 2000);
-                       $XY[1] = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($XY[1], 1, $maxHeight ?: 2000);
+                       $XY[0] = MathUtility::forceIntegerInRange($XY[0], 1, $maxWidth ?: 2000);
+                       $XY[1] = MathUtility::forceIntegerInRange($XY[1], 1, $maxHeight ?: 2000);
                        $this->XY = $XY;
                        $this->w = $XY[0];
                        $this->h = $XY[1];
@@ -408,7 +413,7 @@ class GifBuilder extends \TYPO3\CMS\Core\Imaging\GraphicalFunctions {
                }
                // Traverse the GIFBUILDER objects an render each one:
                if (is_array($this->setup)) {
-                       $sKeyArray = \TYPO3\CMS\Core\TypoScript\TemplateService::sortedKeyList($this->setup);
+                       $sKeyArray = TemplateService::sortedKeyList($this->setup);
                        foreach ($sKeyArray as $theKey) {
                                $theValue = $this->setup[$theKey];
                                if ((int)$theKey && ($conf = $this->setup[$theKey . '.'])) {
@@ -555,7 +560,7 @@ class GifBuilder extends \TYPO3\CMS\Core\Imaging\GraphicalFunctions {
         * @access private
         */
        public function checkTextObj($conf) {
-               $cObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+               $cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
                $cObj->start($this->data);
                $isStdWrapped = array();
                foreach ($conf as $key => $value) {
@@ -671,14 +676,14 @@ class GifBuilder extends \TYPO3\CMS\Core\Imaging\GraphicalFunctions {
         * @param array $fileArray TypoScript properties passed to the function. Either GIFBUILDER properties or imgResource properties, depending on the value of $file (whether that is "GIFBUILDER" or a file reference)
         * @return array|NULL Returns an array with file information from ContentObjectRenderer::getImgResource()
         * @access private
-        * @see \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getImgResource()
+        * @see ContentObjectRenderer::getImgResource()
         */
        public function getResource($file, $fileArray) {
                if (!GeneralUtility::inList($this->imageFileExt, $fileArray['ext'])) {
                        $fileArray['ext'] = $this->gifExtension;
                }
-               /** @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $cObj */
-               $cObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+               /** @var ContentObjectRenderer $cObj */
+               $cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
                $cObj->start($this->data);
                return $cObj->getImgResource($file, $fileArray);
        }
@@ -689,7 +694,7 @@ class GifBuilder extends \TYPO3\CMS\Core\Imaging\GraphicalFunctions {
         * @param string $file The resource value.
         * @return string Returns the relative filepath
         * @access private
-        * @see \TYPO3\CMS\Core\TypoScript\TemplateService::getFileName()
+        * @see TemplateService::getFileName()
         */
        public function checkFile($file) {
                return $GLOBALS['TSFE']->tmpl->getFileName($file);
index 58d0a76..cef03dc 100644 (file)
@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Frontend\MediaWizard;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Contains an implementation of the mediaWizardProvider supporting some
  * well known providers.
@@ -62,7 +64,7 @@ class MediaWizardProvider implements MediaWizardProviderInterface {
                if (empty($urlInfo['host'])) {
                        return NULL;
                }
-               $hostName = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('.', $urlInfo['host'], TRUE);
+               $hostName = GeneralUtility::trimExplode('.', $urlInfo['host'], TRUE);
                foreach ($this->providers as $provider) {
                        $functionName = 'process_' . $provider;
                        if (in_array($provider, $hostName) && is_callable(array($this, $functionName))) {
@@ -284,7 +286,7 @@ class MediaWizardProvider implements MediaWizardProviderInterface {
         * @return string
         */
        protected function getUrlSchema() {
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://';
+               return GeneralUtility::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://';
        }
 
 }
index f3054a8..ae2f0d3 100644 (file)
@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Frontend\MediaWizard;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Manager to register and call registered media wizard providers
  *
@@ -52,9 +54,9 @@ class MediaWizardProviderManager {
                $providerClassNames = array_unique(self::$providers);
                foreach ($providerClassNames as $className) {
                        if (!isset(self::$providerObjects[$className])) {
-                               $provider = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($className);
+                               $provider = GeneralUtility::makeInstance($className);
                                if (!$provider instanceof MediaWizardProviderInterface) {
-                                       throw new \UnexpectedValueException($className . ' is registered as a mediaWizardProvider, so it must implement interface ' . \TYPO3\CMS\Frontend\MediaWizard\MediaWizardProviderInterface::class, 1285022360);
+                                       throw new \UnexpectedValueException($className . ' is registered as a mediaWizardProvider, so it must implement interface ' . MediaWizardProviderInterface::class, 1285022360);
                                }
                                self::$providerObjects[$className] = $provider;
                        }
index f8f86d4..2fb143d 100644 (file)
@@ -14,6 +14,8 @@ namespace TYPO3\CMS\Frontend\Page;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Logic for cHash calculation
  *
@@ -163,7 +165,7 @@ class CacheHashCalculator implements \TYPO3\CMS\Core\SingletonInterface {
         * @return bool
         */
        protected function isCoreParameter($key) {
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::inList('id,type,no_cache,cHash,MP,ftu', $key);
+               return GeneralUtility::inList('id,type,no_cache,cHash,MP,ftu', $key);
        }
 
        /**
index f995bf1..b6e0a05 100644 (file)
@@ -14,6 +14,9 @@ namespace TYPO3\CMS\Frontend\Page;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\TypoScript\TemplateService;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Rendering of framesets
  *
@@ -31,7 +34,7 @@ class FramesetRenderer {
        public function make($setup) {
                $content = '';
                if (is_array($setup)) {
-                       $sKeyArray = \TYPO3\CMS\Core\TypoScript\TemplateService::sortedKeyList($setup);
+                       $sKeyArray = TemplateService::sortedKeyList($setup);
                        foreach ($sKeyArray as $theKey) {
                                $theValue = $setup[$theKey];
                                if ((int)$theKey && ($conf = $setup[$theKey . '.'])) {
@@ -44,7 +47,7 @@ class FramesetRenderer {
                                                        $content .= '<frame' . $this->frameParams($conf, $typeNum) . ' />' . LF;
                                                        break;
                                                case 'FRAMESET':
-                                                       $frameset = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Page\FramesetRenderer::class);
+                                                       $frameset = GeneralUtility::makeInstance(__CLASS__);
                                                        $content .= $frameset->make($conf) . LF;
                                                        break;
                                        }
index d2a3533..780d234 100644 (file)
@@ -271,7 +271,6 @@ class PageGenerator {
                /** @var TimeTracker $timeTracker */
                $timeTracker = $GLOBALS['TT'];
 
-               /** @var PageRenderer $pageRenderer */
                $pageRenderer = $tsfe->getPageRenderer();
                if ($tsfe->config['config']['moveJsFromHeaderToFooter']) {
                        $pageRenderer->enableMoveJsFromHeaderToFooter();
index 4e35bd6..b15a309 100644 (file)
@@ -14,7 +14,12 @@ namespace TYPO3\CMS\Frontend\Page;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Cache\CacheManager;
+use TYPO3\CMS\Core\Resource\FileRepository;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\HttpUtility;
+use TYPO3\CMS\Core\Utility\RootlineUtility;
 use TYPO3\CMS\Core\Versioning\VersionState;
 
 /**
@@ -208,8 +213,8 @@ class PageRepository {
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPage'])) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPage'] as $classRef) {
                                $hookObject = GeneralUtility::getUserObj($classRef);
-                               if (!$hookObject instanceof \TYPO3\CMS\Frontend\Page\PageRepositoryGetPageHookInterface) {
-                                       throw new \UnexpectedValueException('$hookObject must implement interface ' . \TYPO3\CMS\Frontend\Page\PageRepositoryGetPageHookInterface::class, 1251476766);
+                               if (!$hookObject instanceof PageRepositoryGetPageHookInterface) {
+                                       throw new \UnexpectedValueException('$hookObject must implement interface ' . PageRepositoryGetPageHookInterface::class, 1251476766);
                                }
                                $hookObject->getPage_preProcess($uid, $disableGroupAccessCheck, $this);
                        }
@@ -342,8 +347,8 @@ class PageRepository {
                        foreach ($pagesInput as $origPage) {
                                foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPageOverlay'] as $classRef) {
                                        $hookObject = GeneralUtility::makeInstance($classRef);
-                                       if (!$hookObject instanceof \TYPO3\CMS\Frontend\Page\PageRepositoryGetPageOverlayHookInterface) {
-                                               throw new \UnexpectedValueException('$hookObject must implement interface ' . \TYPO3\CMS\Frontend\Page\PageRepositoryGetPageOverlayHookInterface::class, 1269878881);
+                                       if (!$hookObject instanceof PageRepositoryGetPageOverlayHookInterface) {
+                                               throw new \UnexpectedValueException('$hookObject must implement interface ' . PageRepositoryGetPageOverlayHookInterface::class, 1269878881);
                                        }
                                        $hookObject->getPageOverlay_preProcess($origPage, $lUid, $this);
                                }
@@ -443,8 +448,8 @@ class PageRepository {
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getRecordOverlay'])) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getRecordOverlay'] as $classRef) {
                                $hookObject = GeneralUtility::getUserObj($classRef);
-                               if (!$hookObject instanceof \TYPO3\CMS\Frontend\Page\PageRepositoryGetRecordOverlayHookInterface) {
-                                       throw new \UnexpectedValueException('$hookObject must implement interface ' . \TYPO3\CMS\Frontend\Page\PageRepositoryGetRecordOverlayHookInterface::class, 1269881658);
+                               if (!$hookObject instanceof PageRepositoryGetRecordOverlayHookInterface) {
+                                       throw new \UnexpectedValueException('$hookObject must implement interface ' . PageRepositoryGetRecordOverlayHookInterface::class, 1269881658);
                                }
                                $hookObject->getRecordOverlay_preProcess($table, $row, $sys_language_content, $OLmode, $this);
                        }
@@ -504,8 +509,8 @@ class PageRepository {
                if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getRecordOverlay'])) {
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getRecordOverlay'] as $classRef) {
                                $hookObject = GeneralUtility::getUserObj($classRef);
-                               if (!$hookObject instanceof \TYPO3\CMS\Frontend\Page\PageRepositoryGetRecordOverlayHookInterface) {
-                                       throw new \UnexpectedValueException('$hookObject must implement interface ' . \TYPO3\CMS\Frontend\Page\PageRepositoryGetRecordOverlayHookInterface::class, 1269881659);
+                               if (!$hookObject instanceof PageRepositoryGetRecordOverlayHookInterface) {
+                                       throw new \UnexpectedValueException('$hookObject must implement interface ' . PageRepositoryGetRecordOverlayHookInterface::class, 1269881659);
                                }
                                $hookObject->getRecordOverlay_postProcess($table, $row, $sys_language_content, $OLmode, $this);
                        }
@@ -634,10 +639,10 @@ class PageRepository {
                                        $redirectUrl .= '/' . $prependStr;
                                }
                                $statusCode = (int)$row['redirectHttpStatusCode'];
-                               if ($statusCode && defined(\TYPO3\CMS\Core\Utility\HttpUtility::class . '::HTTP_STATUS_' . $statusCode)) {
-                                       \TYPO3\CMS\Core\Utility\HttpUtility::redirect($redirectUrl, constant(\TYPO3\CMS\Core\Utility\HttpUtility::class . '::HTTP_STATUS_' . $statusCode));
+                               if ($statusCode && defined(HttpUtility::class . '::HTTP_STATUS_' . $statusCode)) {
+                                       HttpUtility::redirect($redirectUrl, constant(HttpUtility::class . '::HTTP_STATUS_' . $statusCode));
                                } else {
-                                       \TYPO3\CMS\Core\Utility\HttpUtility::redirect($redirectUrl, \TYPO3\CMS\Core\Utility\HttpUtility::HTTP_STATUS_301);
+                                       HttpUtility::redirect($redirectUrl, HttpUtility::HTTP_STATUS_301);
                                }
                                die;
                        } else {
@@ -667,7 +672,7 @@ class PageRepository {
         * @see \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::getPageAndRootline()
         */
        public function getRootLine($uid, $MP = '', $ignoreMPerrors = FALSE) {
-               $rootline = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Utility\RootlineUtility::class, $uid, $MP, $this);
+               $rootline = GeneralUtility::makeInstance(RootlineUtility::class, $uid, $MP, $this);
                try {
                        return $rootline->get();
                } catch (\RuntimeException $ex) {
@@ -909,7 +914,7 @@ class PageRepository {
         */
        static public function getHash($hash, $expTime = 0) {
                $hashContent = NULL;
-               $contentHashCache = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Cache\CacheManager::class)->getCache('cache_hash');
+               $contentHashCache = GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_hash');
                $cacheEntry = $contentHashCache->get($hash);
                if ($cacheEntry) {
                        $hashContent = $cacheEntry;
@@ -932,7 +937,7 @@ class PageRepository {
         * @see tslib_TStemplate::start(), getHash()
         */
        static public function storeHash($hash, $data, $ident, $lifetime = 0) {
-               GeneralUtility::makeInstance(\TYPO3\CMS\Core\Cache\CacheManager::class)->getCache('cache_hash')->set($hash, $data, array('ident_' . $ident), (int)$lifetime);
+               GeneralUtility::makeInstance(CacheManager::class)->getCache('cache_hash')->set($hash, $data, array('ident_' . $ident), (int)$lifetime);
        }
 
        /**
@@ -1099,7 +1104,7 @@ class PageRepository {
         * @param string $table Table name
         * @param array $rr Record array passed by reference. As minimum, "pid" and "uid" fields must exist! "t3ver_oid" and "t3ver_wsid" is nice and will save you a DB query.
         * @return void (Passed by ref).
-        * @see \TYPO3\CMS\Backend\Utility\BackendUtility::fixVersioningPid(), versionOL(), getRootLine()
+        * @see BackendUtility::fixVersioningPid(), versionOL(), getRootLine()
         */
        public function fixVersioningPid($table, &$rr) {
                if ($this->versioningPreview && is_array($rr) && $rr['pid'] == -1 && ($table == 'pages' || $GLOBALS['TCA'][$table]['ctrl']['versioningWS'])) {
@@ -1157,7 +1162,7 @@ class PageRepository {
         * @param bool $unsetMovePointers If set, the $row is cleared in case it is a move-pointer. This is only for preview of moved records (to remove the record from the original location so it appears only in the new location)
         * @param bool $bypassEnableFieldsCheck Unless this option is TRUE, the $row is unset if enablefields for BOTH the version AND the online record deselects it. This is because when versionOL() is called it is assumed that the online record is already selected with no regards to it's enablefields. However, after looking for a new version the online record enablefields must ALSO be evaluated of course. This is done all by this function!
         * @return void (Passed by ref).
-        * @see fixVersioningPid(), \TYPO3\CMS\Backend\Utility\BackendUtility::workspaceOL()
+        * @see fixVersioningPid(), BackendUtility::workspaceOL()
         */
        public function versionOL($table, &$row, $unsetMovePointers = FALSE, $bypassEnableFieldsCheck = FALSE) {
                if ($this->versioningPreview && is_array($row)) {
@@ -1230,7 +1235,7 @@ class PageRepository {
         * @param string $table Table name
         * @param array $row Row (passed by reference) - only online records...
         * @return bool TRUE if overlay is made.
-        * @see \TYPO3\CMS\Backend\Utility\BackendUtility::movePlhOl()
+        * @see BackendUtility::movePlhOl()
         */
        public function movePlhOL($table, &$row) {
                if (
@@ -1267,7 +1272,7 @@ class PageRepository {
         * @param int $uid Record UID of online version
         * @param string $fields Field list, default is *
         * @return array If found, the record, otherwise nothing.
-        * @see \TYPO3\CMS\Backend\Utility\BackendUtility::getMovePlaceholder()
+        * @see BackendUtility::getMovePlaceholder()
         */
        public function getMovePlaceholder($table, $uid, $fields = '*') {
                if ($this->versioningPreview) {
@@ -1295,7 +1300,7 @@ class PageRepository {
         * @param string $fields Field list to select
         * @param bool $bypassEnableFieldsCheck If TRUE, enablefields are not checked for.
         * @return mixed If found, return record, otherwise other value: Returns 1 if version was sought for but not found, returns -1/-2 if record (offline/online) existed but had enableFields that would disable it. Returns FALSE if not in workspace or no versioning for record. Notice, that the enablefields of the online record is also tested.
-        * @see \TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord()
+        * @see BackendUtility::getWorkspaceVersionOfRecord()
         */
        public function getWorkspaceVersionOfRecord($workspace, $table, $uid, $fields = '*', $bypassEnableFieldsCheck = FALSE) {
                if ($workspace !== 0 && !empty($GLOBALS['TCA'][$table]['ctrl']['versioningWS'])) {
@@ -1348,7 +1353,7 @@ class PageRepository {
         * @return bool <code>TRUE</code> if has access
         */
        public function checkWorkspaceAccess($wsid) {
-               if (!$GLOBALS['BE_USER'] || !\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('workspaces')) {
+               if (!$GLOBALS['BE_USER'] || !ExtensionManagementUtility::isLoaded('workspaces')) {
                        return FALSE;
                }
                if (isset($this->workspaceCache[$wsid])) {
@@ -1378,8 +1383,8 @@ class PageRepository {
         * @return array
         */
        public function getFileReferences($tableName, $fieldName, array $element) {
-               /** @var $fileRepository \TYPO3\CMS\Core\Resource\FileRepository */
-               $fileRepository = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Resource\FileRepository::class);
+               /** @var $fileRepository FileRepository */
+               $fileRepository = GeneralUtility::makeInstance(FileRepository::class);
                $currentId = !empty($element['uid']) ? $element['uid'] : 0;
 
                // Fetch the references of the default element
index 45b876e..1cc6b1f 100644 (file)
@@ -29,6 +29,6 @@ interface PageRepositoryGetPageHookInterface {
         * @param \TYPO3\CMS\Frontend\Page\PageRepository $parentObject Parent object
         * @return void
         */
-       public function getPage_preProcess(&$uid, &$disableGroupAccessCheck, \TYPO3\CMS\Frontend\Page\PageRepository $parentObject);
+       public function getPage_preProcess(&$uid, &$disableGroupAccessCheck, PageRepository $parentObject);
 
 }
index b07572a..68b8028 100644 (file)
@@ -29,6 +29,6 @@ interface PageRepositoryGetPageOverlayHookInterface {
         * @param \TYPO3\CMS\Frontend\Page\PageRepository $parent The calling parent object
         * @return void
         */
-       public function getPageOverlay_preProcess(&$pageInput, &$lUid, \TYPO3\CMS\Frontend\Page\PageRepository $parent);
+       public function getPageOverlay_preProcess(&$pageInput, &$lUid, PageRepository $parent);
 
 }
index 9542e46..3c2b8de 100644 (file)
@@ -30,7 +30,7 @@ interface PageRepositoryGetRecordOverlayHookInterface {
         * @param string $OLmode
         * @param \TYPO3\CMS\Frontend\Page\PageRepository $parent
         */
-       public function getRecordOverlay_preProcess($table, &$row, &$sys_language_content, $OLmode, \TYPO3\CMS\Frontend\Page\PageRepository $parent);
+       public function getRecordOverlay_preProcess($table, &$row, &$sys_language_content, $OLmode, PageRepository $parent);
 
        /**
         * Enables to postprocess a record overlay
@@ -41,6 +41,6 @@ interface PageRepositoryGetRecordOverlayHookInterface {
         * @param string $OLmode
         * @param \TYPO3\CMS\Frontend\Page\PageRepository $parent
         */
-       public function getRecordOverlay_postProcess($table, &$row, &$sys_language_content, $OLmode, \TYPO3\CMS\Frontend\Page\PageRepository $parent);
+       public function getRecordOverlay_postProcess($table, &$row, &$sys_language_content, $OLmode, PageRepository $parent);
 
 }
index e926fe0..dbdb34f 100644 (file)
@@ -14,10 +14,12 @@ namespace TYPO3\CMS\Frontend\Plugin;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Localization\Locales;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\MathUtility;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Core\Database\DatabaseConnection;
+use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
 use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
 
 /**
@@ -33,7 +35,7 @@ class AbstractPlugin {
        /**
         * The backReference to the mother cObj object set at call time
         *
-        * @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
+        * @var ContentObjectRenderer
         */
        public $cObj;
 
@@ -211,7 +213,7 @@ class AbstractPlugin {
        /**
         * internal, don't mess with...
         *
-        * @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
+        * @var ContentObjectRenderer
         */
        public $pi_EPtemp_cObj;
 
@@ -258,8 +260,8 @@ class AbstractPlugin {
                if (!empty($this->frontendController->config['config']['language'])) {
                        $this->LLkey = $this->frontendController->config['config']['language'];
                        if (empty($this->frontendController->config['config']['language_alt'])) {
-                               /** @var $locales \TYPO3\CMS\Core\Localization\Locales */
-                               $locales = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Localization\Locales::class);
+                               /** @var $locales Locales */
+                               $locales = GeneralUtility::makeInstance(Locales::class);
                                if (in_array($this->LLkey, $locales->getLocales())) {
                                        $this->altLLkey = '';
                                        foreach ($locales->getLocaleDependencies($this->LLkey) as $language) {
@@ -338,7 +340,7 @@ class AbstractPlugin {
         * @param array|string $urlParameters As an array key/value pairs represent URL parameters to set. Values NOT URL-encoded yet, keys should be URL-encoded if needed. As a string the parameter is expected to be URL-encoded already.
         * @return string The resulting URL
         * @see pi_linkToPage()
-        * @see \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->getTypoLink()
+        * @see ContentObjectRenderer->getTypoLink()
         */
        public function pi_getPageLink($id, $target = '', $urlParameters = array()) {
                return $this->cObj->getTypoLink_URL($id, $urlParameters, $target);
@@ -354,7 +356,7 @@ class AbstractPlugin {
         * @param string $target Target value to use. Affects the &type-value of the URL, defaults to current.
         * @param array|string $urlParameters As an array key/value pairs represent URL parameters to set. Values NOT URL-encoded yet, keys should be URL-encoded if needed. As a string the parameter is expected to be URL-encoded already.
         * @return string The input string wrapped in <a> tags with the URL and target set.
-        * @see pi_getPageLink(), \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getTypoLink()
+        * @see pi_getPageLink(), ContentObjectRenderer::getTypoLink()
         */
        public function pi_linkToPage($str, $id, $target = '', $urlParameters = array()) {
                return $this->cObj->getTypoLink($str, $id, $urlParameters, $target);
@@ -369,7 +371,7 @@ class AbstractPlugin {
         * @param bool $cache If $cache is set (0/1), the page is asked to be cached by a &cHash value (unless the current plugin using this class is a USER_INT). Otherwise the no_cache-parameter will be a part of the link.
         * @param int $altPageId Alternative page ID for the link. (By default this function links to the SAME page!)
         * @return string The input string wrapped in <a> tags
-        * @see pi_linkTP_keepPIvars(), \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::typoLink()
+        * @see pi_linkTP_keepPIvars(), ContentObjectRenderer::typoLink()
         */
        public function pi_linkTP($str, $urlParameters = array(), $cache = FALSE, $altPageId = 0) {
                $conf = array();
@@ -843,7 +845,7 @@ class AbstractPlugin {
         * @param string $label A label to show with the panel.
         * @param array $conf TypoScript parameters to pass along to the EDITPANEL content Object that gets rendered. The property "allow" WILL get overridden/set though.
         * @return string Returns FALSE/blank if no BE User login and of course if the panel is not shown for other reasons. Otherwise the HTML for the panel (a table).
-        * @see \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::EDITPANEL()
+        * @see ContentObjectRenderer::EDITPANEL()
         */
        public function pi_getEditPanel($row = array(), $tablename = '', $label = '', $conf = array()) {
                $panel = '';
@@ -854,7 +856,7 @@ class AbstractPlugin {
                if ($this->frontendController->beUserLogin) {
                        // Create local cObj if not set:
                        if (!is_object($this->pi_EPtemp_cObj)) {
-                               $this->pi_EPtemp_cObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
+                               $this->pi_EPtemp_cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
                                $this->pi_EPtemp_cObj->setParent($this->cObj->data, $this->cObj->currentRecord);
                        }
                        // Initialize the cObj object with current row
@@ -885,7 +887,7 @@ class AbstractPlugin {
         * @param string $tablename Table name
         * @param array $oConf Conf array
         * @return string The processed content
-        * @see \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::editIcons()
+        * @see ContentObjectRenderer::editIcons()
         */
        public function pi_getEditIcon($content, $fields, $title = '', $row = array(), $tablename = '', $oConf = array()) {
                if ($this->frontendController->beUserLogin) {
@@ -1235,7 +1237,7 @@ class AbstractPlugin {
         *
         * @param string $str The input text string to process
         * @return string The processed string
-        * @see \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::parseFunc()
+        * @see ContentObjectRenderer::parseFunc()
         */
        public function pi_RTEcssText($str) {
                $parseFunc = $this->frontendController->tmpl->setup['lib.']['parseFunc_RTE.'];
index ac01b3a..875768b 100644 (file)
@@ -14,9 +14,19 @@ namespace TYPO3\CMS\Frontend;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Backend\FrontendBackendUserAuthentication;
 use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Core\Core\RequestHandlerInterface;
+use TYPO3\CMS\Core\FrontendEditing\FrontendEditingController;
+use TYPO3\CMS\Core\TimeTracker\NullTimeTracker;
+use TYPO3\CMS\Core\TimeTracker\TimeTracker;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Core\Utility\MathUtility;
+use TYPO3\CMS\Core\Utility\MonitorUtility;
+use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
+use TYPO3\CMS\Frontend\Page\PageGenerator;
+use TYPO3\CMS\Frontend\Utility\CompressionUtility;
+use TYPO3\CMS\Frontend\View\AdminPanelView;
 
 /**
  * This is the main entry point of the TypoScript driven standard front-end
@@ -56,9 +66,9 @@ class RequestHandler implements RequestHandlerInterface {
                        $configuredCookieName = 'be_typo_user';
                }
                if ($_COOKIE[$configuredCookieName]) {
-                       $GLOBALS['TT'] = new \TYPO3\CMS\Core\TimeTracker\TimeTracker();
+                       $GLOBALS['TT'] = new TimeTracker();
                } else {
-                       $GLOBALS['TT'] = new \TYPO3\CMS\Core\TimeTracker\NullTimeTracker();
+                       $GLOBALS['TT'] = new NullTimeTracker();
                }
 
                $GLOBALS['TT']->start();
@@ -75,7 +85,7 @@ class RequestHandler implements RequestHandlerInterface {
 
                /** @var $GLOBALS['TSFE'] \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController */
                $GLOBALS['TSFE'] = GeneralUtility::makeInstance(
-                       \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::class,
+                       TypoScriptFrontendController::class,
                        $GLOBALS['TYPO3_CONF_VARS'],
                        GeneralUtility::_GP('id'),
                        GeneralUtility::_GP('type'),
@@ -101,11 +111,11 @@ class RequestHandler implements RequestHandlerInterface {
                // Remove any output produced until now
                ob_clean();
                if ($GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel'] && extension_loaded('zlib')) {
-                       if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel'])) {
+                       if (MathUtility::canBeInterpretedAsInteger($GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel'])) {
                                // Prevent errors if ini_set() is unavailable (safe mode)
                                @ini_set('zlib.output_compression_level', $GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel']);
                        }
-                       ob_start(array(GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Utility\CompressionUtility::class), 'compressionOutputHandler'));
+                       ob_start(array(GeneralUtility::makeInstance(CompressionUtility::class), 'compressionOutputHandler'));
                }
 
                // FE_USER
@@ -155,12 +165,12 @@ class RequestHandler implements RequestHandlerInterface {
                // Admin Panel & Frontend editing
                if ($GLOBALS['TSFE']->isBackendUserLoggedIn()) {
                        $GLOBALS['BE_USER']->initializeFrontendEdit();
-                       if ($GLOBALS['BE_USER']->adminPanel instanceof \TYPO3\CMS\Frontend\View\AdminPanelView) {
+                       if ($GLOBALS['BE_USER']->adminPanel instanceof AdminPanelView) {
                                $this->bootstrap
                                        ->initializeLanguageObject()
                                        ->initializeSpriteManager();
                        }
-                       if ($GLOBALS['BE_USER']->frontendEdit instanceof \TYPO3\CMS\Core\FrontendEditing\FrontendEditingController) {
+                       if ($GLOBALS['BE_USER']->frontendEdit instanceof FrontendEditingController) {
                                $GLOBALS['BE_USER']->frontendEdit->initConfigOptions();
                        }
                }
@@ -204,27 +214,27 @@ class RequestHandler implements RequestHandlerInterface {
                        if ($temp_theScript) {
                                include $temp_theScript;
                        } else {
-                               \TYPO3\CMS\Frontend\Page\PageGenerator::pagegenInit();
+                               PageGenerator::pagegenInit();
                                // Global content object
                                $GLOBALS['TSFE']->newCObj();
                                // LIBRARY INCLUSION, TypoScript
-                               $temp_incFiles = \TYPO3\CMS\Frontend\Page\PageGenerator::getIncFiles();
+                               $temp_incFiles = PageGenerator::getIncFiles();
                                foreach ($temp_incFiles as $temp_file) {
                                        include_once './' . $temp_file;
                                }
                                // Content generation
                                if (!$GLOBALS['TSFE']->isINTincScript()) {
-                                       \TYPO3\CMS\Frontend\Page\PageGenerator::renderContent();
+                                       PageGenerator::renderContent();
                                        $GLOBALS['TSFE']->setAbsRefPrefix();
                                }
                        }
                        $GLOBALS['TSFE']->generatePage_postProcessing();
                } elseif ($GLOBALS['TSFE']->isINTincScript()) {
-                       \TYPO3\CMS\Frontend\Page\PageGenerator::pagegenInit();
+                       PageGenerator::pagegenInit();
                        // Global content object
                        $GLOBALS['TSFE']->newCObj();
                        // LIBRARY INCLUSION, TypoScript
-                       $temp_incFiles = \TYPO3\CMS\Frontend\Page\PageGenerator::getIncFiles();
+                       $temp_incFiles = PageGenerator::getIncFiles();
                        foreach ($temp_incFiles as $temp_file) {
                                include_once './' . $temp_file;
                        }
@@ -267,14 +277,14 @@ class RequestHandler implements RequestHandlerInterface {
                // Finish timetracking
                $GLOBALS['TT']->pull();
                // Check memory usage
-               \TYPO3\CMS\Core\Utility\MonitorUtility::peakMemoryUsage();
+               MonitorUtility::peakMemoryUsage();
                // beLoginLinkIPList
                echo $GLOBALS['TSFE']->beLoginLinkIPList();
 
                // Admin panel
                if (
                        $GLOBALS['TSFE']->isBackendUserLoggedIn()
-                       && $GLOBALS['BE_USER'] instanceof \TYPO3\CMS\Backend\FrontendBackendUserAuthentication
+                       && $GLOBALS['BE_USER'] instanceof FrontendBackendUserAuthentication
                        && $GLOBALS['BE_USER']->isAdminPanelVisible()
                ) {
                        $GLOBALS['TSFE']->content = str_ireplace('</head>', $GLOBALS['BE_USER']->adminPanel->getAdminPanelHeaderData() . '</head>', $GLOBALS['TSFE']->content);
index a3b9f56..47c983f 100644 (file)
@@ -14,8 +14,12 @@ namespace TYPO3\CMS\Frontend\Utility;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Core\Bootstrap;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication;
+use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
+use TYPO3\CMS\Lang\LanguageService;
 
 /**
  * Tools for scripts using the eID feature of index.php
@@ -83,7 +87,7 @@ class EidUtility {
         */
        static public function initLanguage($language = 'default') {
                if (!is_object($GLOBALS['LANG'])) {
-                       $GLOBALS['LANG'] = GeneralUtility::makeInstance(\TYPO3\CMS\Lang\LanguageService::class);
+                       $GLOBALS['LANG'] = GeneralUtility::makeInstance(LanguageService::class);
                        $GLOBALS['LANG']->init($language);
                }
        }
@@ -99,7 +103,7 @@ class EidUtility {
                // but in fact it is not loaded. The check below ensure that
                // TCA is still loaded if such bad extensions are installed
                if (!is_array($GLOBALS['TCA']) || !isset($GLOBALS['TCA']['pages'])) {
-                       \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->loadCachedTca();
+                       Bootstrap::getInstance()->loadCachedTca();
                }
        }
 
@@ -111,7 +115,7 @@ class EidUtility {
         * @return void
         */
        static public function initExtensionTCA($extensionKey) {
-               $extTablesPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extensionKey, 'ext_tables.php');
+               $extTablesPath = ExtensionManagementUtility::extPath($extensionKey, 'ext_tables.php');
                if (file_exists($extTablesPath)) {
                        $GLOBALS['_EXTKEY'] = $extensionKey;
                        require_once $extTablesPath;
@@ -131,7 +135,7 @@ class EidUtility {
                // Cached instance
                static $tsfe = NULL;
                if (is_null($tsfe)) {
-                       $tsfe = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::class, $GLOBALS['TYPO3_CONF_VARS'], 0, 0);
+                       $tsfe = GeneralUtility::makeInstance(TypoScriptFrontendController::class, $GLOBALS['TYPO3_CONF_VARS'], 0, 0);
                }
                return $tsfe;
        }
index 69c0a7a..687793b 100644 (file)
@@ -17,6 +17,7 @@ namespace TYPO3\CMS\Frontend\View;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Type\Bitmask\Permission;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -597,7 +598,7 @@ class AdminPanelView {
                //  If mod.web_list.newContentWiz.overrideWithExtension is set, use that extension's create new content wizard instead:
                $tsConfig = BackendUtility::getModTSconfig($this->pageinfo['uid'], 'mod.web_list');
                $tsConfig = $tsConfig['properties']['newContentWiz.']['overrideWithExtension'];
-               $newContentWizScriptPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($tsConfig) ? \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($tsConfig) . 'mod1/db_new_content_el.php?' : TYPO3_mainDir . BackendUtility::getModuleUrl('new_content_element') . '&';
+               $newContentWizScriptPath = ExtensionManagementUtility::isLoaded($tsConfig) ? ExtensionManagementUtility::extRelPath($tsConfig) . 'mod1/db_new_content_el.php?' : TYPO3_mainDir . BackendUtility::getModuleUrl('new_content_element') . '&';
                $perms = $GLOBALS['BE_USER']->calcPerms($GLOBALS['TSFE']->page);
                $langAllowed = $GLOBALS['BE_USER']->checkLanguageAccess($GLOBALS['TSFE']->sys_language_uid);
                $id = $GLOBALS['TSFE']->id;
index c3b06e8..3087a9a 100644 (file)
@@ -28,6 +28,6 @@ interface AdminPanelViewHookInterface {
         * @param \TYPO3\CMS\Frontend\View\AdminPanelView $obj The adminPanel object
         * @return string Returns content of admin panel
         */
-       public function extendAdminPanel($moduleContent, \TYPO3\CMS\Frontend\View\AdminPanelView $obj);
+       public function extendAdminPanel($moduleContent, AdminPanelView $obj);
 
 }