本文整理汇总了PHP中Helper_Admin::getTypeOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper_Admin::getTypeOptions方法的具体用法?PHP Helper_Admin::getTypeOptions怎么用?PHP Helper_Admin::getTypeOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Helper_Admin
的用法示例。
在下文中一共展示了Helper_Admin::getTypeOptions方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: prepareDisplay_Ajax
function prepareDisplay_Ajax()
{
$featured = $this->state->get('skeleton_id', 0);
// Fields
$objects = '';
$pos = isset($this->style->positions[0]->value) ? $this->style->positions[0]->value : 'mainbody';
$this->fields = Helper_Workshop::getFields('type', $this->item, 'a.folder = ' . (int) $featured, false, false, $pos);
$this->fieldsAv = Helper_Workshop::getFieldsAv('type', $this->item, $objects, 'a.folder != ' . (int) $featured);
$this->type_fields = JCckDatabase::loadObjectList('SELECT fieldid, GROUP_CONCAT(DISTINCT typeid separator " c-") AS cc FROM #__cck_core_type_field group by fieldid', 'fieldid');
// Positions
$positions = Helper_Workshop::getPositions('type', $this->item);
if (count($this->style->positions)) {
$this->positions = array();
foreach ($this->style->positions as $p) {
if ($p->value) {
$this->positions[$p->value] = new stdClass();
$this->positions[$p->value]->title = $p->text;
$this->positions[$p->value]->name = $p->value;
$this->positions[$p->value]->disable = false;
$this->positions[$p->value]->legend = @$positions[$p->value]->legend;
$this->positions[$p->value]->variation = @$positions[$p->value]->variation;
$this->positions[$p->value]->variation_options = @$positions[$p->value]->variation_options;
$this->positions[$p->value]->width = @$positions[$p->value]->width;
$this->positions[$p->value]->height = @$positions[$p->value]->height;
}
}
}
$this->positions_nb = count($this->positions);
$this->variations = Helper_Workshop::getPositionVariations($this->style->template);
// Filters
$max_width = JCck::on() ? '' : ' style="max-width:180px;"';
$default_f = $this->item->id > 0 ? $this->item->folder : '';
$options = Helper_Admin::getPluginOptions('field', 'cck_', true, false, true);
$this->lists['af_t'] = JHtml::_('select.genericlist', $options, 'filter_type', 'class="inputbox filter input-medium" prefix="t-"' . $max_width, 'value', 'text', '', 'filter1');
$options = Helper_Admin::getAlphaOptions(true);
$this->lists['af_a'] = JHtml::_('select.genericlist', $options, 'filter_alpha', 'class="inputbox filter input-medium" prefix="a-"', 'value', 'text', '', 'filter3');
$options = Helper_Admin::getTypeOptions(true, false);
$this->lists['af_c'] = JHtml::_('select.genericlist', $options, 'filter_type', 'class="inputbox filter input-medium" prefix="c-"' . $max_width, 'value', 'text', '', 'filter4');
$options = Helper_Admin::getFolderOptions(true, true, false, true, 'field');
$this->lists['af_f'] = JHtml::_('select.genericlist', $options, 'filter_folder', 'class="inputbox filter input-medium" prefix="f-"' . $max_width, 'value', 'text', $default_f, 'filter2');
}
示例2: prepareDisplay_Ajax
function prepareDisplay_Ajax()
{
// Fields
if ($this->item->cck_type != '' && !$this->item->skip) {
$pos = isset($this->style->positions[0]->value) ? $this->style->positions[0]->value : 'mainbody';
$this->fields = Helper_Workshop::getFields('search', $this->item, 'a.name = "cck"', false, false, $pos);
$this->fields[$pos][0]->variation = 'hidden';
$this->fields[$pos][0]->match_mode = 'exact';
$this->fields[$pos][0]->live_value = $this->item->cck_type;
$this->fieldsAv = Helper_Workshop::getFieldsAv('search', $this->item, '', 'a.name != "cck"');
} else {
$this->fields = Helper_Workshop::getFields('search', $this->item);
$this->fieldsAv = Helper_Workshop::getFieldsAv('search', $this->item, '');
}
$this->type_fields = JCckDatabase::loadObjectList('SELECT fieldid, GROUP_CONCAT(DISTINCT typeid separator " c-") AS cc FROM #__cck_core_type_field group by fieldid', 'fieldid');
// Positions
$positions = Helper_Workshop::getPositions('search', $this->item);
if (is_object($this->style) && count($this->style->positions)) {
$this->positions = array();
foreach ($this->style->positions as $p) {
if ($p->value) {
$this->positions[$p->value] = new stdClass();
$this->positions[$p->value]->title = $p->text;
$this->positions[$p->value]->name = $p->value;
$this->positions[$p->value]->disable = false;
$this->positions[$p->value]->legend = @$positions[$p->value]->legend;
$this->positions[$p->value]->variation = @$positions[$p->value]->variation;
$this->positions[$p->value]->variation_options = @$positions[$p->value]->variation_options;
$this->positions[$p->value]->width = @$positions[$p->value]->width;
$this->positions[$p->value]->height = @$positions[$p->value]->height;
$this->positions[$p->value]->css = @$positions[$p->value]->css;
}
}
} else {
$this->positions = array('mainbody' => (object) array('title' => '(mainbody)', 'name' => 'mainbody', 'disable' => false, 'legend' => '', 'variation' => '', 'variation_options' => '', 'width' => '', 'height' => ''));
}
$this->positions_nb = count($this->positions);
$this->variations = Helper_Workshop::getPositionVariations($this->item->template);
// Filters
$max_width = JCck::on() ? '' : ' style="max-width:180px;"';
$default_f = $this->item->id > 0 ? $this->item->folder : '';
$options = Helper_Admin::getPluginOptions('field', 'cck_', true, false, true);
$this->lists['af_t'] = JHtml::_('select.genericlist', $options, 'filter_type', 'class="inputbox filter" size="1" prefix="t-"' . $max_width, 'value', 'text', '', 'filter1');
$options = Helper_Admin::getAlphaOptions(true);
$this->lists['af_a'] = JHtml::_('select.genericlist', $options, 'filter_alpha', 'class="inputbox filter" size="1" prefix="a-"', 'value', 'text', '', 'filter3');
$options = Helper_Admin::getTypeOptions(true, false);
$this->lists['af_c'] = JHtml::_('select.genericlist', $options, 'filter_type', 'class="inputbox filter" size="1" prefix="c-"' . $max_width, 'value', 'text', '', 'filter4');
$options = Helper_Admin::getFolderOptions(true, true, false, true, 'field');
$this->lists['af_f'] = JHtml::_('select.genericlist', $options, 'filter_folder', 'class="inputbox filter" size="1" prefix="f-"' . $max_width, 'value', 'text', $default_f, 'filter2');
}