Commit e211a7b0 authored by Wouter Wolters's avatar Wouter Wolters Committed by Anja Leichsenring
Browse files

[TASK] Replace @inject with inject methods in other extensions

Because of performance reasons we replace
the @inject annotations back to inject methods.

Resolves: #68786
Related: #54605
Releases: master
Change-Id: Ifc9960c9ca279c05b4120c806147e49c1084c8d5
Reviewed-on: http://review.typo3.org/42310

Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent a7707bcb
......@@ -21,10 +21,16 @@ class AboutController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
/**
* @var \TYPO3\CMS\About\Domain\Repository\ExtensionRepository
* @inject
*/
protected $extensionRepository;
/**
* @param \TYPO3\CMS\About\Domain\Repository\ExtensionRepository $extensionRepository
*/
public function injectExtensionRepository(\TYPO3\CMS\About\Domain\Repository\ExtensionRepository $extensionRepository) {
$this->extensionRepository = $extensionRepository;
}
/**
* Main action: Show standard information
*
......
......@@ -72,7 +72,6 @@ abstract class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\Acti
/**
* @var \TYPO3\CMS\Belog\Domain\Repository\LogEntryRepository
* @inject
*/
protected $logEntryRepository = NULL;
......@@ -81,6 +80,13 @@ abstract class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\Acti
*/
protected $pageRenderer;
/**
* @param \TYPO3\CMS\Belog\Domain\Repository\LogEntryRepository $logEntryRepository
*/
public function injectLogEntryRepository(\TYPO3\CMS\Belog\Domain\Repository\LogEntryRepository $logEntryRepository) {
$this->logEntryRepository = $logEntryRepository;
}
/**
* init all actions
* @return void
......
......@@ -29,28 +29,52 @@ class BackendUserController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionCont
/**
* @var \TYPO3\CMS\Beuser\Service\ModuleDataStorageService
* @inject
*/
protected $moduleDataStorageService;
/**
* @var \TYPO3\CMS\Beuser\Domain\Repository\BackendUserRepository
* @inject
*/
protected $backendUserRepository;
/**
* @var \TYPO3\CMS\Beuser\Domain\Repository\BackendUserGroupRepository
* @inject
*/
protected $backendUserGroupRepository;
/**
* @var \TYPO3\CMS\Beuser\Domain\Repository\BackendUserSessionRepository
* @inject
*/
protected $backendUserSessionRepository;
/**
* @param \TYPO3\CMS\Beuser\Service\ModuleDataStorageService $moduleDataStorageService
*/
public function injectModuleDataStorageService(\TYPO3\CMS\Beuser\Service\ModuleDataStorageService $moduleDataStorageService) {
$this->moduleDataStorageService = $moduleDataStorageService;
}
/**
* @param \TYPO3\CMS\Beuser\Domain\Repository\BackendUserRepository $backendUserRepository
*/
public function injectBackendUserRepository(\TYPO3\CMS\Beuser\Domain\Repository\BackendUserRepository $backendUserRepository) {
$this->backendUserRepository = $backendUserRepository;
}
/**
* @param \TYPO3\CMS\Beuser\Domain\Repository\BackendUserGroupRepository $backendUserGroupRepository
*/
public function injectBackendUserGroupRepository(\TYPO3\CMS\Beuser\Domain\Repository\BackendUserGroupRepository $backendUserGroupRepository) {
$this->backendUserGroupRepository = $backendUserGroupRepository;
}
/**
* @param \TYPO3\CMS\Beuser\Domain\Repository\BackendUserSessionRepository $backendUserSessionRepository
*/
public function injectBackendUserSessionRepository(\TYPO3\CMS\Beuser\Domain\Repository\BackendUserSessionRepository $backendUserSessionRepository) {
$this->backendUserSessionRepository = $backendUserSessionRepository;
}
/**
* Load and persist module data
*
......
......@@ -24,10 +24,16 @@ class BackendUserGroupController extends \TYPO3\CMS\Extbase\Mvc\Controller\Actio
/**
* @var \TYPO3\CMS\Beuser\Domain\Repository\BackendUserGroupRepository
* @inject
*/
protected $backendUserGroupRepository;
/**
* @param \TYPO3\CMS\Beuser\Domain\Repository\BackendUserGroupRepository $backendUserGroupRepository
*/
public function injectBackendUserGroupRepository(\TYPO3\CMS\Beuser\Domain\Repository\BackendUserGroupRepository $backendUserGroupRepository) {
$this->backendUserGroupRepository = $backendUserGroupRepository;
}
/**
* Initialize actions
*
......
......@@ -21,7 +21,6 @@ class ModuleData {
/**
* @var \TYPO3\CMS\Beuser\Domain\Model\Demand
* @inject
*/
protected $demand;
......@@ -30,6 +29,13 @@ class ModuleData {
*/
protected $compareUserList = array();
/**
* @param \TYPO3\CMS\Beuser\Domain\Model\Demand $demand
*/
public function injectDemand(\TYPO3\CMS\Beuser\Domain\Model\Demand $demand) {
$this->demand = $demand;
}
/**
* @return \TYPO3\CMS\Beuser\Domain\Model\Demand
*/
......
......@@ -27,10 +27,16 @@ class ModuleDataStorageService implements \TYPO3\CMS\Core\SingletonInterface {
/**
* @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
* @inject
*/
protected $objectManager;
/**
* @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
*/
public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
$this->objectManager = $objectManager;
}
/**
* Loads module data for user settings or returns a fresh object initially
*
......
......@@ -23,35 +23,53 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
class DocumentController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
/**
* documentRepository
*
* @var \TYPO3\CMS\Documentation\Domain\Repository\DocumentRepository
* @inject
*/
protected $documentRepository;
/**
* @var \TYPO3\CMS\Documentation\Service\DocumentationService
* @inject
*/
protected $documentationService;
/**
* languageUtility
*
* @var \TYPO3\CMS\Documentation\Utility\LanguageUtility
* @inject
*/
protected $languageUtility;
/**
* Signal Slot dispatcher
*
* @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
* @inject
*/
protected $signalSlotDispatcher;
/**
* @param \TYPO3\CMS\Documentation\Domain\Repository\DocumentRepository $documentRepository
*/
public function injectDocumentRepository(\TYPO3\CMS\Documentation\Domain\Repository\DocumentRepository $documentRepository) {
$this->documentRepository = $documentRepository;
}
/**
* @param \TYPO3\CMS\Documentation\Service\DocumentationService $documentationService
*/
public function injectDocumentationService(\TYPO3\CMS\Documentation\Service\DocumentationService $documentationService) {
$this->documentationService = $documentationService;
}
/**
* @param \TYPO3\CMS\Documentation\Utility\LanguageUtility $languageUtility
*/
public function injectLanguageUtility(\TYPO3\CMS\Documentation\Utility\LanguageUtility $languageUtility) {
$this->languageUtility = $languageUtility;
}
/**
* @param \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher
*/
public function injectSignalSlotDispatcher(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher) {
$this->signalSlotDispatcher = $signalSlotDispatcher;
}
/**
* Lists the available documents.
*
......
......@@ -23,10 +23,16 @@ class DocumentRepository {
/**
* @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
* @inject
*/
protected $objectManager;
/**
* @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
*/
public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
$this->objectManager = $objectManager;
}
/**
* Finds all documents.
*
......
......@@ -31,10 +31,16 @@ class ExtensionManager {
/**
* @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
* @inject
*/
protected $objectManager;
/**
* @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
*/
public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
$this->objectManager = $objectManager;
}
/**
* Processes the list of actions for a given extension and adds
* a link to the manual(s), if available.
......
......@@ -30,10 +30,16 @@ class ExtensionCommandController extends CommandController {
/**
* @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher
* @inject
*/
protected $signalSlotDispatcher;
/**
* @param \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher
*/
public function injectSignalSlotDispatcher(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher) {
$this->signalSlotDispatcher = $signalSlotDispatcher;
}
/**
* Installs an extension by key
*
......
......@@ -22,28 +22,52 @@ class ActionController extends AbstractController {
/**
* @var \TYPO3\CMS\Extensionmanager\Utility\InstallUtility
* @inject
*/
protected $installUtility;
/**
* @var \TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility
* @inject
*/
protected $fileHandlingUtility;
/**
* @var \TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility
* @inject
*/
protected $extensionModelUtility;
/**
* @var \TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService
* @inject
*/
protected $managementService;
/**
* @param \TYPO3\CMS\Extensionmanager\Utility\InstallUtility $installUtility
*/
public function injectInstallUtility(\TYPO3\CMS\Extensionmanager\Utility\InstallUtility $installUtility) {
$this->installUtility = $installUtility;
}
/**
* @param \TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility $fileHandlingUtility
*/
public function injectFileHandlingUtility(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility $fileHandlingUtility) {
$this->fileHandlingUtility = $fileHandlingUtility;
}
/**
* @param \TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility $extensionModelUtility
*/
public function injectExtensionModelUtility(\TYPO3\CMS\Extensionmanager\Utility\ExtensionModelUtility $extensionModelUtility) {
$this->extensionModelUtility = $extensionModelUtility;
}
/**
* @param \TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService $managementService
*/
public function injectManagementService(\TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService $managementService) {
$this->managementService = $managementService;
}
/**
* Toggle extension installation state action
*
......
......@@ -24,16 +24,28 @@ class ConfigurationController extends AbstractController {
/**
* @var \TYPO3\CMS\Extensionmanager\Domain\Repository\ConfigurationItemRepository
* @inject
*/
protected $configurationItemRepository;
/**
* @var \TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository
* @inject
*/
protected $extensionRepository;
/**
* @param \TYPO3\CMS\Extensionmanager\Domain\Repository\ConfigurationItemRepository $configurationItemRepository
*/
public function injectConfigurationItemRepository(\TYPO3\CMS\Extensionmanager\Domain\Repository\ConfigurationItemRepository $configurationItemRepository) {
$this->configurationItemRepository = $configurationItemRepository;
}
/**
* @param \TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository $extensionRepository
*/
public function injectExtensionRepository(\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository $extensionRepository) {
$this->extensionRepository = $extensionRepository;
}
/**
* Show the extension configuration form. The whole form field handling is done
* in the corresponding view helper
......
......@@ -21,10 +21,16 @@ class DistributionController extends AbstractController {
/**
* @var \TYPO3\CMS\Core\Package\PackageManager
* @inject
*/
protected $packageManager;
/**
* @param \TYPO3\CMS\Core\Package\PackageManager $packageManager
*/
public function injectPackageManager(\TYPO3\CMS\Core\Package\PackageManager $packageManager) {
$this->packageManager = $packageManager;
}
/**
* Shows information about the distribution
*
......
......@@ -24,40 +24,76 @@ class DownloadController extends AbstractController {
/**
* @var \TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository
* @inject
*/
protected $extensionRepository;
/**
* @var \TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility
* @inject
*/
protected $fileHandlingUtility;
/**
* @var \TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService
* @inject
*/
protected $managementService;
/**
* @var \TYPO3\CMS\Extensionmanager\Utility\InstallUtility
* @inject
*/
protected $installUtility;
/**
* @var \TYPO3\CMS\Extensionmanager\Utility\DownloadUtility
* @inject
*/
protected $downloadUtility;
/**
* @var \TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility
* @inject
*/
protected $configurationUtility;
/**
* @param \TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository $extensionRepository
*/
public function injectExtensionRepository(\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository $extensionRepository) {
$this->extensionRepository = $extensionRepository;
}
/**
* @param \TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility $fileHandlingUtility
*/
public function injectFileHandlingUtility(\TYPO3\CMS\Extensionmanager\Utility\FileHandlingUtility $fileHandlingUtility) {
$this->fileHandlingUtility = $fileHandlingUtility;
}
/**
* @param \TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService $managementService
*/
public function injectManagementService(\TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService $managementService) {
$this->managementService = $managementService;
}
/**
* @param \TYPO3\CMS\Extensionmanager\Utility\InstallUtility $installUtility
*/
public function injectInstallUtility(\TYPO3\CMS\Extensionmanager\Utility\InstallUtility $installUtility) {
$this->installUtility = $installUtility;
}
/**
* @param \TYPO3\CMS\Extensionmanager\Utility\DownloadUtility $downloadUtility
*/
public function injectDownloadUtility(\TYPO3\CMS\Extensionmanager\Utility\DownloadUtility $downloadUtility) {
$this->downloadUtility = $downloadUtility;
}
/**
* @param \TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility $configurationUtility
*/
public function injectConfigurationUtility(\TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility $configurationUtility) {
$this->configurationUtility = $configurationUtility;
}
/**
* Check extension dependencies
*
......
......@@ -30,34 +30,64 @@ class ListController extends AbstractController {
/**
* @var \TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository
* @inject
*/
protected $extensionRepository;
/**
* @var \TYPO3\CMS\Extensionmanager\Utility\ListUtility
* @inject
*/
protected $listUtility;
/**
* @var \TYPO3\CMS\Core\Page\PageRenderer
* @inject
*/
protected $pageRenderer;
/**
* @var \TYPO3\CMS\Extensionmanager\Utility\DependencyUtility
* @inject
*/
protected $dependencyUtility;
/**
* @var \TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility
* @inject
*/
protected $configurationUtility;
/**
* @param \TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository $extensionRepository
*/
public function injectExtensionRepository(\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository $extensionRepository) {
$this->extensionRepository = $extensionRepository;
}
/**
* @param \TYPO3\CMS\Extensionmanager\Utility\ListUtility $listUtility
*/
public function injectListUtility(\TYPO3\CMS\Extensionmanager\Utility\ListUtility $listUtility) {
$this->listUtility = $listUtility;
}
/**
* @param \TYPO3\CMS\Core\Page\PageRenderer $pageRenderer
*/
public function injectPageRenderer(\TYPO3\CMS\Core\Page\PageRenderer $pageRenderer) {
$this->pageRenderer = $pageRenderer;
}
/**
* @param \TYPO3\CMS\Extensionmanager\Utility\DependencyUtility $dependencyUtility
*/
public function injectDependencyUtility(\TYPO3\CMS\Extensionmanager\Utility\DependencyUtility $dependencyUtility) {
$this->dependencyUtility = $dependencyUtility;
}
/**
* @param \TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility $configurationUtility
*/
public function injectConfigurationUtility(\TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility $configurationUtility) {
$this->configurationUtility = $configurationUtility;
}
/**
* Add the needed JavaScript files for all actions
*/
......
......@@ -21,28 +21,52 @@ class UpdateFromTerController extends AbstractController {
/**
* @var \TYPO3\CMS\Extensionmanager\Utility\Repository\Helper
* @inject
*/
protected $repositoryHelper;
/**
* @var \TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository
* @inject
*/
protected $repositoryRepository;
/**
* @var \TYPO3\CMS\Extensionmanager\Utility\ListUtility
* @inject
*/
protected $listUtility;
/**
* @var \TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository
* @inject
*/
protected $extensionRepository;
/**
* @param \TYPO3\CMS\Extensionmanager\Utility\Repository\Helper $repositoryHelper
*/
public function injectRepositoryHelper(\TYPO3\CMS\Extensionmanager\Utility\Repository\Helper $repositoryHelper) {
$this->repositoryHelper = $repositoryHelper;
}
/**
* @param \TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository $repositoryRepository
*/
public function injectRepositoryRepository(\TYPO3\CMS\Extensionmanager\Domain\Repository\RepositoryRepository $repositoryRepository) {
$this->repositoryRepository = $repositoryRepository;
}
/**
* @param \TYPO3\CMS\Extensionmanager\Utility\ListUtility $listUtility
*/
public function injectListUtility(\TYPO3\CMS\Extensionmanager\Utility\ListUtility $listUtility) {
$this->listUtility = $listUtility;
}
/**
* @param \TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository $extensionRepository
*/
public function injectExtensionRepository(\TYPO3\CMS\Extensionmanager\Domain\Repository\ExtensionRepository $extensionRepository) {
$this->extensionRepository = $extensionRepository;
}