[TASK] Constructor not correctly declared for WorkspaceSelectorToolbarItem
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 24 Aug 2012 17:08:05 +0000 (19:08 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 24 Aug 2012 17:15:43 +0000 (19:15 +0200)
Constructor in WorkspaceSelectorToolbarItem is not correctly declared.
\TYPO3backend -> \TYPO3\CMS\Backend\Controller\BackendController

Change-Id: Iefe08e47342c015898c77036684fc2344105aa4e
Resolves: #40137
Related: #40095
Releases: 6.0
Reviewed-on: http://review.typo3.org/14048
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/workspaces/Classes/ExtDirect/WorkspaceSelectorToolbarItem.php
typo3/sysext/workspaces/Classes/Service/GridDataService.php
typo3/sysext/workspaces/Classes/Service/WorkspaceService.php

index 1313acb..7af2e25 100644 (file)
@@ -27,6 +27,7 @@ namespace TYPO3\CMS\Workspaces\ExtDirect;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 if (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX) {
        require_once PATH_typo3 . 'interfaces/interface.backend_toolbaritem.php';
 }
@@ -47,7 +48,7 @@ class WorkspaceSelectorToolbarItem implements \TYPO3\CMS\Backend\Toolbar\Toolbar
        /**
         * reference back to the backend object
         *
-        * @var         TYPO3backend
+        * @var \TYPO3\CMS\Backend\Controller\BackendController
         */
        protected $backendReference;
 
@@ -56,9 +57,9 @@ class WorkspaceSelectorToolbarItem implements \TYPO3\CMS\Backend\Toolbar\Toolbar
        /**
         * constructor
         *
-        * @param       TYPO3backend    TYPO3 backend object reference
+        * @param \TYPO3\CMS\Backend\Controller\BackendController TYPO3 backend object reference
         */
-       public function __construct(\TYPO3backend &$backendReference = NULL) {
+       public function __construct(\TYPO3\CMS\Backend\Controller\BackendController &$backendReference = NULL) {
                $this->backendReference = $backendReference;
                $this->changeWorkspace = \t3lib_div::_GP('changeWorkspace');
                $this->changeWorkspacePreview = \t3lib_div::_GP('changeWorkspacePreview');
@@ -149,4 +150,4 @@ class WorkspaceSelectorToolbarItem implements \TYPO3\CMS\Backend\Toolbar\Toolbar
 if (!(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_AJAX)) {
        $GLOBALS['TYPO3backend']->addToolbarItem('workSpaceSelector', 'TYPO3\\CMS\\Workspaces\\ExtDirect\\WorkspaceSelectorToolbarItem');
 }
-?>
\ No newline at end of file
+?>
index df60996..aa66965 100644 (file)
@@ -534,10 +534,10 @@ class GridDataService {
        }
 
        /**
-        * @return \TYPO3\CMS\Extbase\Object\ObjectManager
+        * @return \TYPO3\CMS\Extbase\Object\ObjectManagerException
         */
        protected function getObjectManager() {
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
+               return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerException');
        }
 
 }
index 5c68986..974fb66 100644 (file)
@@ -568,7 +568,7 @@ class WorkspaceService implements \TYPO3\CMS\Core\SingletonInterface {
                if ($uid > 0) {
                        $uid = $this->getLivePageUid($uid);
                }
-               $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
+               $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManagerException');
                /** @var $uriBuilder \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder */
                $uriBuilder = $objectManager->create('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Routing\\UriBuilder');
                /** This seems to be very harsh to set this directly to "/typo3 but the viewOnClick also