当前位置: 首页>>代码示例>>PHP>>正文


PHP BackendUtility::getFuncMenu方法代码示例

本文整理汇总了PHP中TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu方法的典型用法代码示例。如果您正苦于以下问题:PHP BackendUtility::getFuncMenu方法的具体用法?PHP BackendUtility::getFuncMenu怎么用?PHP BackendUtility::getFuncMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TYPO3\CMS\Backend\Utility\BackendUtility的用法示例。


在下文中一共展示了BackendUtility::getFuncMenu方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: main

 /**
  * MAIN function for page information of localization
  *
  * @return string Output HTML for the module.
  * @todo Define visibility
  */
 public function main()
 {
     global $BACK_PATH, $LANG, $SOBE;
     $theOutput = $this->pObj->doc->header($LANG->sL('LLL:EXT:cms/web_info/locallang.xlf:lang_title'));
     if ($this->pObj->id) {
         // Depth selector:
         $h_func = BackendUtility::getFuncMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth']);
         $h_func .= BackendUtility::getFuncMenu($this->pObj->id, 'SET[lang]', $this->pObj->MOD_SETTINGS['lang'], $this->pObj->MOD_MENU['lang']);
         $theOutput .= $h_func;
         // Add CSH:
         $theOutput .= BackendUtility::cshItem('_MOD_web_info', 'lang', $GLOBALS['BACK_PATH'], '|<br />');
         // Showing the tree:
         // Initialize starting point of page tree:
         $treeStartingPoint = (int) $this->pObj->id;
         $treeStartingRecord = BackendUtility::getRecordWSOL('pages', $treeStartingPoint);
         $depth = $this->pObj->MOD_SETTINGS['depth'];
         // Initialize tree object:
         $tree = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Tree\\View\\PageTreeView');
         $tree->init('AND ' . $GLOBALS['BE_USER']->getPagePermsClause(1));
         $tree->addField('l18n_cfg');
         // Creating top icon; the current page
         $HTML = IconUtility::getSpriteIconForRecord('pages', $treeStartingRecord);
         $tree->tree[] = array('row' => $treeStartingRecord, 'HTML' => $HTML);
         // Create the tree from starting point:
         if ($depth) {
             $tree->getTree($treeStartingPoint, $depth, '');
         }
         // Render information table:
         $theOutput .= $this->renderL10nTable($tree);
     }
     return $theOutput;
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:38,代码来源:TranslationStatusController.php

示例2: main

 /**
  * MAIN function for page information display
  *
  * @return string Output HTML for the module.
  * @todo Define visibility
  */
 public function main()
 {
     global $BACK_PATH, $LANG, $SOBE;
     $dblist = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\View\\PageLayoutView');
     $dblist->descrTable = '_MOD_' . $GLOBALS['MCONF']['name'];
     $dblist->backPath = $BACK_PATH;
     $dblist->thumbs = 0;
     $dblist->script = 'index.php';
     $dblist->showIcon = 0;
     $dblist->setLMargin = 0;
     $dblist->agePrefixes = $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears');
     $dblist->pI_showUser = 1;
     // PAGES:
     $this->pObj->MOD_SETTINGS['pages_levels'] = $this->pObj->MOD_SETTINGS['depth'];
     // ONLY for the sake of dblist module which uses this value.
     $h_func = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth'], 'index.php');
     $h_func .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[pages]', $this->pObj->MOD_SETTINGS['pages'], $this->pObj->MOD_MENU['pages'], 'index.php');
     $dblist->start($this->pObj->id, 'pages', 0);
     $dblist->generateList();
     // CSH
     $theOutput .= $this->pObj->doc->header($LANG->getLL('page_title'));
     $theOutput .= $this->pObj->doc->section('', \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem($dblist->descrTable, 'pagetree_overview', $GLOBALS['BACK_PATH'], '|<br />') . $h_func . $dblist->HTMLcode, 0, 1);
     // Additional footer content
     $footerContentHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/web_info/class.tx_cms_webinfo.php']['drawFooterHook'];
     if (is_array($footerContentHook)) {
         foreach ($footerContentHook as $hook) {
             $params = array();
             $theOutput .= \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($hook, $params, $this);
         }
     }
     return $theOutput;
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:38,代码来源:PageInformationController.php

示例3: main

    /**
     * Creates the module's content. In this case it rather acts as a kind of #
     * dispatcher redirecting requests to specific tasks.
     *
     * @return void
     */
    public function main()
    {
        $docHeaderButtons = $this->getButtons();
        $markers = array();
        $this->doc->JScodeArray[] = '
			script_ended = 0;
			function jumpToUrl(URL) {
				document.location = URL;
			}
		';
        $this->doc->postCode = '
			<script language="javascript" type="text/javascript">
				script_ended = 1;
				if (top.fsMod) {
					top.fsMod.recentIds["web"] = 0;
				}
			</script>
		';
        // Render content depending on the mode
        $mode = (string) $this->MOD_SETTINGS['mode'];
        if ($mode == 'information') {
            $this->renderInformationContent();
        } else {
            $this->renderModuleContent();
        }
        // Compile document
        $markers['FUNC_MENU'] = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(0, 'SET[mode]', $this->MOD_SETTINGS['mode'], $this->MOD_MENU['mode']);
        $markers['CONTENT'] = $this->content;
        // Build the <body> for the module
        $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
        // Renders the module page
        $this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $this->content);
    }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:39,代码来源:TaskModuleController.php

示例4: main

 /**
  * Main function of the module. Write the content to $this->content
  *
  * @return 	void
  */
 public function main()
 {
     $this->thisScript = BackendUtility::getModuleUrl($this->MCONF['name']);
     // Clean up settings:
     $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('SET'), $this->MCONF['name']);
     // Draw the header
     $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->form = '<form action="" method="post">';
     // DBAL page title:
     $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));
     $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
     $this->content .= $this->doc->spacer(5);
     $this->content .= $this->doc->section('', $this->doc->funcMenu('', BackendUtility::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));
     // Debug log:
     switch ($this->MOD_SETTINGS['function']) {
         case 'info':
             $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('Cached_info'), $this->printCachedInfo());
             break;
         case 'sqlcheck':
             $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('SQL_check'), $this->printSqlCheck());
             break;
         case 0:
             $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('Debug_log'), $this->printLogMgm());
             break;
     }
     // ShortCut
     if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
         $this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));
     }
     $this->content .= $this->doc->spacer(10);
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:37,代码来源:ModuleController.php

示例5: main

 /**
  * Creation of the main content. Calling extObjContent() to trigger content generation from the sub-sub modules
  *
  * @return string The content
  * @todo Define visibility
  */
 public function main()
 {
     global $SOBE, $LANG;
     $menu = $LANG->getLL('wiz_lWizards', TRUE) . ': ' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[wiz]', $this->pObj->MOD_SETTINGS['wiz'], $this->pObj->MOD_MENU['wiz']);
     $theOutput .= $this->pObj->doc->section('', '<span class="nobr">' . $menu . '</span>');
     $content = '';
     $content .= $theOutput;
     $content .= $this->pObj->doc->spacer(20);
     $content .= $this->extObjContent();
     return $content;
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:17,代码来源:WebFunctionWizardsBaseController.php

示例6: main

 /**
  * Creation of the main content. Calling extObjContent() to trigger content generation from the sub-sub modules
  *
  * @return string The content
  */
 public function main()
 {
     $menu = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[wiz]', $this->pObj->MOD_SETTINGS['wiz'], $this->pObj->MOD_MENU['wiz']);
     $content = '';
     if (!empty($menu)) {
         $menu = $GLOBALS['LANG']->getLL('wiz_lWizards', true) . ': ' . $menu;
         $content = $this->pObj->doc->section('', '<span class="text-nowrap">' . $menu . '</span>');
         $content .= $this->pObj->doc->spacer(20);
     }
     $content .= $this->extObjContent();
     return $content;
 }
开发者ID:hlop,项目名称:TYPO3.CMS,代码行数:17,代码来源:WebFunctionWizardsBaseController.php

示例7: main

    /**
     * Initialize module header etc and call extObjContent function
     *
     * @return void
     * @todo Define visibility
     */
    public function main()
    {
        global $LANG, $BACK_PATH;
        // Access check...
        // The page will show only if there is a valid page and if this page may be viewed by the user
        $this->pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->id, $this->perms_clause);
        $access = is_array($this->pageinfo) ? 1 : 0;
        // Template markers
        $markers = array('CSH' => '', 'FUNC_MENU' => '', 'CONTENT' => '');
        $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
        $this->doc->backPath = $BACK_PATH;
        $this->doc->setModuleTemplate('templates/func.html');
        // Main
        if ($this->id && $access) {
            // JavaScript
            $this->doc->JScode = $this->doc->wrapScriptTags('
				script_ended = 0;
				function jumpToUrl(URL) {	//
					window.location.href = URL;
				}
			');
            $this->doc->postCode = $this->doc->wrapScriptTags('
				script_ended = 1;
				if (top.fsMod) top.fsMod.recentIds["web"] = ' . intval($this->id) . ';
			');
            // Setting up the context sensitive menu:
            $this->doc->getContextMenuCode();
            $this->doc->form = '<form action="index.php" method="post"><input type="hidden" name="id" value="' . $this->id . '" />';
            $vContent = $this->doc->getVersionSelector($this->id, 1);
            if ($vContent) {
                $this->content .= $this->doc->section('', $vContent);
            }
            $this->extObjContent();
            // Setting up the buttons and markers for docheader
            $docHeaderButtons = $this->getButtons();
            $markers['CSH'] = $docHeaderButtons['csh'];
            $markers['FUNC_MENU'] = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
            $markers['CONTENT'] = $this->content;
        } else {
            // If no access or if ID == zero
            $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $LANG->getLL('clickAPage_content'), $LANG->getLL('title'), \TYPO3\CMS\Core\Messaging\FlashMessage::INFO);
            $this->content = $flashMessage->render();
            // Setting up the buttons and markers for docheader
            $docHeaderButtons = $this->getButtons();
            $markers['CSH'] = $docHeaderButtons['csh'];
            $markers['CONTENT'] = $this->content;
        }
        // Build the <body> for the module
        $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
        // Renders the module page
        $this->content = $this->doc->render($LANG->getLL('title'), $this->content);
    }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:58,代码来源:PageFunctionsController.php

示例8: main

    public function main()
    {
        global $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS, $TYPO3_DB;
        $this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause);
        $access = is_array($this->pageinfo) ? 1 : 0;
        $this->pageId = $this->pageinfo['uid'];
        if ($this->id && $access || $BE_USER->user['admin'] && !$this->id) {
            // Draw the header.
            $this->doc = GeneralUtility::makeInstance('template');
            $this->doc->backPath = $BACK_PATH;
            $this->doc->form = '<form action="mod.php?M=web_txvalidateurlsM1" method="POST">';
            // JavaScript
            $this->doc->JScode = '
				<script language="javascript" type="text/javascript">
					script_ended = 0;
					function jumpToUrl(URL)
					{
						document.location = URL;
					}
				</script>
			';
            $this->doc->postCode = '
				<script language="javascript" type="text/javascript">
					script_ended = 1;
					if (top.fsMod) top.fsMod.recentIds["web"] = 0;
				</script>
			';
            $headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />' . $LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . GeneralUtility::fixed_lgd_cs($this->pageinfo['_thePath'], 50);
            $this->content .= $this->doc->startPage($LANG->getLL('title'));
            $this->content .= $this->doc->header($LANG->getLL('title'));
            $this->content .= $this->doc->spacer(5);
            $this->content .= $this->doc->section('', $this->doc->funcMenu($headerSection, BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));
            $this->content .= $this->doc->divider(5);
            // Render content:
            $this->moduleContent();
            // ShortCut
            if ($BE_USER->mayMakeShortcut()) {
                $this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));
            }
            $this->content .= $this->doc->spacer(10);
            $this->content .= '</div>';
        } else {
            // If no access or if ID == zero
            $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
            $this->doc->backPath = $BACK_PATH;
            $this->content .= $this->doc->startPage($LANG->getLL('title'));
            $this->content .= $this->doc->header($LANG->getLL('title'));
            $this->content .= $this->doc->spacer(5);
            $this->content .= $this->doc->spacer(10);
        }
    }
开发者ID:dschledermann,项目名称:typo3-linkservice,代码行数:51,代码来源:Module.php

示例9: main

 /**
  * Creation of the main content. Calling extObjContent() to trigger content generation from the sub-sub modules
  *
  * @return string The content
  */
 public function main()
 {
     $menu = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->pObj->id, 'SET[wiz]', $this->pObj->MOD_SETTINGS['wiz'], $this->pObj->MOD_MENU['wiz']);
     $content = '';
     if (!empty($menu)) {
         $menu = $GLOBALS['LANG']->getLL('wiz_lWizards', true) . ': ' . $menu;
         $content = '<div>';
         $content .= '<span class="text-nowrap">' . $menu . '</span>';
         $content .= '</div>';
         $content .= '<div style="padding-top: 20px;"></div>';
     }
     $content .= $this->extObjContent();
     return $content;
 }
开发者ID:cabservicesag,项目名称:compatibility6,代码行数:19,代码来源:WebFunctionWizardsBaseController.php

示例10: main

    /**
     * Initialize module header etc and call extObjContent function
     *
     * @return void
     * @todo Define visibility
     */
    public function main()
    {
        // Access check...
        // The page will show only if there is a valid page and if this page may be viewed by the user
        $this->pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->id, $this->perms_clause);
        $access = is_array($this->pageinfo) ? 1 : 0;
        if ($this->id && $access || $GLOBALS['BE_USER']->user['admin'] && !$this->id) {
            $this->CALC_PERMS = $GLOBALS['BE_USER']->calcPerms($this->pageinfo);
            if ($GLOBALS['BE_USER']->user['admin'] && !$this->id) {
                $this->pageinfo = array('title' => '[root-level]', 'uid' => 0, 'pid' => 0);
            }
            $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
            $this->doc->backPath = $GLOBALS['BACK_PATH'];
            $this->doc->setModuleTemplate('templates/info.html');
            $this->doc->tableLayout = array('0' => array('0' => array('<td valign="top"><strong>', '</strong></td>'), 'defCol' => array('<td><img src="' . $this->doc->backPath . 'clear.gif" width="10" height="1" alt="" /></td><td valign="top"><strong>', '</strong></td>')), 'defRow' => array('0' => array('<td valign="top">', '</td>'), 'defCol' => array('<td><img src="' . $this->doc->backPath . 'clear.gif" width="10" height="1" alt="" /></td><td valign="top">', '</td>')));
            // JavaScript
            $this->doc->JScode = $this->doc->wrapScriptTags('
				script_ended = 0;
				function jumpToUrl(URL) {	//
					window.location.href = URL;
				}
			');
            $this->doc->postCode = $this->doc->wrapScriptTags('
				script_ended = 1;
				if (top.fsMod) top.fsMod.recentIds["web"] = ' . intval($this->id) . ';
			');
            // Setting up the context sensitive menu:
            $this->doc->getContextMenuCode();
            $this->doc->form = '<form action="index.php" method="post" name="webinfoForm">';
            $vContent = $this->doc->getVersionSelector($this->id, 1);
            if ($vContent) {
                $this->content .= $this->doc->section('', $vContent);
            }
            $this->extObjContent();
            // Setting up the buttons and markers for docheader
            $docHeaderButtons = $this->getButtons();
            $markers = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), 'CONTENT' => $this->content);
            // Build the <body> for the module
            $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
        } else {
            // If no access or if ID == zero
            $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\MediumDocumentTemplate');
            $this->doc->backPath = $GLOBALS['BACK_PATH'];
            $this->content = $this->doc->header($GLOBALS['LANG']->getLL('title'));
            $this->content .= $this->doc->spacer(5);
            $this->content .= $this->doc->spacer(10);
        }
        // Renders the module page
        $this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $this->content);
    }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:56,代码来源:InfoModuleController.php

示例11: main

    /**
     * Main function of the module.
     * Write the content to $this->content
     */
    function main()
    {
        // Access check!
        // The page will show only if there is a valid page and if this page may be viewed by the user
        $this->pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->id, $this->perms_clause);
        $access = is_array($this->pageinfo) ? 1 : 0;
        $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
        $this->doc->backPath = $GLOBALS['BACK_PATH'];
        if ($this->id && $access || $GLOBALS['BE_USER']->user['admin'] && !$this->id) {
            // Draw the header.
            $this->doc->form = '<form action="" method="POST">';
            // JavaScript
            $this->doc->JScode = '
				<script language="javascript" type="text/javascript">
					script_ended = 0;
					function jumpToUrl(URL)	{
						document.location = URL;
					}
				</script>
			';
            $this->doc->postCode = '
				<script language="javascript" type="text/javascript">
					script_ended = 1;
					if (top.fsMod) top.fsMod.recentIds["web"] = ' . intval($this->id) . ';
				</script>
			';
            $headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.path') . ': ' . GeneralUtility::fixed_lgd_cs($this->pageinfo['_thePath'], -50);
            $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));
            $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
            $this->content .= $this->doc->spacer(5);
            $this->content .= $this->doc->section('', $this->doc->funcMenu($headerSection, \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));
            $this->content .= $this->doc->divider(5);
            // Render content:
            $this->moduleContent();
            // ShortCut
            if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
                $this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));
            }
            $this->content .= $this->doc->spacer(10);
        } else {
            // If no access or if ID == zero
            $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));
            $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
            $this->content .= $this->doc->spacer(5);
            $this->content .= $this->doc->spacer(10);
        }
    }
开发者ID:ulrikkold,项目名称:cal,代码行数:51,代码来源:CalIndexer.php

示例12: main

 /**
  * Initialize module header etc and call extObjContent function
  *
  * @return void
  */
 public function main()
 {
     // Access check...
     // The page will show only if there is a valid page and if this page may be viewed by the user
     $this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause);
     $access = is_array($this->pageinfo);
     // Template markers
     $markers = array('CSH' => '', 'FUNC_MENU' => '', 'CONTENT' => '');
     $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->setModuleTemplate('EXT:func/Resources/Private/Templates/func.html');
     // Main
     if ($this->id && $access) {
         // JavaScript
         $this->doc->postCode = $this->doc->wrapScriptTags('if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int) $this->id . ';');
         // Setting up the context sensitive menu:
         $this->doc->getContextMenuCode();
         $this->doc->form = '<form action="' . htmlspecialchars(BackendUtility::getModuleUrl('web_func')) . '" method="post"><input type="hidden" name="id" value="' . htmlspecialchars($this->id) . '" />';
         $vContent = $this->doc->getVersionSelector($this->id, TRUE);
         if ($vContent) {
             $this->content .= $this->doc->section('', $vContent);
         }
         $this->extObjContent();
         // Setting up the buttons and markers for docheader
         $docHeaderButtons = $this->getButtons();
         $markers['CSH'] = $docHeaderButtons['csh'];
         $markers['FUNC_MENU'] = BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
         $markers['CONTENT'] = $this->content;
     } else {
         // If no access or if ID == zero
         $title = $this->getLanguageService()->getLL('title');
         $message = $this->getLanguageService()->getLL('clickAPage_content');
         $view = GeneralUtility::makeInstance(StandaloneView::class);
         $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:func/Resources/Private/Templates/InfoBox.html'));
         $view->assignMultiple(array('title' => $title, 'message' => $message, 'state' => InfoboxViewHelper::STATE_INFO));
         $this->content = $view->render();
         // Setting up the buttons and markers for docheader
         $docHeaderButtons = $this->getButtons();
         $markers['CSH'] = $docHeaderButtons['csh'];
         $markers['CONTENT'] = $this->content;
     }
     // Build the <body> for the module
     $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
     // Renders the module page
     $this->content = $this->doc->render($this->getLanguageService()->getLL('title'), $this->content);
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:51,代码来源:PageFunctionsController.php

示例13: main

    /**
     * Main function of the module. Write the content to $this->content
     *
     * @return void
     * @todo Define visibility
     */
    public function main()
    {
        // Access check!
        $access = $GLOBALS['BE_USER']->check('modules', 'help_txtsconfighelpM1');
        // Draw the header.
        $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
        $this->doc->backPath = $GLOBALS['BACK_PATH'];
        $this->doc->setModuleTemplate('templates/tsconfig_help.html');
        if ($access || $GLOBALS['BE_USER']->user['admin']) {
            $this->doc->form = '<form action="" method="post">';
            // JavaScript
            $this->doc->JScode = '
				<script language="javascript" type="text/javascript">
					script_ended = 0;
					function jumpToUrl(URL) {
						document.location = URL;
					}
				</script>
			';
            $this->doc->postCode = '
				<script language="javascript" type="text/javascript">
					script_ended = 1;
					if (top.fsMod) top.fsMod.recentIds["web"] = 0;
				</script>
			';
            $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
            // Render content:
            $this->moduleContent();
            $this->content .= $this->doc->spacer(10);
            $markers['FUNC_MENU'] = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
        } else {
            $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
            $markers['FUNC_MENU'] = '';
        }
        // Setting up the buttons and markers for docheader
        $docHeaderButtons = $this->getButtons();
        $markers['CSH'] = $docHeaderButtons['csh'];
        $markers['CONTENT'] = $this->content;
        // Build the <body> for the module
        $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
        // Renders the module page
        $this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $this->content);
    }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:49,代码来源:TypoScriptConfigHelpModuleController.php

示例14: main

 /**
  * Creates the module's content. In this case it rather acts as a kind of #
  * dispatcher redirecting requests to specific tasks.
  *
  * @return void
  */
 public function main()
 {
     $docHeaderButtons = $this->getButtons();
     $markers = array();
     $this->doc->postCode = $this->doc->wrapScriptTags('if (top.fsMod) { top.fsMod.recentIds["web"] = 0; }');
     // Render content depending on the mode
     $mode = (string) $this->MOD_SETTINGS['mode'];
     if ($mode == 'information') {
         $this->renderInformationContent();
     } else {
         $this->renderModuleContent();
     }
     // Compile document
     $markers['FUNC_MENU'] = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(0, 'SET[mode]', $this->MOD_SETTINGS['mode'], $this->MOD_MENU['mode']);
     $markers['CONTENT'] = $this->content;
     // Build the <body> for the module
     $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
     // Renders the module page
     $this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $this->content);
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:26,代码来源:TaskModuleController.php

示例15: main

 /**
  * Main function to generate the content
  *
  * @return 	void
  * @todo Define visibility
  */
 public function main()
 {
     $this->content = $this->doc->header('Indexing Engine Statistics');
     $this->content .= $this->doc->spacer(5);
     switch ($this->MOD_SETTINGS['function']) {
         case 'stat':
             $this->content .= $this->doc->section('Records', $this->doc->table($this->getRecordsNumbers()), 0, 1);
             $this->content .= $this->doc->spacer(15);
             $this->content .= $this->doc->section('index_phash TYPES', $this->doc->table($this->getPhashTypes()), 1);
             $this->content .= $this->doc->spacer(15);
             break;
         case 'externalDocs':
             $this->content .= $this->doc->section('External documents', $this->doc->table($this->getPhashExternalDocs()), 0, 1);
             $this->content .= $this->doc->spacer(15);
             break;
         case 'typo3pages':
             $this->content .= $this->doc->section('TYPO3 Pages', $this->doc->table($this->getPhashT3pages()), 0, 1);
             $this->content .= $this->doc->spacer(15);
             break;
     }
     $docHeaderButtons = $this->getButtons();
     $markers = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => BackendUtility::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), 'CONTENT' => $this->content);
     $this->content = $this->doc->startPage('Indexing Engine Statistics');
     $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
     $this->content .= $this->doc->endPage();
     $this->content = $this->doc->insertStylesAndJS($this->content);
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:33,代码来源:ModuleController.php


注:本文中的TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。