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


PHP RLayoutHelper::render方法代码示例

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


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

示例1: getInput

 /**
  * Method to get the field input markup
  *
  * @return string
  *
  * @throws Exception
  */
 protected function getInput()
 {
     // Setup variables for display
     if ($this->value) {
         $db = JFactory::getDbo();
         $query = $db->getQuery(true);
         $query->select('r.name')->from('#__tracks_projects_rounds AS pr')->join('INNER', '#__tracks_rounds AS r ON r.id = pr.round_id')->where('pr.id = ' . (int) $this->value);
         $db->setQuery($query);
         $title = $db->loadResult();
         if (!($title = $db->loadResult())) {
             throw new Exception($db->getErrorMsg(), 500);
         }
     }
     if (empty($title)) {
         $title = JText::_('COM_TRACKS_Select_a_project_round');
     }
     $title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8');
     // The active id field
     if (0 == (int) $this->value) {
         $value = '';
     } else {
         $value = (int) $this->value;
     }
     $class = '';
     if ($this->required) {
         $class = ' class="required modal-value"';
     }
     return RLayoutHelper::render('form.field.projectround', array('id' => $this->id, 'name' => $this->name, 'title' => $title, 'value' => $this->value, 'required' => $this->required), '', array('component' => 'com_tracks'));
 }
开发者ID:julienV,项目名称:Joomla-Tracks,代码行数:36,代码来源:projectround.php

示例2: getInput

 /**
  * Method to get the user field input markup.
  *
  * @return  string  The field input markup.
  *
  * @since   1.0
  */
 protected function getInput()
 {
     $html = array();
     $groups = $this->getGroups();
     $excluded = $this->getExcluded();
     $link = 'index.php?option=com_users&view=users&layout=modal&tmpl=component&field=' . $this->id . (isset($groups) ? '&groups=' . base64_encode(json_encode($groups)) : '') . (isset($excluded) ? '&excluded=' . base64_encode(json_encode($excluded)) : '') . '&redcore=true';
     // Initialize some field attributes.
     if (isset($this->element['required']) && $this->element['required'] == 'true') {
         $this->addAttribute('required', 'required');
     }
     // Automatically insert any other attribute inserted
     if ($elementAttribs = $this->element->attributes()) {
         foreach ($elementAttribs as $name => $value) {
             if (!in_array($name, $this->forbiddenAttributes)) {
                 $this->addAttribute($name, $value);
             }
         }
     }
     $modalTitle = isset($this->element['modal_title']) ? JText::_($this->element['modal_title']) : JText::_('JLIB_FORM_SELECT_USER');
     $modalId = 'modal-' . $this->id;
     // Build the script.
     $script = array();
     $script[] = '	function jSelectUser_' . $this->id . '(id, title) {';
     $script[] = '		var old_id = document.getElementById("' . $this->id . '_id").value;';
     $script[] = '		if (old_id != id) {';
     $script[] = '			document.getElementById("' . $this->id . '_id").value = id;';
     $script[] = '			document.getElementById("' . $this->id . '").value = title;';
     $script[] = '			document.getElementById("' . $this->id . '").className = document.getElementById("' . $this->id . '").className.replace(" invalid" , "");';
     $script[] = '			' . (string) $this->element['onchange'];
     $script[] = '		}';
     $script[] = '		jQuery("#' . $modalId . '").modal("hide")';
     $script[] = '	}';
     // Add the script to the document head.
     JFactory::getDocument()->addScriptDeclaration(implode("\n", $script));
     // Create the modal object
     $modal = RModal::getInstance(array('attribs' => array('id' => $modalId, 'class' => 'modal hide', 'style' => 'width: 800px; height: 500px;'), 'params' => array('showHeader' => true, 'showFooter' => false, 'showHeaderClose' => true, 'title' => $modalTitle, 'link' => $link)), $modalId);
     $html[] = RLayoutHelper::render('modal', $modal);
     // Load the current username if available.
     $table = JTable::getInstance('user');
     if ($this->value) {
         $table->load($this->value);
     } else {
         $table->username = JText::_('JLIB_FORM_SELECT_USER');
     }
     $attr = $this->parseAttributes();
     // Create a dummy text field with the user name.
     $html[] = '<div class="input-append">';
     $html[] = '	<input type="text" id="' . $this->id . '" value="' . htmlspecialchars($table->name, ENT_COMPAT, 'UTF-8') . '"' . ' readonly="readonly"' . $attr . ' />';
     // Create the user select button.
     if ($this->element['readonly'] != 'true') {
         $html[] = '		<a class="btn btn-primary modalAjax" data-toggle="modal" title="' . JText::_('JLIB_FORM_CHANGE_USER') . '" href="#' . $modalId . '"' . ' rel="{handler: \'iframe\', size: {x: 800, y: 500}}">';
         $html[] = '<i class="icon-user"></i></a>';
     }
     $html[] = '</div>';
     // Create the real field, hidden, that stored the user id.
     $html[] = '<input type="hidden" id="' . $this->id . '_id" name="' . $this->name . '" value="' . (int) $this->value . '" />';
     return implode("\n", $html);
 }
开发者ID:thangredweb,项目名称:redCORE,代码行数:65,代码来源:ruser.php

示例3: getInput

 /**
  * Method to get the field input markup for OAuth2 Scope Lists.
  *
  * @return  string  The field input markup.
  */
 protected function getInput()
 {
     // ShowCheckAll attribute process
     $showCheckAll = false;
     if ($this->getAttribute('showCheckAll', false) == true) {
         $showCheckAll = true;
     }
     return RLayoutHelper::render('webservice.scopes', array('view' => $this, 'options' => array('scopes' => $this->getOptions(), 'id' => $this->id, 'name' => $this->name, 'label' => $this->label, 'value' => $this->value, 'showCheckAll' => $showCheckAll)));
 }
开发者ID:thangredweb,项目名称:redCORE,代码行数:14,代码来源:webservicescopes.php

示例4: display

 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a Error object.
  */
 public function display($tpl = null)
 {
     $render = RLayoutHelper::render($this->componentLayout, array('view' => $this, 'tpl' => $tpl, 'component_title' => $this->componentTitle));
     if ($render instanceof Exception) {
         return $render;
     }
     echo $render;
     return true;
 }
开发者ID:prox91,项目名称:joomla-dev,代码行数:16,代码来源:site.php

示例5: display

 /**
  * Execute and display a template script.
  *
  * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  *
  * @return  mixed  A string if successful, otherwise a Error object.
  */
 public function display($tpl = null)
 {
     $render = RLayoutHelper::render('component', array('view' => $this, 'tpl' => $tpl, 'component_title' => $this->componentTitle, 'sidebar_display' => $this->displaySidebar, 'sidebar_layout' => $this->sidebarLayout, 'sidebar_data' => $this->sidebarData, 'topbar_display' => $this->displayTopBar, 'topbar_layout' => $this->topBarLayout, 'topbar_inner_layout_display' => $this->displayTopBarInnerLayout, 'topbar_inner_layout' => $this->topBarInnerLayout, 'topbar_inner_layout_data' => $this->topBarInnerLayoutData, 'display_joomla_menu' => $this->displayJoomlaMenu));
     if ($render instanceof Exception) {
         return $render;
     }
     echo $render;
     return true;
 }
开发者ID:prox91,项目名称:joomla-dev,代码行数:16,代码来源:view.php

示例6: getInput

 /**
  * Method to get the field input markup for a generic list.
  * Use the multiple attribute to enable multiselect.
  *
  * @return  string  The field input markup.
  *
  * @since   11.1
  */
 protected function getInput()
 {
     $app = JFactory::getApplication();
     $listType = !empty($this->element['listType']) ? $this->element['listType'] : RBootstrap::getConfig('payment_list_payments_type', 'radio');
     $extensionName = !empty($this->element['extensionName']) ? $this->element['extensionName'] : $app->input->get->getString('option', '');
     $ownerName = !empty($this->element['ownerName']) ? $this->element['ownerName'] : '';
     // Get the field options.
     $options = $this->getOptions();
     return RLayoutHelper::render('redpayment.list.' . strtolower($listType), array('options' => array('payments' => $options, 'extensionName' => $extensionName, 'ownerName' => $ownerName, 'name' => $this->name, 'value' => $this->value, 'id' => $this->id, 'attributes' => $this->getAttributes())));
 }
开发者ID:thangredweb,项目名称:redCORE,代码行数:18,代码来源:rpayment.php

示例7: getInput

 /**
  * Method to get the field input markup.
  *
  * @return  string  The field input markup.
  */
 protected function getInput()
 {
     $id = isset($this->element['id']) ? $this->element['id'] : null;
     $this->cssId = '#' . $this->getId($id, $this->element['name']);
     if (isset($this->element['inline']) && $this->element['inline'] == 'true') {
         $class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
         $this->fieldHtml = '<div id="' . $this->getId($id, $this->element['name']) . '" ' . $class . '></div>';
     } else {
         $this->fieldHtml = parent::getInput();
     }
     $this->datepickerOptions = $this->getDatepickerOptions();
     return RLayoutHelper::render('fields.rdatepicker', $this);
 }
开发者ID:grlf,项目名称:eyedock,代码行数:18,代码来源:rdatepicker.php

示例8: render

 /**
  * Renders the error stack and returns the results as a string
  *
  * @param   string  $name     Not used.
  * @param   array   $params   Associative array of values
  * @param   string  $content  Not used.
  *
  * @return  string  The output of the script
  *
  * @since   11.1
  */
 public function render($name, $params = array(), $content = null)
 {
     $msgList = $this->getData();
     $displayData = array('msgList' => $msgList, 'name' => $name, 'params' => $params, 'content' => $content);
     $app = JFactory::getApplication();
     $chromePath = JPATH_THEMES . '/' . $app->getTemplate() . '/html/message.php';
     if (file_exists($chromePath)) {
         include_once $chromePath;
     }
     if (function_exists('renderMessage')) {
         JLog::add('renderMessage() is deprecated. Override system message rendering with layouts instead.', JLog::WARNING, 'deprecated');
         return renderMessage($msgList);
     }
     return RLayoutHelper::render('joomla.system.message', $displayData);
 }
开发者ID:thangredweb,项目名称:redCORE,代码行数:26,代码来源:message.php

示例9: getInput

 /**
  * Method to get the user field input markup.
  *
  * @return  string  The field input markup.
  *
  * @since   1.6
  */
 protected function getInput()
 {
     $html = array();
     $groups = $this->getGroups();
     $excluded = $this->getExcluded();
     $link = 'index.php?option=com_users&amp;view=users&amp;layout=modal&amp;tmpl=component&amp;field=' . $this->id . (isset($groups) ? '&amp;groups=' . base64_encode(json_encode($groups)) : '') . (isset($excluded) ? '&amp;excluded=' . base64_encode(json_encode($excluded)) : '');
     // Initialize some field attributes.
     $attr = !empty($this->class) ? ' class="' . $this->class . '"' : '';
     $attr .= !empty($this->size) ? ' size="' . $this->size . '"' : '';
     $attr .= $this->required ? ' required' : '';
     // Build the script.
     $script = array();
     $script[] = '	function jSelectUser_' . $this->id . '(id, title) {';
     $script[] = '		var old_id = document.getElementById("' . $this->id . '_id").value;';
     $script[] = '		if (old_id != id) {';
     $script[] = '			document.getElementById("' . $this->id . '_id").value = id;';
     $script[] = '			document.getElementById("' . $this->id . '").value = title;';
     $script[] = '			document.getElementById("' . $this->id . '").className = document.getElementById("' . $this->id . '").className.replace(" invalid" , "");';
     $script[] = '			' . $this->onchange;
     $script[] = '		}';
     $script[] = '		jQuery("#modalContainer_modalButton_' . $this->id . '").modal("hide");';
     $script[] = '	}';
     // Add the script to the document head.
     JFactory::getDocument()->addScriptDeclaration(implode("\n", $script));
     // Load the current username if available.
     $table = JTable::getInstance('user');
     if (is_numeric($this->value)) {
         $table->load($this->value);
     } elseif (strtoupper($this->value) == 'CURRENT') {
         // 'CURRENT' is not a reasonable value to be placed in the html
         $this->value = JFactory::getUser()->id;
         $table->load($this->value);
     } else {
         $table->name = JText::_('JLIB_FORM_SELECT_USER');
     }
     // Create a dummy text field with the user name.
     $html[] = '<div class="input-append">';
     $html[] = '	<input type="text" id="' . $this->id . '" value="' . htmlspecialchars($table->name, ENT_COMPAT, 'UTF-8') . '"' . ' readonly' . $attr . ' />';
     // Create the user select button.
     if ($this->readonly === false) {
         $html[] = RLayoutHelper::render('modal.iframe', array('view' => $this, 'options' => array('id' => $this->id, 'header' => JText::_('JLIB_FORM_CHANGE_USER'), 'linkName' => '<i class="icon-user"></i>', 'link' => $link, 'linkClass' => 'btn btn-primary')));
     }
     $html[] = '</div>';
     // Create the real field, hidden, that stored the user id.
     $html[] = '<input type="hidden" id="' . $this->id . '_id" name="' . $this->name . '" value="' . $this->value . '" />';
     return implode("\n", $html);
 }
开发者ID:thangredweb,项目名称:redCORE,代码行数:54,代码来源:userbs3.php

示例10: ajaxlogs

 /**
  * Ajax call to get logs tab content.
  *
  * @return  void
  */
 public function ajaxlogs()
 {
     $app = JFactory::getApplication();
     $input = $app->input;
     $paymentId = $input->getInt('id');
     if ($paymentId) {
         /** @var RedcoreModelPayment_Logs $logsModel */
         $logsModel = RModelAdmin::getAdminInstance('Payment_Logs', array(), 'com_redcore');
         $state = $logsModel->getState();
         $logsModel->setState('filter.payment_id', $paymentId);
         $app->setUserState('log.payment_id', $paymentId);
         $formName = 'logsForm';
         $pagination = $logsModel->getPagination();
         $pagination->set('formName', $formName);
         echo RLayoutHelper::render('payment.logs', array('state' => $state, 'items' => $logsModel->getItems(), 'pagination' => $pagination, 'filterForm' => $logsModel->getForm(), 'activeFilters' => $logsModel->getActiveFilters(), 'formName' => $formName, 'showToolbar' => true, 'action' => RRoute::_('index.php?option=com_redcore&view=payment&model=payment_logs'), 'return' => base64_encode('index.php?option=com_redcore&view=payment&layout=edit&id=' . $paymentId . '&tab=logs&from_payment=1')));
     }
     $app->close();
 }
开发者ID:thangredweb,项目名称:redCORE,代码行数:23,代码来源:payment.php

示例11: defined

<?php

/**
 * @package     Redcore
 * @subpackage  Layouts
 *
 * @copyright   Copyright (C) 2008 - 2015 redCOMPONENT.com. All rights reserved.
 * @license     GNU General Public License version 2 or later, see LICENSE.
 */
defined('JPATH_REDCORE') or die;
$data = (object) $displayData;
$options = !empty($data->field->ajaxchildOptions) ? $data->field->ajaxchildOptions : array();
// We won't load anything if it's not going to work
if (!empty($options['ajaxUrl'])) {
    $options['childSelector'] = isset($options['childSelector']) ? $options['childSelector'] : '.js-childlist-child';
    JHtml::_('rjquery.childlist', $options['childSelector'], $options);
}
// Render the standard select
echo RLayoutHelper::render('redcore.field.list', $data);
开发者ID:thangredweb,项目名称:redCORE,代码行数:19,代码来源:childlist.php

示例12: foreach

    foreach ($modules as $module) {
        ?>
						<?php 
        echo JModuleHelper::renderModule($module, array('style' => 'standard'));
        ?>
					<?php 
    }
    ?>
				<?php 
}
?>
				<?php 
if ($displayTopbarInnerLayout) {
    ?>
					<?php 
    echo RLayoutHelper::render($topbarInnerLayout, $topbarInnerLayoutData);
    ?>
				<?php 
}
?>
			</div>
			<ul class="nav nav-user navbar-right">
				<li class="dropdown">
					<a href="#" data-toggle="dropdown" class="dropdown-toggle">
						<span class="icon-user"></span>
						<b class="caret"></b>
					</a>
					<ul class="dropdown-menu">
						<li class="">
							<a href="index.php?option=com_admin&amp;task=profile.edit&amp;id=<?php 
echo $userId;
开发者ID:thangredweb,项目名称:redCORE,代码行数:31,代码来源:admin.bs3.php

示例13: render

 /**
  * Render the toolbar.
  *
  * @return  string  The rendered toolbar.
  */
 public function render()
 {
     return RLayoutHelper::render('toolbar.toolbar', array('toolbar' => $this));
 }
开发者ID:grlf,项目名称:eyedock,代码行数:9,代码来源:toolbar.php

示例14: apiDocumentation

 /**
  * Execute the Api Documentation operation.
  *
  * @return  mixed  RApi object with information on success, boolean false on failure.
  *
  * @since   1.2
  */
 public function apiDocumentation()
 {
     $currentConfiguration = $this->configuration;
     $documentationNone = false;
     if ($this->operationConfiguration['source'] == 'url') {
         if (!empty($this->operationConfiguration['url'])) {
             JFactory::getApplication()->redirect($this->operationConfiguration['url']);
             JFactory::getApplication()->close();
         }
         $documentationNone = true;
     }
     if ($this->operationConfiguration['source'] == 'none' || $documentationNone) {
         $currentConfiguration = null;
     }
     $dataGet = $this->options->get('dataGet', array());
     $this->documentation = RLayoutHelper::render('webservice.documentation', array('view' => $this, 'options' => array('xml' => $currentConfiguration, 'soapEnabled' => RBootstrap::getConfig('enable_soap', 0), 'print' => isset($dataGet->print))));
     return $this;
 }
开发者ID:thangredweb,项目名称:redCORE,代码行数:25,代码来源:hal.php

示例15: defined

<?php

/**
 * @package     Redcore.Admin
 * @subpackage  Templates
 *
 * @copyright   Copyright (C) 2008 - 2015 redCOMPONENT.com. All rights reserved.
 * @license     GNU General Public License version 2 or later, see LICENSE.
 */
defined('_JEXEC') or die;
echo RLayoutHelper::render('webservice.operation', array('view' => $this, 'options' => array('operation' => 'update', 'form' => $this->form, 'tabActive' => ' active in ', 'fieldList' => array('defaultValue', 'isRequiredField', 'isPrimaryField'))));
开发者ID:thangredweb,项目名称:redCORE,代码行数:11,代码来源:default_update.php


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