Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- public function getCMSFields() {
- $fields = parent::getCMSFields();
- // begin add a complex table field for features and options
- if (($this->ID) && ($this->ID != 0)) {
- $ctf1 = new HasManyComplexTableField(
- $this,
- 'Features',
- 'Equipment_Feature',
- Array(
- 'AttrTitle' => 'Title'
- ),
- "getCMSFields",
- "ParentID = " . $this->ID
- );
- $fields->addFieldToTab('Root.Content.Features',$ctf1);
- $ctf2 = new HasManyComplexTableField(
- $this,
- 'Options',
- 'Equipment_Option',
- Array(
- 'AttrTitle' => 'Title'
- ),
- "getCMSFields",
- "ParentID = " . $this->ID
- );
- $fields->addFieldToTab('Root.Content.Options',$ctf2);
- return $fields;
- }
- ?>
Add Comment
Please, Sign In to add comment