Guest User

Untitled

a guest
Jun 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. <?php
  2.  
  3. public function getCMSFields() {
  4. $fields = parent::getCMSFields();
  5.  
  6. // begin add a complex table field for features and options
  7. if (($this->ID) && ($this->ID != 0)) {
  8. $ctf1 = new HasManyComplexTableField(
  9. $this,
  10. 'Features',
  11. 'Equipment_Feature',
  12. Array(
  13. 'AttrTitle' => 'Title'
  14. ),
  15. "getCMSFields",
  16. "ParentID = " . $this->ID
  17. );
  18. $fields->addFieldToTab('Root.Content.Features',$ctf1);
  19.  
  20. $ctf2 = new HasManyComplexTableField(
  21. $this,
  22. 'Options',
  23. 'Equipment_Option',
  24. Array(
  25. 'AttrTitle' => 'Title'
  26. ),
  27. "getCMSFields",
  28. "ParentID = " . $this->ID
  29. );
  30. $fields->addFieldToTab('Root.Content.Options',$ctf2);
  31.  
  32.  
  33. return $fields;
  34. }
  35.  
  36.  
  37. ?>
Add Comment
Please, Sign In to add comment