本文整理匯總了PHP中TYPO3\CMS\Backend\Template\DocumentTemplate::addStyleSheet方法的典型用法代碼示例。如果您正苦於以下問題:PHP DocumentTemplate::addStyleSheet方法的具體用法?PHP DocumentTemplate::addStyleSheet怎麽用?PHP DocumentTemplate::addStyleSheet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TYPO3\CMS\Backend\Template\DocumentTemplate
的用法示例。
在下文中一共展示了DocumentTemplate::addStyleSheet方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: initialize
/**
* Initializes the Module
*
* @return void
*/
protected function initialize()
{
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['linkvalidator']['checkLinks'] as $linkType => $classRef) {
$this->hookObjectsArr[$linkType] = GeneralUtility::getUserObj($classRef);
}
}
$this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:linkvalidator/Resources/Private/Templates/mod_template.html');
$this->pageRecord = BackendUtility::readPageAccess($this->pObj->id, $this->getBackendUser()->getPagePermsClause(1));
if ($this->pObj->id && is_array($this->pageRecord) || !$this->pObj->id && $this->isCurrentUserAdmin()) {
$this->isAccessibleForCurrentUser = TRUE;
}
$this->doc->addStyleSheet('module', 'sysext/linkvalidator/Resources/Public/Styles/styles.css');
$this->doc->getPageRenderer()->loadJquery();
$this->doc->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Linkvalidator/Linkvalidator');
// Don't access in workspace
if ($this->getBackendUser()->workspace !== 0) {
$this->isAccessibleForCurrentUser = FALSE;
}
}
示例2: init
/**
* Initializes the module for display of the settings form.
*
* @return void
*/
public function init()
{
$this->getLanguageService()->includeLLFile('EXT:setup/mod/locallang.xlf');
// Returns the script user - that is the REAL logged in user! ($GLOBALS[BE_USER] might be another user due to simulation!)
$scriptUser = $this->getRealScriptUserObj();
$this->isAdmin = $scriptUser->isAdmin();
// Getting the 'override' values as set might be set in User TSconfig
$this->overrideConf = $this->getBackendUser()->getTSConfigProp('setup.override');
// Getting the disabled fields might be set in User TSconfig (eg setup.fields.password.disabled=1)
$this->tsFieldConf = $this->getBackendUser()->getTSConfigProp('setup.fields');
// id password is disabled, disable repeat of password too (password2)
if (isset($this->tsFieldConf['password.']) && $this->tsFieldConf['password.']['disabled']) {
$this->tsFieldConf['password2.']['disabled'] = 1;
$this->tsFieldConf['passwordCurrent.']['disabled'] = 1;
}
// Create instance of object for output of data
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:setup/Resources/Private/Templates/setup.html');
$this->doc->form = '<form action="' . BackendUtility::getModuleUrl('user_setup') . '" method="post" name="usersetup" enctype="application/x-www-form-urlencoded">';
$this->doc->addStyleSheet('module', 'sysext/setup/Resources/Public/Styles/styles.css');
$this->doc->JScode .= $this->getJavaScript();
}
示例3: loadHeaderData
/**
* Loads data in the HTML head section (e.g. JavaScript or stylesheet information)
*
* @return void
*/
protected function loadHeaderData()
{
$this->doc->addStyleSheet('linkvalidator', $this->relativePath . 'Resources/Public/Css/linkvalidator.css', 'linkvalidator');
$this->pageRenderer->addJsFile($this->doc->backPath . 'js/extjs/ux/Ext.ux.FitToParent.js');
}