本文整理汇总了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)));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
}
示例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)));
}
示例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));
}
示例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)));
}
示例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)));
}
示例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)));
}
示例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)));
}