/**
     * constructor
     *
     * @param \TYPO3\CMS\Backend\Controller\BackendController TYPO3 backend object reference
     */
    public function __construct(\TYPO3\CMS\Backend\Controller\BackendController &$backendReference = NULL)
    {
        $this->backendReference = $backendReference;
        $this->changeWorkspace = GeneralUtility::_GP('changeWorkspace');
        $this->changeWorkspacePreview = GeneralUtility::_GP('changeWorkspacePreview');
        $pageRenderer = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Page\\PageRenderer');
        $this->backendReference->addJavaScript('TYPO3.Workspaces = { workspaceTitle : \'' . addslashes(\TYPO3\CMS\Workspaces\Service\WorkspaceService::getWorkspaceTitle($GLOBALS['BE_USER']->workspace)) . '\'};
');
    }
 /**
  * Constructor
  *
  * @param \TYPO3\CMS\Backend\Controller\BackendController $backendReference TYPO3 backend object reference
  */
 public function __construct(\TYPO3\CMS\Backend\Controller\BackendController &$backendReference = NULL)
 {
     $this->backendReference = $backendReference;
     $this->backendReference->addJavaScript('TYPO3.Workspaces = { workspaceTitle : ' . GeneralUtility::quoteJSvalue(addslashes(\TYPO3\CMS\Workspaces\Service\WorkspaceService::getWorkspaceTitle($GLOBALS['BE_USER']->workspace))) . '};');
 }