/**
  * Initializes the controller before invoking an action method.
  *
  * @return void
  */
 protected function initializeAction()
 {
     // @todo Evaluate how the intval() call can be used with Extbase validators/filters
     $this->pageId = intval(t3lib_div::_GP('id'));
     $this->pageRenderer->addInlineSetting('Workspaces', 'id', $this->pageId);
     $this->pageRenderer->addInlineSetting('Workspaces', 'depth', $this->pageId === 0 ? 999 : 1);
     $this->pageRenderer->addCssFile(t3lib_extMgm::extRelPath('workspaces') . 'Resources/Public/StyleSheet/module.css');
     $this->pageRenderer->addInlineLanguageLabelArray(array('title' => $GLOBALS['LANG']->getLL('title'), 'path' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path'), 'table' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.table'), 'depth' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_perm.xml:Depth'), 'depth_0' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_0'), 'depth_1' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_1'), 'depth_2' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_2'), 'depth_3' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_3'), 'depth_4' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_4'), 'depth_infi' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.depth_infi')));
     $this->pageRenderer->addInlineLanguageLabelFile('EXT:workspaces/Resources/Private/Language/locallang.xml');
 }
 /**
  * This method loads the locallang.xml file (default language), and
  * adds all keys found in it to the TYPO3.settings.extension_builder._LOCAL_LANG object
  * translated into the current language
  *
  * Dots in a key are replaced by a _
  *
  * Example:
  *		error.name becomes TYPO3.settings.extension_builder._LOCAL_LANG.error_name
  *
  * @return void
  */
 private function setLocallangSettings()
 {
     $LL = t3lib_div::readLLfile('EXT:extension_builder/Resources/Private/Language/locallang.xml', 'default');
     if (!empty($LL['default']) && is_array($LL['default'])) {
         foreach ($LL['default'] as $key => $value) {
             $this->pageRenderer->addInlineSetting('extensionBuilder._LOCAL_LANG', str_replace('.', '_', $key), Tx_Extbase_Utility_Localization::translate($key, 'extension_builder'));
         }
     }
 }