1 <?php
2 3 4 5 6
7 class ProductOldFieldsDecorator extends DataObjectDecorator {
8 function () {
9 return array(
10 'db' => array(
11 'VALUE_P1' => 'Varchar(255)',
12 'VALUE_P2' => 'Varchar(255)',
13 'VALUE_P3' => 'Varchar(255)'
14 )
15 );
16 }
17
18 function updateCMSFields(& $fields) {
19
20 $fields->findOrMakeTab('Root.Content.AdditionalFields', _t('Product.tab_AdditionalFields'));
21 $fields->addFieldToTab('Root.Content.AdditionalFields', new TextField('VALUE_P1', $this->owner->fieldLabel('VALUE_P1')));
22 $fields->addFieldToTab('Root.Content.AdditionalFields', new TextField('VALUE_P2', $this->owner->fieldLabel('VALUE_P2')));
23 $fields->addFieldToTab('Root.Content.AdditionalFields', new TextField('VALUE_P3', $this->owner->fieldLabel('VALUE_P3')));
24 }
25 }
26
[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the
Silverstripe Forums to ask development related questions.
-