/**
  * Initializes the Module
  *
  * @return 	void
  */
 public function initialize()
 {
     parent::init();
     $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
     $this->doc->setModuleTemplate(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('recycler') . 'mod1/mod_template.html');
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->setExtDirectStateProvider();
     $this->pageRenderer = $this->doc->getPageRenderer();
     $this->relativePath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('recycler');
     $this->pageRecord = BackendUtility::readPageAccess($this->id, $this->perms_clause);
     $this->isAccessibleForCurrentUser = $this->id && is_array($this->pageRecord) || !$this->id && $this->isCurrentUserAdmin();
     //don't access in workspace
     if ($GLOBALS['BE_USER']->workspace !== 0) {
         $this->isAccessibleForCurrentUser = FALSE;
     }
     //read configuration
     $modTS = $GLOBALS['BE_USER']->getTSConfig('mod.recycler');
     if ($this->isCurrentUserAdmin()) {
         $this->allowDelete = TRUE;
     } else {
         $this->allowDelete = $modTS['properties']['allowDelete'] == '1';
     }
     if (isset($modTS['properties']['recordsPageLimit']) && (int) $modTS['properties']['recordsPageLimit'] > 0) {
         $this->recordsPageLimit = (int) $modTS['properties']['recordsPageLimit'];
     }
 }