本文整理汇总了PHP中FieldList::AddFieldToTab方法的典型用法代码示例。如果您正苦于以下问题:PHP FieldList::AddFieldToTab方法的具体用法?PHP FieldList::AddFieldToTab怎么用?PHP FieldList::AddFieldToTab使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FieldList
的用法示例。
在下文中一共展示了FieldList::AddFieldToTab方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateCMSFields
public function updateCMSFields(FieldList $fields)
{
$fields->AddFieldToTab('Root.Main', new CountryDropdownField('CountryCode', _t('LibPhoneNumberExtension.CountryCode', 'Country')));
$fields->AddFieldToTab('Root.Main', $phonefield = new LibPhoneNumberField('PhoneNumber', _t('LibPhoneNumberExtension.PhoneNumber', 'Phone')));
$phonefield->setCountryField('CountryCode');
$fields->AddFieldToTab('Root.Main', $mobilephonefield = new LibPhoneNumberField('MobilePhoneNumber', _t('LibPhoneNumberExtension.MobilePhoneNumber', 'Mobile Phone')));
$mobilephonefield->setCountryField('CountryCode');
return $fields;
}
示例2: updateCMSFields
public function updateCMSFields(FieldList $fields)
{
$tabName = 'Root.Pricing';
if (class_exists("DataObjectOneFieldUpdateController")) {
$link = DataObjectOneFieldUpdateController::popup_link($this->owner->ClassName, "Price", $where = "", $sort = "Price ASC ", $linkText = "Check all prices...");
$fields->AddFieldToTab($tabName, new HeaderField("MetaTitleFixesHeader", "Quick review", 3));
$fields->AddFieldToTab($tabName, new LiteralField("MetaTitleFixes", $link . ".<br /><br /><br />"));
}
// move price field under new 'Pricing' tab
// $priceField = $fields->fieldByName('Root.Details.Price');
// $fields->remove($priceField);
$fields->addFieldsToTab($tabName, array(new HeaderField("ComplexPricesHeader", "Alternative Pricing", 3), new LiteralField("ComplexPricesExplanation", "<p>Please enter <i>alternative</i> pricing below. You can enter a price per <a href=\"admin/security/\">security group</a> and/or per country.</p>"), $this->complexPricesHasManyTable()));
}
开发者ID:helpfulrobot,项目名称:sunnysideup-ecommerce-complex-pricing,代码行数:13,代码来源:ComplexPriceBuyableDecorator.php
示例3: updateCMSFields
/**
* Add cms field for Color db field
* @return FieldList
*/
public function updateCMSFields(FieldList $fields)
{
$color = $this->owner->Color;
$pallete = $this->dominantColorPalette();
$options = array();
$options[$color] = $color;
foreach ($pallete as $color) {
$options[$color] = $color;
}
$fields->AddFieldToTab('Root.Main', ColorPaletteField::create($name = 'Color', $title = 'Color', $source = $options, $value = $this->owner->Color));
}