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


PHP template::getPageRenderer方法代码示例

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


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

示例1: initialize

 /**
  * Initializes the Module
  *
  * @return	void
  */
 public function initialize()
 {
     parent::init();
     $this->doc = t3lib_div::makeInstance('template');
     $this->doc->setModuleTemplate(t3lib_extMgm::extPath('recycler') . 'mod1/mod_template.html');
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->setExtDirectStateProvider();
     $this->pageRenderer = $this->doc->getPageRenderer();
     $this->relativePath = t3lib_extMgm::extRelPath('recycler');
     $this->pageRecord = t3lib_BEfunc::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']) && intval($modTS['properties']['recordsPageLimit']) > 0) {
         $this->recordsPageLimit = intval($modTS['properties']['recordsPageLimit']);
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:31,代码来源:index.php

示例2: initPage

    /**
     * initialization for the visual parts of the class
     * Use template rendering only if this is a non-AJAX call
     *
     * @return	void
     */
    public function initPage()
    {
        global $BE_USER;
        // Setting highlight mode:
        $this->doHighlight = !$BE_USER->getTSConfigVal('options.pageTree.disableTitleHighlight');
        // If highlighting is active, define the CSS class for the active item depending on the workspace
        if ($this->doHighlight) {
            $hlClass = $BE_USER->workspace === 0 ? 'active' : 'active active-ws wsver' . $BE_USER->workspace;
        }
        // Create template object:
        $this->doc = t3lib_div::makeInstance('template');
        $this->doc->backPath = $BACK_PATH;
        $this->doc->setModuleTemplate('templates/alt_db_navframe.html');
        $this->doc->showFlashMessages = FALSE;
        // get HTML-Template
        // Adding javascript code for AJAX (prototype), drag&drop and the pagetree as well as the click menu code
        $this->doc->getDragDropCode('pages');
        $this->doc->getContextMenuCode();
        $this->doc->getPageRenderer()->loadScriptaculous('effects');
        $this->doc->getPageRenderer()->loadExtJS();
        $this->doc->getPageRenderer()->addJsFile('js/pagetreefiltermenu.js');
        $this->doc->JScode .= $this->doc->wrapScriptTags(($this->currentSubScript ? 'top.currentSubScript=unescape("' . rawurlencode($this->currentSubScript) . '");' : '') . '
		// setting prefs for pagetree and drag & drop
		' . ($this->doHighlight ? 'Tree.highlightClass = "' . $hlClass . '";' : '') . '

		// Function, loading the list frame from navigation tree:
		function jumpTo(id, linkObj, highlightID, bank)	{ //
			var theUrl = top.TS.PATH_typo3 + top.currentSubScript ;
			if (theUrl.indexOf("?") != -1) {
				theUrl += "&id=" + id
			} else {
				theUrl += "?id=" + id
			}
			top.fsMod.currentBank = bank;

			if (top.TYPO3.configuration.condensedMode) {
				top.content.location.href = theUrl;
			} else {
				parent.list_frame.location.href=theUrl;
			}

			' . ($this->doHighlight ? 'Tree.highlightActiveItem("web", highlightID + "_" + bank);' : '') . '
			' . (!$GLOBALS['CLIENT']['FORMSTYLE'] ? '' : 'if (linkObj) linkObj.blur(); ') . '
			return false;
		}
		' . ($this->cMR ? "jumpTo(top.fsMod.recentIds['web'],'');" : '') . ($this->hasFilterBox ? 'var TYPO3PageTreeFilter = new PageTreeFilter();' : '') . '

		');
        $this->doc->bodyTagId = 'typo3-pagetree';
    }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:56,代码来源:alt_db_navframe.php

示例3: initializeExtJs

    protected function initializeExtJs()
    {
        $pageRenderer = $this->document->getPageRenderer();
        $pageRenderer->loadExtJS();
        $pageRenderer->addInlineSettingArray($this->extjsNamespace, array('pageId' => $this->pageId));
        $extJsExtensionCorePath = $this->document->backPath . '../t3lib/js/extjs/ux/';
        $pageRenderer->addJsFile($extJsExtensionCorePath . 'Ext.grid.RowExpander.js');
        $pageRenderer->addJsFile($this->document->backPath . $GLOBALS['PATHrel_solr'] . 'Resources/JavaScript/ExtJs/override/gridpanel.js');
        $pageRenderer->addJsFile($this->document->backPath . $GLOBALS['PATHrel_solr'] . 'Resources/JavaScript/ModIndex/index_inspector.js');
        $pageRenderer->addCssInlineBlock('grid-selection-enabler', '
			.x-selectable, .x-selectable * {
				-moz-user-select: text!important;
				-khtml-user-select: text!important;
			}
		');
    }
开发者ID:neufeind,项目名称:ext-solr,代码行数:16,代码来源:IndexInspector.php

示例4: loadHeaderData

    /**
     * Loads data in the HTML head section (e.g. JavaScript or stylesheet information).
     *
     * @return	void
     */
    protected function loadHeaderData()
    {
        // Load CSS Stylesheets:
        $this->loadStylesheet($this->relativePath . 'res/css/customExtJs.css');
        // Load Ext JS:
        $this->doc->getPageRenderer()->loadExtJS();
        // Integrate dynamic JavaScript such as configuration or lables:
        $this->doc->JScode .= t3lib_div::wrapJS('
			Ext.namespace("Recycler");
			Recycler.statics = ' . json_encode($this->getJavaScriptConfiguration()) . ';
			Recycler.lang = ' . json_encode($this->getJavaScriptLabels()) . ';');
        // Load Recycler JavaScript:
        $this->loadJavaScript($this->relativePath . 'res/js/ext_expander.js');
        $this->loadJavaScript($this->relativePath . 'res/js/search_field.js');
        $this->loadJavaScript($this->relativePath . 'res/js/t3_recycler.js');
    }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:21,代码来源:index.php

示例5: getJavascriptCode

 /**
  * Retrieves JavaScript code (header part) for editor
  *
  * @param 	template	$doc
  * @return	string		JavaScript code
  */
 public function getJavascriptCode($doc)
 {
     $content = '';
     if ($this->isEnabled()) {
         $path_t3e = t3lib_extmgm::extRelPath('t3editor');
         // include needed javascript-frameworks
         /** @var $pageRenderer t3lib_PageRenderer */
         $pageRenderer = $doc->getPageRenderer();
         $pageRenderer->loadPrototype();
         $pageRenderer->loadScriptaculous();
         // include editor-css
         $content .= '<link href="' . t3lib_div::createVersionNumberedFilename($GLOBALS['BACK_PATH'] . t3lib_extmgm::extRelPath('t3editor') . 'res/css/t3editor.css') . '" type="text/css" rel="stylesheet" />';
         // include editor-js-lib
         $doc->loadJavascriptLib($path_t3e . 'res/jslib/codemirror/codemirror.js');
         $doc->loadJavascriptLib($path_t3e . 'res/jslib/t3editor.js');
         if ($this->mode == self::MODE_TYPOSCRIPT) {
             $doc->loadJavascriptLib($path_t3e . 'res/jslib/ts_codecompletion/tsref.js');
             $doc->loadJavascriptLib($path_t3e . 'res/jslib/ts_codecompletion/completionresult.js');
             $doc->loadJavascriptLib($path_t3e . 'res/jslib/ts_codecompletion/tsparser.js');
             $doc->loadJavascriptLib($path_t3e . 'res/jslib/ts_codecompletion/tscodecompletion.js');
         }
         $content .= t3lib_div::wrapJS('T3editor = T3editor || {};' . 'T3editor.lang = ' . json_encode($this->getJavaScriptLabels()) . ';' . LF . 'T3editor.PATH_t3e = "' . $GLOBALS['BACK_PATH'] . t3lib_extmgm::extRelPath('t3editor') . '"; ' . LF . 'T3editor.URL_typo3 = "' . htmlspecialchars(t3lib_div::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir) . '"; ' . LF . 'T3editor.template = ' . $this->getPreparedTemplate() . ';' . LF . 'T3editor.parserfile = ' . $this->getParserfileByMode($this->mode) . ';' . LF . 'T3editor.stylesheet = ' . $this->getStylesheetByMode($this->mode) . ';');
     }
     return $content;
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:31,代码来源:class.tx_t3editor.php

示例6: init

 /**
  * Initialization of the class
  *
  * @return	void
  */
 public function init()
 {
     // Setting GPvars:
     $this->id = intval(t3lib_div::_GP('id'));
     $this->edit = t3lib_div::_GP('edit');
     $this->return_id = t3lib_div::_GP('return_id');
     $this->lastEdited = t3lib_div::_GP('lastEdited');
     // Module name;
     $this->MCONF = $GLOBALS['MCONF'];
     // Page select clause:
     $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
     // Initializing document template object:
     $this->doc = t3lib_div::makeInstance('template');
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->setModuleTemplate('templates/perm.html');
     $this->doc->form = '<form action="' . $GLOBALS['BACK_PATH'] . 'tce_db.php" method="post" name="editform">';
     $this->doc->loadJavascriptLib('../t3lib/jsfunc.updateform.js');
     $this->doc->getPageRenderer()->loadPrototype();
     $this->doc->loadJavascriptLib(TYPO3_MOD_PATH . 'perm.js');
     // Setting up the context sensitive menu:
     $this->doc->getContextMenuCode();
     // Set up menus:
     $this->menuConfig();
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:29,代码来源:index.php

示例7: main

    /**
     * Main function, creating the listing
     *
     * @return	void
     */
    function main()
    {
        global $BE_USER, $LANG, $BACK_PATH, $TYPO3_CONF_VARS, $FILEMOUNTS;
        // Initialize the template object
        $this->doc = t3lib_div::makeInstance('template');
        $this->doc->backPath = $BACK_PATH;
        $this->doc->setModuleTemplate('templates/file_list.html');
        $this->doc->getPageRenderer()->loadPrototype();
        // Validating the input "id" (the path, directory!) and checking it against the mounts of the user.
        $this->id = $this->basicFF->is_directory($this->id);
        $access = $this->id && $this->basicFF->checkPathAgainstMounts($this->id . '/');
        // There there was access to this file path, continue, make the list
        if ($access) {
            // include the initialization for the flash uploader
            if ($GLOBALS['BE_USER']->uc['enableFlashUploader']) {
                $this->doc->JScodeArray['flashUploader'] = '
					if (top.TYPO3.FileUploadWindow.isFlashAvailable()) {
						document.observe("dom:loaded", function() {
								// monitor the button
							$("button-upload").observe("click", initFlashUploader);

							function initFlashUploader(event) {
									// set the page specific options for the flashUploader
								var flashUploadOptions = {
									uploadURL:           top.TS.PATH_typo3 + "ajax.php",
									uploadFileSizeLimit: "' . t3lib_div::getMaxUploadFileSize() . '",
									uploadFileTypes: {
										allow:  "' . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']['webspace']['allow'] . '",
										deny: "' . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileExtensions']['webspace']['deny'] . '"
									},
									uploadFilePostName:  "upload_1",
									uploadPostParams: {
										"file[upload][1][target]": "' . $this->id . '",
										"file[upload][1][data]": 1,
										"file[upload][1][charset]": "utf-8",
										"ajaxID": "TYPO3_tcefile::process"
									}
								};

									// get the flashUploaderWindow instance from the parent frame
								var flashUploader = top.TYPO3.FileUploadWindow.getInstance(flashUploadOptions);
								// add an additional function inside the container to show the checkbox option
								var infoComponent = new top.Ext.Panel({
									autoEl: { tag: "div" },
									height: "auto",
									bodyBorder: false,
									border: false,
									hideBorders: true,
									cls: "t3-upload-window-infopanel",
									id: "t3-upload-window-infopanel-addition",
									html: \'<label for="overrideExistingFilesCheckbox"><input id="overrideExistingFilesCheckbox" type="checkbox" onclick="setFlashPostOptionOverwriteExistingFiles(this);" />\' + top.String.format(top.TYPO3.LLL.fileUpload.infoComponentOverrideFiles) + \'</label>\'
								});
								flashUploader.add(infoComponent);

									// do a reload of this frame once all uploads are done
								flashUploader.on("totalcomplete", function() {
									window.location.reload();
								});

									// this is the callback function that delivers the additional post parameter to the flash application
								top.setFlashPostOptionOverwriteExistingFiles = function(checkbox) {
									var uploader = top.TYPO3.getInstance("FileUploadWindow");
									if (uploader.isVisible()) {
										uploader.swf.addPostParam("overwriteExistingFiles", (checkbox.checked == true ? 1 : 0));
									}
								};

								event.stop();
							};
						});
					}
				';
            }
            // Create filelisting object
            $this->filelist = t3lib_div::makeInstance('fileList');
            $this->filelist->backPath = $BACK_PATH;
            // Apply predefined values for hidden checkboxes
            // Set predefined value for DisplayBigControlPanel:
            if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'activated') {
                $this->MOD_SETTINGS['bigControlPanel'] = TRUE;
            } elseif ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayBigControlPanel') === 'deactivated') {
                $this->MOD_SETTINGS['bigControlPanel'] = FALSE;
            }
            // Set predefined value for DisplayThumbnails:
            if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'activated') {
                $this->MOD_SETTINGS['displayThumbs'] = TRUE;
            } elseif ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableDisplayThumbnails') === 'deactivated') {
                $this->MOD_SETTINGS['displayThumbs'] = FALSE;
            }
            // Set predefined value for Clipboard:
            if ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableClipBoard') === 'activated') {
                $this->MOD_SETTINGS['clipBoard'] = TRUE;
            } elseif ($GLOBALS['BE_USER']->getTSConfigVal('options.file_list.enableClipBoard') === 'deactivated') {
                $this->MOD_SETTINGS['clipBoard'] = FALSE;
            }
//.........这里部分代码省略.........
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:file_list.php

示例8: 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 . 'res/linkvalidator.css', 'linkvalidator');
     $this->doc->getPageRenderer()->addJsFile($this->doc->backPath . '../t3lib/js/extjs/ux/Ext.ux.FitToParent.js');
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:10,代码来源:class.tx_linkvalidator_modfuncreport.php


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