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


PHP XenForo_View::createTemplateObject方法代码示例

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


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

示例1: renderOption

 /**
  * Renders the exif options.
  *
  * @param XenForo_View $view View object
  * @param string $fieldPrefix Prefix for the HTML form field name
  * @param array $preparedOption Prepared option info
  * @param boolean $canEdit True if an "edit" link should appear
  *
  * @return XenForo_Template_Abstract Template object
  */
 public static function renderOption(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $value = $preparedOption['option_value'];
     $choices = array();
     if (isset($value['FILE'])) {
         foreach ($value['FILE'] as $option) {
             $choices[] = array('group' => $option['group'], 'name' => is_string($option['name']) ? $option['name'] : '', 'format' => $option['format']);
         }
     }
     if (isset($value['COMPUTED'])) {
         foreach ($value['COMPUTED'] as $option) {
             $choices[] = array('group' => $option['group'], 'name' => is_string($option['name']) ? $option['name'] : '', 'format' => $option['format']);
         }
     }
     if (isset($value['IFD0'])) {
         foreach ($value['IFD0'] as $option) {
             $choices[] = array('group' => $option['group'], 'name' => is_string($option['name']) ? $option['name'] : '', 'format' => $option['format']);
         }
     }
     if (isset($value['EXIF'])) {
         foreach ($value['EXIF'] as $option) {
             $choices[] = array('group' => $option['group'], 'name' => is_string($option['name']) ? $option['name'] : '', 'format' => $option['format']);
         }
     }
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     return $view->createTemplateObject('option_template_xengallery_exif_options', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $preparedOption['formatParams'], 'editLink' => $editLink, 'choices' => $choices, 'nextCounter' => count($choices)));
 }
开发者ID:VoDongMy,项目名称:xenforo-laravel5.1,代码行数:37,代码来源:ExifOptions.php

示例2: renderOption

 public static function renderOption(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     $nodeModel = XenForo_Model::create('XenForo_Model_Node');
     $forumOptions = $nodeModel->getNodeOptionsArray($nodeModel->getAllNodes(), false, '(unspecified)');
     return $view->createTemplateObject('option_list_option_multi_EWRmedio', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $forumOptions, 'editLink' => $editLink));
 }
开发者ID:Sywooch,项目名称:forums,代码行数:7,代码来源:ForumChooser.php

示例3: renderOption

 /**
  * Renders the guest time zone option.
  *
  * @param XenForo_View $view View object
  * @param string $fieldPrefix Prefix for the HTML form field name
  * @param array $preparedOption Prepared option info
  * @param boolean $canEdit True if an "edit" link should appear
  *
  * @return XenForo_Template_Abstract Template object
  */
 public static function renderOption(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $value = $preparedOption['option_value'];
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     $forumOptions = XenForo_Option_NodeChooser::getNodeOptions($value['node_id'], sprintf('(%s)', new XenForo_Phrase('unspecified')), 'Forum');
     return $view->createTemplateObject('option_template_spamThreadAction', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $forumOptions, 'editLink' => $editLink));
 }
开发者ID:namgiangle90,项目名称:tokyobaito,代码行数:17,代码来源:SpamThreadAction.php

示例4: renderMultiple

 public static function renderMultiple(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     /* @var $nodeModel XenForo_Model_Node */
     $nodeModel = XenForo_Model::create('XenForo_Model_Node');
     $forumOptions = $nodeModel->getNodeOptionsArray($nodeModel->getAllNodes());
     return $view->createTemplateObject('option_list_option_multi_MODM_AJAXChat', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $forumOptions, 'editLink' => $editLink, 'multiple' => true));
 }
开发者ID:Sywooch,项目名称:forums,代码行数:8,代码来源:NodeChooser.php

示例5: renderOption

 public static function renderOption(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $value = $preparedOption['option_value'];
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     $styleModel = self::_getStyleModel();
     $styleOptions = $styleModel->getStylesForOptionsTag($value['style']);
     return $view->createTemplateObject('option_template_styleChooser_EWRporta', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $styleOptions, 'editLink' => $editLink));
 }
开发者ID:Sywooch,项目名称:forums,代码行数:8,代码来源:StyleChooser.php

示例6: renderOption

 public static function renderOption(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $value = $preparedOption['option_value'];
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     $nodeModel = XenForo_Model::create('XenForo_Model_Node');
     $forumOptions = $nodeModel->getNodeOptionsArray($nodeModel->getAllNodes(), $preparedOption['option_value'], '(None)');
     return $view->createTemplateObject('borbole_helper_rating_forums', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $forumOptions, 'editLink' => $editLink));
 }
开发者ID:Sywooch,项目名称:forums,代码行数:8,代码来源:ForumChooser.php

示例7: renderMultiple

 public static function renderMultiple(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     /* @var $nodeModel XenForo_Model_Node */
     $nodeModel = XenForo_Model::create('XenForo_Model_Node');
     $forumOptions = $nodeModel->getNodeOptionsArray($nodeModel->getAllNodes(), $preparedOption['option_value'], '(unspecified)');
     return $view->createTemplateObject('el_portal_nodeoptions', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $forumOptions, 'editLink' => $editLink));
 }
开发者ID:NixFifty,项目名称:XenForo-SimplePortal,代码行数:8,代码来源:MultiNode.php

示例8: renderOption

 public static function renderOption(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     $options = array();
     foreach (self::$navbarPositions as $pos) {
         $options[$pos] = $pos;
     }
     return $view->createTemplateObject('option_list_option_select', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $options, 'editLink' => $editLink));
 }
开发者ID:NixFifty,项目名称:XenForo-SimplePortal,代码行数:9,代码来源:Tab.php

示例9: renderAuto

 public static function renderAuto(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     list($addOns, $missingAddOns) = self::_getMissingAddOns($preparedOption['option_id']);
     if (empty($missingAddOns)) {
         $preparedOption['title'] = new XenForo_Phrase('bdsocialshare_auto_for_x', array('action' => $preparedOption['title']));
         $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
         return $view->createTemplateObject('bdsocialshare_option_auto', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'value' => isset($preparedOption['option_value']) ? $preparedOption['option_value'] : '', 'formatParams' => $preparedOption['formatParams'], 'editLink' => $editLink));
     }
 }
开发者ID:Sywooch,项目名称:forums,代码行数:9,代码来源:Option.php

示例10: render_AdminCP_CustomFieldsAdder

 public static function render_AdminCP_CustomFieldsAdder(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $choices = $preparedOption['option_value'];
     //self::debug($choices);
     $stylesWithOption = self::getBackgroundReplaceRules($choices);
     //self::debug($stylesWithOption);
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     return $view->createTemplateObject('kiror_customBackground_options_places', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $preparedOption['formatParams'], 'editLink' => $editLink, 'choices' => $stylesWithOption, 'nextCounter' => count($stylesWithOption)));
 }
开发者ID:adlerosn,项目名称:xenforoaddon_customBackgroundChooser,代码行数:9,代码来源:adminArrayPlaces.php

示例11: renderWidgetPages

 public static function renderWidgetPages(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $widgetPages = XenForo_Model::create('WidgetFramework_Model_WidgetPage')->getList();
     $choices = array(0 => '');
     foreach ($widgetPages as $widgetPageId => $widgetPageTitle) {
         $choices[$widgetPageId] = $widgetPageTitle;
     }
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     return $view->createTemplateObject('option_list_option_select', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $choices, 'editLink' => $editLink));
 }
开发者ID:Sywooch,项目名称:forums,代码行数:10,代码来源:Option.php

示例12: renderOption

 /**
  * Renders the media site thumbs options.
  *
  * @param XenForo_View $view View object
  * @param string $fieldPrefix Prefix for the HTML form field name
  * @param array $preparedOption Prepared option info
  * @param boolean $canEdit True if an "edit" link should appear
  *
  * @return XenForo_Template_Abstract Template object
  */
 public static function renderOption(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $value = $preparedOption['option_value'];
     $choices = array();
     foreach ($value as $site => $url) {
         $choices[] = array('id' => $site, 'url' => is_string($url) ? $url : '');
     }
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     return $view->createTemplateObject('option_template_xengallery_media_thumbnails', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $preparedOption['formatParams'], 'editLink' => $editLink, 'mediaSites' => self::getBbCodeMediaSites(), 'choices' => $choices, 'nextCounter' => count($choices)));
 }
开发者ID:VoDongMy,项目名称:xenforo-laravel5.1,代码行数:20,代码来源:MediaSiteThumbs.php

示例13: renderOption

 /**
  * Renders the censor words option row.
  *
  * @param XenForo_View $view View object
  * @param string $fieldPrefix Prefix for the HTML form field name
  * @param array $preparedOption Prepared option info
  * @param boolean $canEdit True if an "edit" link should appear
  *
  * @return XenForo_Template_Abstract Template object
  */
 public static function renderOption(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $value = $preparedOption['option_value'];
     $choices = array();
     foreach ($value as $word) {
         $choices[] = array('word' => $word['word'], 'replace' => is_string($word['replace']) ? $word['replace'] : '');
     }
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     return $view->createTemplateObject('option_template_censorWords', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $preparedOption['formatParams'], 'editLink' => $editLink, 'choices' => $choices, 'nextCounter' => count($choices)));
 }
开发者ID:namgiangle90,项目名称:tokyobaito,代码行数:20,代码来源:CensorWords.php

示例14: renderOptionNumbers

 public static function renderOptionNumbers(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $value = $preparedOption['option_value'];
     $numbers = array();
     foreach ($value as $number) {
         if ($number > 0) {
             $numbers[] = $number;
         }
     }
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     return $view->createTemplateObject('VietXfAdvStats_option_numbers', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $preparedOption['formatParams'], 'editLink' => $editLink, 'numbers' => $numbers, 'nextCounter' => count($numbers)));
 }
开发者ID:Sywooch,项目名称:forums,代码行数:12,代码来源:Option.php

示例15: renderOption

 public static function renderOption(XenForo_View $view, $fieldPrefix, array $preparedOption, $canEdit)
 {
     $values = $preparedOption['option_value'];
     $entries = array();
     if (!empty($values)) {
         foreach ($values as $value) {
             $entries[] = $value;
         }
     }
     $editLink = $view->createTemplateObject('option_list_option_editlink', array('preparedOption' => $preparedOption, 'canEditOptionDefinition' => $canEdit));
     return $view->createTemplateObject('option_template_multiEntries_EWRporta', array('fieldPrefix' => $fieldPrefix, 'listedFieldName' => $fieldPrefix . '_listed[]', 'preparedOption' => $preparedOption, 'formatParams' => $preparedOption['formatParams'], 'editLink' => $editLink, 'entries' => $entries, 'nextCounter' => count($entries)));
 }
开发者ID:Sywooch,项目名称:forums,代码行数:12,代码来源:MultiEntries.php


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