Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class DoCd extends DataObject {
- private static $db = array(
- 'id_linea' => 'Varchar(10)',
- [... snip ...]
- );
- public function getCMSFields() {
- $fields = parent::getCMSFields();
- /* Linea */
- $field = new DropdownField('id_linea', 'Linea', DoSoftwareLinee::get()->map('ec_id', 'nome'));
- $fields->insertBefore($field, 'data');
- /* GRIDFIELD */
- $gridFieldConfig = GridFieldConfig_RelationEditor::create();
- $field = new GridField(
- 'Software', 'All Software', DataObject::get('DoCdSoftware', "id_cd = {$this->ID}"), $gridFieldConfig
- );
- $fields->addFieldToTab('Root.Software', $field);
- return $fields;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement