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


PHP Document::setBuffer方法代码示例

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


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

示例1: display

 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     // Get data from the model
     $this->ftp = $this->get('Ftp');
     $this->option = $this->get('Option');
     $this->pagination = $this->get('Pagination');
     $this->rows = $this->get('Data');
     $this->state = $this->get('State');
     Document::setBuffer($this->loadTemplate('navigation'), 'modules', 'submenu');
     $this->addToolbar();
     parent::display($tpl);
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:15,代码来源:view.html.php

示例2: display

 function display($tpl = null)
 {
     $config = Component::params('com_media');
     $style = Request::getState('media.list.layout', 'layout', 'thumbs', 'word');
     Document::setBuffer($this->loadTemplate('navigation'), 'modules', 'submenu');
     Html::behavior('framework', true);
     \Hubzero\Document\Assets::addComponentScript('com_media', 'mediamanager.js');
     \Hubzero\Document\Assets::addComponentStylesheet('com_media', 'mediamanager.css');
     Html::behavior('modal');
     Document::addScriptDeclaration("\n\t\tjQuery(document).ready(function(\$){\n\t\t\tdocument.preview = \$.fancybox;\n\t\t});");
     Html::asset('script', 'system/jquery.treeview.js', true, true, false, false);
     Html::asset('stylesheet', 'system/jquery.treeview.css', array(), true);
     if (Lang::isRTL()) {
         Html::asset('stylesheet', 'media/jquery.treeview_rtl.css', array(), true);
     }
     if (DIRECTORY_SEPARATOR == '\\') {
         $base = str_replace(DIRECTORY_SEPARATOR, "\\\\", COM_MEDIA_BASE);
     } else {
         $base = COM_MEDIA_BASE;
     }
     $js = "\n\t\t\tvar basepath = '" . $base . "';\n\t\t\tvar viewstyle = '" . $style . "';\n\t\t";
     Document::addScriptDeclaration($js);
     // Display form for FTP credentials?
     // Don't set them here, as there are other functions called before this one if there is any file write operation
     $ftp = !JClientHelper::hasCredentials('ftp');
     $session = App::get('session');
     $state = $this->get('state');
     $this->assignRef('session', $session);
     $this->assignRef('config', $config);
     $this->assignRef('state', $state);
     $this->require_ftp = $ftp;
     $this->folders_id = ' id="media-tree"';
     $this->folders = $this->get('folderTree');
     // Set the toolbar
     $this->addToolbar();
     parent::display($tpl);
     echo Html::behavior('keepalive');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:38,代码来源:view.html.php

示例3: onAfterDispatch

 /**
  * Method to catch the onAfterDispatch event.
  *
  * This is where we setup the click-through content highlighting for.
  * The highlighting is done with JavaScript so we just
  * need to check a few parameters and the JHtml behavior will do the rest.
  *
  * @return  boolean  True on success
  *
  * @since   2.5
  */
 public function onAfterDispatch()
 {
     // Check that we are in the site application.
     if (!App::isSite()) {
         return true;
     }
     // Set the variables
     $extension = Request::getCmd('option', '');
     // Check if the highlighter is enabled.
     if (!Component::params($extension)->get('highlight_terms', 1)) {
         return true;
     }
     // Check if the highlighter should be activated in this environment.
     if (Document::getType() !== 'html' || Request::getCmd('tmpl', '') === 'component') {
         return true;
     }
     // Get the terms to highlight from the request.
     $terms = Request::getVar('highlight', null, 'base64');
     $terms = $terms ? json_decode(base64_decode($terms)) : null;
     // Check the terms.
     if (empty($terms)) {
         return true;
     }
     // Clean the terms array
     $filter = JFilterInput::getInstance();
     $cleanTerms = array();
     foreach ($terms as $term) {
         $cleanTerms[] = htmlspecialchars($filter->clean($term, 'string'));
     }
     // Activate the highlighter.
     Html::behavior('highlighter', $cleanTerms);
     // Adjust the component buffer.
     $buf = Document::getBuffer('component');
     $buf = '<br id="highlighter-start" />' . $buf . '<br id="highlighter-end" />';
     Document::setBuffer($buf, 'component');
     return true;
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:48,代码来源:highlight.php

示例4: _setSubMenu

 /**
  * Setup the SubMenu
  *
  * @since	1.6
  */
 protected function _setSubMenu()
 {
     $contents = $this->loadTemplate('navigation');
     Document::setBuffer($contents, 'modules', 'submenu');
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:10,代码来源:view.html.php

示例5: defined

 * HUBzero is a registered trademark of Purdue University.
 *
 * @package   hubzero-cms
 * @author    Shawn Rice <zooley@purdue.edu>
 * @copyright Copyright 2005-2015 HUBzero Foundation, LLC.
 * @license   http://opensource.org/licenses/MIT MIT
 */
// no direct access
defined('_HZEXEC_') or die;
Toolbar::title(Lang::txt('COM_SYSTEM_INFO'), 'systeminfo.png');
Toolbar::help('sysinfo');
// Add specific helper files for html generation
Html::addIncludePath(dirname(JPATH_COMPONENT) . '/helpers/html');
// Load switcher behavior
Html::behavior('switcher', 'submenu');
Document::setBuffer($this->loadTemplate('navigation'), 'modules', 'submenu');
?>

<form action="<?php 
echo Route::url('index.php?option=' . $this->option . '&controller=' . $this->controller);
?>
" method="post" name="adminForm" id="adminForm">
	<div id="config-document">
		<div id="page-site" class="tab">
			<div class="noshow">
				<div class="width-100">
					<?php 
echo $this->loadTemplate('system');
?>
				</div>
			</div>
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:31,代码来源:default.php


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