当前位置: 首页>>代码示例>>PHP>>正文


PHP FieldList::AddFieldToTab方法代码示例

本文整理汇总了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;
 }
开发者ID:helpfulrobot,项目名称:lekoala-silverstripe-phonenumber,代码行数:9,代码来源:PhoneNumberExtension.php

示例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));
 }
开发者ID:jacobbuck,项目名称:silverstripe-colorfulimage,代码行数:15,代码来源:ColorfulImageExtension.php


注:本文中的FieldList::AddFieldToTab方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。