當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。