本文整理汇总了PHP中CurrencyField::setRightTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP CurrencyField::setRightTitle方法的具体用法?PHP CurrencyField::setRightTitle怎么用?PHP CurrencyField::setRightTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CurrencyField
的用法示例。
在下文中一共展示了CurrencyField::setRightTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCMSFields
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->removeByName('PageBuilder');
/* =========================================
* Images
=========================================*/
$fields->addFieldToTab('Root.Main', new UploadField('Image'), 'Content');
/* =========================================
* Menu Item Details
=========================================*/
$fields->addFieldToTab('Root.Main', $price = new CurrencyField('Price'), 'Content');
$price->setRightTitle('To add extra price options e.g Small, Large please add a variation under the "Variations" tab above');
$fields->addFieldToTab('Root.Main', $ingredients = new HtmlEditorField('Ingredients'), 'Metadata');
$ingredients->setRows(15);
/* =========================================
* Variations
=========================================*/
$config = GridFieldConfig_RelationEditor::create(10);
$config->addComponent(new GridFieldSortableRows('SortOrder'))->addComponent(new GridFieldDeleteAction());
$config->getComponentByType('GridFieldDataColumns')->setDisplayFields(array('Title' => 'Title', 'Price' => 'Price'));
$gridField = new GridField('Variations', 'Variations', $this->owner->MenuVariations(), $config);
$fields->addFieldToTab('Root.Variations', $gridField);
return $fields;
}