[TASK] Cleanups for sysext belog 70/17670/4
authorSebastian Michaelsen <michaelsen@t3seo.de>
Wed, 23 Jan 2013 11:11:20 +0000 (12:11 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 25 Jan 2013 21:24:42 +0000 (22:24 +0100)
* Fix references to old classes
* Use property injection where possible

Resolves: #44744
Releases: 6.1, 6.0
Change-Id: I3076f48876fdc7566e85810eaf22aaa87d5c71e8
Reviewed-on: https://review.typo3.org/17670
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/belog/Classes/Controller/AbstractController.php
typo3/sysext/belog/Classes/ViewHelpers/Be/AddJsFileViewHelper.php
typo3/sysext/belog/Classes/ViewHelpers/Be/InlineSettingsArrayViewHelper.php
typo3/sysext/belog/Classes/ViewHelpers/HistoryEntryViewHelper.php
typo3/sysext/belog/Classes/ViewHelpers/WorkspaceTitleViewHelper.php

index dcc0509..78e21f8 100644 (file)
@@ -76,23 +76,15 @@ abstract class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\Acti
 
        /**
         * @var \TYPO3\CMS\Belog\Domain\Repository\LogEntryRepository
+        * @inject
         */
        protected $logEntryRepository = NULL;
 
        /**
-        * Injects the log entry repository.
-        *
-        * @param \TYPO3\CMS\Belog\Domain\Repository\LogEntryRepository $logEntryRepository
-        * @return void
-        */
-       public function injectLogEntryRepository(\TYPO3\CMS\Belog\Domain\Repository\LogEntryRepository $logEntryRepository) {
-               $this->logEntryRepository = $logEntryRepository;
-       }
-
-       /**
         * Initialize index action
         *
         * @return void
+        * @throws \RuntimeException
         */
        public function initializeIndexAction() {
                // @TODO: Extbase backend modules rely on frontend TypoScript for view, persistence
@@ -152,7 +144,7 @@ abstract class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\Acti
        /**
         * Get module states (the constraint object) from user data
         *
-        * @return Tx_Belog_Domain_Model_Constraint|NULL
+        * @return \TYPO3\CMS\Belog\Domain\Model\Constraint|NULL
         */
        protected function getConstraintFromBeUserData() {
                $serializedConstraint = $GLOBALS['BE_USER']->getModuleData(get_class($this));
@@ -182,7 +174,7 @@ abstract class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\Acti
         *
         * [pid][dayTimestamp][items]
         *
-        * @param Tx_Extbase_Persistence_QueryResult<Tx_Belog_Domain_Model_LogEntry> $logEntries
+        * @param \TYPO3\CMS\Extbase\Persistence\QueryResultInterface<TYPO3\CMS\Belog\Domain\Model\LogEntry> $logEntries
         * @param boolean $groupByPage Whether or not log entries should be grouped by page
         * @return array
         */
index e9d0ba7..9bc7c49 100644 (file)
@@ -37,8 +37,8 @@ class AddJsFileViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBacken
         *
         * @param string $file Custom JavaScript file to be loaded. Can be a file path inside the TYPO3 installation
         * @return void
-        * @see template
-        * @see t3lib_PageRenderer
+        * @see \TYPO3\CMS\Backend\Template\DocumentTemplate
+        * @see \TYPO3\CMS\Core\Page\PageRenderer
         */
        public function render($file) {
                $doc = $this->getDocInstance();
index 05bed75..38e75da 100644 (file)
@@ -37,8 +37,8 @@ class InlineSettingsArrayViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\Abst
         *
         * @param array $settings Custom JavaScript settings to be added
         * @return void
-        * @see template
-        * @see t3lib_PageRenderer
+        * @see \TYPO3\CMS\Backend\Template\DocumentTemplate
+        * @see \TYPO3\CMS\Core\Page\PageRenderer
         */
        public function render(array $settings) {
                $doc = $this->getDocInstance();
index 2cd8ccf..779ead2 100644 (file)
@@ -34,20 +34,11 @@ class HistoryEntryViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractVi
 
        /**
         * @var \TYPO3\CMS\Belog\Domain\Repository\HistoryEntryRepository
+        * @inject
         */
        protected $historyEntryRepository;
 
        /**
-        * Inject the system history entry repository.
-        *
-        * @param \TYPO3\CMS\Belog\Domain\Repository\HistoryEntryRepository $historyEntryRepository
-        * @return void
-        */
-       public function injectHistoryEntryRepository(\TYPO3\CMS\Belog\Domain\Repository\HistoryEntryRepository $historyEntryRepository) {
-               $this->historyEntryRepository = $historyEntryRepository;
-       }
-
-       /**
         * Get system history record
         *
         * @param integer $uid Uid of the log entry
index a1b5eeb..77e350a 100644 (file)
@@ -34,20 +34,11 @@ class WorkspaceTitleViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\Abstract
 
        /**
         * @var \TYPO3\CMS\Belog\Domain\Repository\WorkspaceRepository
+        * @inject
         */
        protected $workspaceRepository = NULL;
 
        /**
-        * Inject the workspace repository
-        *
-        * @param \TYPO3\CMS\Belog\Domain\Repository\WorkspaceRepository $workspaceRepository
-        * @return void
-        */
-       public function injectWorkspaceRepository(\TYPO3\CMS\Belog\Domain\Repository\WorkspaceRepository $workspaceRepository) {
-               $this->workspaceRepository = $workspaceRepository;
-       }
-
-       /**
         * Resolve workspace title from UID.
         *
         * @param integer $uid UID of the workspace