本文整理匯總了PHP中TYPO3\CMS\Backend\Template\DocumentTemplate::setExtDirectStateProvider方法的典型用法代碼示例。如果您正苦於以下問題:PHP DocumentTemplate::setExtDirectStateProvider方法的具體用法?PHP DocumentTemplate::setExtDirectStateProvider怎麽用?PHP DocumentTemplate::setExtDirectStateProvider使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TYPO3\CMS\Backend\Template\DocumentTemplate
的用法示例。
在下文中一共展示了DocumentTemplate::setExtDirectStateProvider方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: initialize
/**
* 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'];
}
}