本文整理汇总了PHP中TYPO3\CMS\Backend\Template\DocumentTemplate::setModuleTemplate方法的典型用法代码示例。如果您正苦于以下问题:PHP DocumentTemplate::setModuleTemplate方法的具体用法?PHP DocumentTemplate::setModuleTemplate怎么用?PHP DocumentTemplate::setModuleTemplate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Backend\Template\DocumentTemplate
的用法示例。
在下文中一共展示了DocumentTemplate::setModuleTemplate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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'];
}
}
示例2: init
/**
* Initialize script class
*
* @return void
* @todo Define visibility
*/
public function init()
{
// Setting target, which must be a file reference to a file within the mounts.
$this->target = $this->origTarget = $fileIdentifier = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('target');
$this->returnUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('returnUrl'));
// create the file object
if ($fileIdentifier) {
$this->fileObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($fileIdentifier);
}
// Cleaning and checking target directory
if (!$this->fileObject) {
$title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:paramError', TRUE);
$message = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:targetNoDir', TRUE);
throw new \RuntimeException($title . ': ' . $message, 1294586841);
}
// Setting the title and the icon
$icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-filetree-root');
$this->title = $icon . htmlspecialchars($this->fileObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->fileObject->getIdentifier());
// ***************************
// Setting template object
// ***************************
$this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->doc->setModuleTemplate('templates/file_edit.html');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->JScode = $this->doc->wrapScriptTags('
function backToList() { //
top.goToModule("file_list");
}
');
$this->doc->form = '<form action="tce_file.php" method="post" name="editform">';
}
示例3: __construct
/**
* Constructs this view
*
* Defines the global variable SOBE. Normally this is used by the wizards
* which are one file only. This view is now the class with the global
* variable name SOBE.
*
* Defines the document template object.
*
* @see \TYPO3\CMS\Backend\Template\DocumentTemplate
*/
public function __construct()
{
$this->getLanguageService()->includeLLFile('EXT:cs_templates/Resources/Private/Language/locallang.xlf');
$GLOBALS['SOBE'] = $this;
// Define the document template object
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->setModuleTemplate('EXT:cs_seo/Resources/Private/Templates/Wizard.html');
}
示例4: __construct
/**
* Constructs this view
*
* Defines the global variable SOBE. Normally this is used by the wizards
* which are one file only. This view is now the class with the global
* variable name SOBE.
*
* Defines the document template object.
*
* @param \TYPO3\CMS\Form\Domain\Repository\ContentRepository $repository
* @see \TYPO3\CMS\Backend\Template\DocumentTemplate
*/
public function __construct(\TYPO3\CMS\Form\Domain\Repository\ContentRepository $repository)
{
parent::__construct($repository);
$GLOBALS['SOBE'] = $this;
// Define the document template object
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->setModuleTemplate('EXT:form/Resources/Private/Templates/Wizard.html');
}
示例5: init
/**
* First initialization of the global variables. Set some JS-code
*
* @return void
*/
function init()
{
global $BE_USER, $BACK_PATH;
$this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->doc->setModuleTemplate('EXT:direct_mail/mod1/mod_template.html');
$this->doc->showFlashMessages = FALSE;
$currentModule = GeneralUtility::_GP('currentModule');
$currentSubScript = BackendUtility::getModuleUrl($currentModule);
// Setting highlight mode:
$this->doHighlight = !$BE_USER->getTSConfigVal('options.pageTree.disableTitleHighlight');
$this->doc->inDocStylesArray[] = '#typo3-docheader-row2 { line-height: 14px !important; }
#typo3-docheader-row2 span { font-weight: bold; margin-top: -3px; color: #000; margin-top: 0; padding-left: 20px; }';
// Setting JavaScript for menu.
$this->doc->JScode = $this->doc->wrapScriptTags(($currentModule ? 'top.currentSubScript=unescape("' . rawurlencode($currentSubScript) . '");' : '') . '
function jumpTo(params,linkObj,highLightID) { //
var theUrl = top.currentSubScript+"&"+params;
if (top.condensedMode) {
top.content.document.location=theUrl;
} else {
parent.list_frame.document.location=theUrl;
}
' . ($this->doHighlight ? 'hilight_row("row"+top.fsMod.recentIds["txdirectmailM1"],highLightID);' : '') . '
' . (!$GLOBALS['CLIENT']['FORMSTYLE'] ? '' : 'if (linkObj) {linkObj.blur();}') . '
return false;
}
// Call this function, refresh_nav(), from another script in the backend if you want to refresh the navigation frame (eg. after having changed a page title or moved pages etc.)
// See t3lib_BEfunc::getSetUpdateSignal()
function refresh_nav() { //
window.setTimeout("_refresh_nav();",0);
}
function _refresh_nav() { //
document.location="' . htmlspecialchars(GeneralUtility::getIndpEnv('SCRIPT_NAME') . '?unique=' . time()) . '";
}
// Highlighting rows in the page tree:
function hilight_row(frameSetModule,highLightID) { //
// Remove old:
theObj = document.getElementById(top.fsMod.navFrameHighlightedID[frameSetModule]);
if (theObj) {
theObj.style.backgroundColor="";
}
// Set new:
top.fsMod.navFrameHighlightedID[frameSetModule] = highLightID;
theObj = document.getElementById(highLightID);
if (theObj) {
theObj.style.backgroundColor="' . GeneralUtility::modifyHTMLColor($this->doc->bgColor, -5, -5, -5) . '";
}
}
');
}
示例6: init
/**
* Initialize the module output
*
* @return void
*/
protected function init()
{
// Create internal template object
$this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/show_rechis.html');
// Start the page header
$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
}
示例7: init
/**
* Initialization
*
* @return void
* @todo Define visibility
*/
public function init()
{
global $BACK_PATH;
$this->MCONF = $GLOBALS['MCONF'];
$this->menuConfig();
$this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->doc->backPath = $BACK_PATH;
$this->doc->setModuleTemplate('EXT:lowlevel/Resources/Private/Templates/config.html');
$this->doc->form = '<form action="" method="post">';
}
示例8: __construct
/**
* Constructs this view
*
* Defines the global variable SOBE. Normally this is used by the wizards
* which are one file only. This view is now the class with the global
* variable name SOBE.
*
* Defines the document template object.
*
* @param \TYPO3\CMS\Form\Domain\Repository\ContentRepository $repository
* @see \TYPO3\CMS\Backend\Template\DocumentTemplate
*/
public function __construct(\TYPO3\CMS\Form\Domain\Repository\ContentRepository $repository)
{
parent::__construct($repository);
$GLOBALS['LANG']->includeLLFile('EXT:form/Resources/Private/Language/locallang_wizard.xlf');
$GLOBALS['SOBE'] = $this;
// Define the document template object
$this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:form/Resources/Private/Templates/Wizard.html');
$this->pageRenderer = $this->doc->getPageRenderer();
}
示例9: init
/**
* Initialization
*
* @return void
* @todo Define visibility
*/
public function init()
{
$this->MCONF = $GLOBALS['MCONF'];
$this->menuConfig();
$this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->doc->form = '<form action="" method="post">';
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('indexed_search') . '/mod/mod_template.html');
$this->doc->tableLayout = array('defRow' => array('0' => array('<td valign="top" nowrap>', '</td>'), 'defCol' => array('<td><img src="' . $this->doc->backPath . 'clear.gif" width=10 height=1></td><td valign="top" nowrap>', '</td>')));
$indexer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\IndexedSearch\\Indexer');
$indexer->initializeExternalParsers();
}
示例10: __construct
/**
* Constructs this view
*
* Defines the global variable SOBE. Normally this is used by the wizards
* which are one file only. This view is now the class with the global
* variable name SOBE.
*
* Defines the document template object.
*
* @param \TYPO3\CMS\Form\Domain\Repository\ContentRepository $repository
* @see \TYPO3\CMS\Backend\Template\DocumentTemplate
*/
public function __construct(\TYPO3\CMS\Form\Domain\Repository\ContentRepository $repository)
{
parent::__construct($repository);
$GLOBALS['SOBE'] = $this;
// Define the document template object
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:form/Resources/Private/Templates/Wizard.html');
$this->pageRenderer = $this->doc->getPageRenderer();
$this->pageRenderer->enableConcatenateFiles();
$this->pageRenderer->enableCompressCss();
$this->pageRenderer->enableCompressJavascript();
}
示例11: init
/**
* Initialization
*
* @return void
* @todo Define visibility
*/
public function init()
{
global $LANG, $BACK_PATH;
$this->MCONF = $GLOBALS['MCONF'];
$this->menuConfig();
$this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->doc->backPath = $BACK_PATH;
$this->doc->setModuleTemplate('EXT:lowlevel/Resources/Private/Templates/dbint.html');
$this->doc->form = '<form action="" method="post" name="' . $this->formName . '">';
$this->doc->table_TABLE = '<table class="t3-table">
<colgroup><col width="24"><col><col width="150"></colgroup>';
$this->doc->tableLayout = array('0' => array('tr' => array('<thead><tr>', '</tr></thead>'), 'defCol' => array('<th>', '</th>')), 'defRow' => array('defCol' => array('<td>', '</td>')));
}
示例12: init
/**
* Initialize
*
* @return void
*/
protected function init()
{
// Initialize GPvars:
$this->target = GeneralUtility::_GP('target');
$this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
if (!$this->returnUrl) {
$this->returnUrl = GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . BackendUtility::getModuleUrl('file_list') . '&id=' . rawurlencode($this->target);
}
// Create the folder object
if ($this->target) {
$this->folderObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($this->target);
}
if ($this->folderObject->getStorage()->getUid() === 0) {
throw new \TYPO3\CMS\Core\Resource\Exception\InsufficientFolderAccessPermissionsException('You are not allowed to access folders outside your storages', 1375889834);
}
// Cleaning and checking target directory
if (!$this->folderObject) {
$title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:paramError', TRUE);
$message = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir', TRUE);
throw new \RuntimeException($title . ': ' . $message, 1294586843);
}
// Setting the title and the icon
$icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-filetree-root');
$this->title = $icon . htmlspecialchars($this->folderObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->folderObject->getIdentifier());
// Setting template object
$this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_upload.html');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->form = '<form action="tce_file.php" method="post" name="editform" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '">';
}
示例13: init
/**
* Constructor, initializing internal variables.
*
* @return void
*/
public function init()
{
$lang = $this->getLanguageService();
$lang->includeLLFile('EXT:lang/locallang_misc.xlf');
$LOCAL_LANG_orig = $GLOBALS['LOCAL_LANG'];
$lang->includeLLFile('EXT:cms/layout/locallang_db_new_content_el.xlf');
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($LOCAL_LANG_orig, $GLOBALS['LOCAL_LANG']);
$GLOBALS['LOCAL_LANG'] = $LOCAL_LANG_orig;
// Setting internal vars:
$this->id = (int) GeneralUtility::_GP('id');
$this->sys_language = (int) GeneralUtility::_GP('sys_language_uid');
$this->R_URI = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
$this->colPos = GeneralUtility::_GP('colPos') === NULL ? NULL : (int) GeneralUtility::_GP('colPos');
$this->uid_pid = (int) GeneralUtility::_GP('uid_pid');
$this->MCONF['name'] = 'xMOD_db_new_content_el';
$this->modTSconfig = BackendUtility::getModTSconfig($this->id, 'mod.wizards.newContentElement');
$config = BackendUtility::getPagesTSconfig($this->id);
$this->config = $config['mod.']['wizards.']['newContentElement.'];
// Starting the document template object:
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/db_new_content_el.html');
$this->doc->JScode = '';
$this->doc->form = '<form action="" name="editForm"><input type="hidden" name="defValues" value="" />';
// Setting up the context sensitive menu:
$this->doc->getContextMenuCode();
// Getting the current page and receiving access information (used in main())
$perms_clause = $this->getBackendUser()->getPagePermsClause(1);
$this->pageInfo = BackendUtility::readPageAccess($this->id, $perms_clause);
$this->access = is_array($this->pageInfo) ? 1 : 0;
}
示例14: init
/**
* Initializes the module for display of the settings form.
*
* @return void
* @todo Define visibility
*/
public function init()
{
$GLOBALS['LANG']->includeLLFile('EXT:setup/mod/locallang.xlf');
$this->MCONF = $GLOBALS['MCONF'];
// Returns the script user - that is the REAL logged in user! ($GLOBALS[BE_USER] might be another user due to simulation!)
$scriptUser = $this->getRealScriptUserObj();
// ... and checking module access for the logged in user.
$scriptUser->modAccess($this->MCONF, 1);
$this->isAdmin = $scriptUser->isAdmin();
// Getting the 'override' values as set might be set in User TSconfig
$this->overrideConf = $GLOBALS['BE_USER']->getTSConfigProp('setup.override');
// Getting the disabled fields might be set in User TSconfig (eg setup.fields.password.disabled=1)
$this->tsFieldConf = $GLOBALS['BE_USER']->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;
}
// Create instance of object for output of data
$this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$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->tableLayout = array('defRow' => array('0' => array('<td class="td-label">', '</td>'), 'defCol' => array('<td valign="top">', '</td>')));
$this->doc->table_TR = '<tr>';
$this->doc->table_TABLE = '<table border="0" cellspacing="1" cellpadding="2" class="typo3-usersettings">';
$this->doc->JScode .= $this->getJavaScript();
}
示例15: init
/**
* Initialize
*
* @return void
*/
protected function init()
{
// Initialize GPvars:
$this->target = GeneralUtility::_GP('target');
$this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
if (!$this->returnUrl) {
$this->returnUrl = GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . BackendUtility::getModuleUrl('file_list') . '&id=' . rawurlencode($this->target);
}
// Create the folder object
if ($this->target) {
$this->folderObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($this->target);
}
if ($this->folderObject->getStorage()->getUid() === 0) {
throw new \TYPO3\CMS\Core\Resource\Exception\InsufficientFolderAccessPermissionsException('You are not allowed to access folders outside your storages', 1375889834);
}
// Cleaning and checking target directory
if (!$this->folderObject) {
$title = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:paramError', true);
$message = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir', true);
throw new \RuntimeException($title . ': ' . $message, 1294586843);
}
// Setting the title and the icon
$icon = $this->iconFactory->getIcon('apps-filetree-root', Icon::SIZE_SMALL)->render();
$this->title = $icon . htmlspecialchars($this->folderObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->folderObject->getIdentifier());
// Setting template object
$this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
$this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_upload.html');
$this->doc->form = '<form action="' . htmlspecialchars(BackendUtility::getModuleUrl('tce_file')) . '" method="post" name="editform" enctype="multipart/form-data">';
}