本文整理汇总了PHP中DropdownField::FieldHolder方法的典型用法代码示例。如果您正苦于以下问题:PHP DropdownField::FieldHolder方法的具体用法?PHP DropdownField::FieldHolder怎么用?PHP DropdownField::FieldHolder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DropdownField
的用法示例。
在下文中一共展示了DropdownField::FieldHolder方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FieldHolder
public function FieldHolder($properties = array())
{
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::javascript(THIRDPARTY_DIR . '/jquery-entwine/dist/jquery.entwine-dist.js');
Requirements::javascript('swipestripe-currency/javascript/ExchangeRateField.js');
return parent::FieldHolder();
}
示例2: FieldHolder
function FieldHolder()
{
$regions = Region::shipping_regions();
$jsonRegions = json_encode($regions);
Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
Requirements::javascriptTemplate('swipestripe/javascript/RegionField.js', array("regions" => $jsonRegions, 'defaultValue' => $this->Value()));
return parent::FieldHolder();
}
示例3: FieldHolder
/**
* Builds the form field, sets default attributes, and includes JS
*
* @param array $attributes The attributes to include on the formfield
* @return SSViewer
*/
public function FieldHolder($attributes = array())
{
Requirements::javascript(FRAMEWORK_DIR . "/admin/thirdparty/chosen/chosen/chosen.jquery.js");
Requirements::css(FRAMEWORK_DIR . "/admin/thirdparty/chosen/chosen/chosen.css");
$this->addExtraClass('chosen');
if (!$this->getAttribute('data-search-threshold')) {
$this->setSearchThreshold(self::$default_search_threshold);
}
return parent::FieldHolder($attributes);
}
示例4: FieldHolder
function FieldHolder() {
ShowHideField::include_files();
return parent::FieldHolder();
}
示例5: FilterDropdown
public function FilterDropdown()
{
$map = $this->filter_empty_string ? array($this->RelativeLink(array('filter' => '')) => $this->filter_empty_string) : array();
foreach($this->filter_map as $k => $v) {
$map[$this->RelativeLink(array('filter' => $this->filtered_field.'_'.$k))] = $v;
}
$value = !empty($this->filter) ? $this->RelativeLink(array('filter' => $this->filter)) : null;
$dropdown = new DropdownField('Filter',$this->filter_label . " (<a href='#' class='refresh'>"._t('DataObjectManager.REFRESH','refresh')."</a>)", $map, $value);
return $dropdown->FieldHolder();
}
示例6: GroupFilter
function GroupFilter()
{
$groups = DataObject::get('Group');
$groupArray = array('' => _t('MemberList.ANYGROUP', 'Any group'));
foreach ($groups as $group) {
$groupArray[$group->ID] = $group->Title;
}
$field = new DropdownField('MemberListGroup', _t('MemberList.FILTERBYG', 'Filter by group'), $groupArray);
return $field->FieldHolder();
}