Exemplo n.º 1
0
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $categoriesField = new GridField('BlogCategories', 'BlogCategories', $this->BlogCategories(), GridFieldConfig_RelationEditor::create());
     $fields->addFieldToTab('Root.BlogCategories', $categoriesField);
     $tagsField = new GridField('Tags', 'Tags', $this->Tags(), GridFieldConfig_RelationEditor::create());
     $fields->addFieldToTab('Root.Tags', $tagsField);
     return $fields;
 }
Exemplo n.º 2
0
 public function getCMSFields()
 {
     $fields = parent::getCMSFields();
     $categoriesField = new GridField('Categories', 'Categories', $this->Categories(), GridFieldConfig_RelationEditor::create());
     $fields->addFieldToTab('Root.Categories', $categoriesField);
     $tagsField = new GridField('Tags', 'Tags', $this->Tags(), GridFieldConfig_RelationEditor::create());
     $fields->addFieldToTab('Root.Tags', $tagsField);
     $attributesField = new GridField('ProjectAttributes', 'ProjectAttributes', $this->ProjectAttributes(), GridFieldConfig_RelationEditor::create());
     $fields->addFieldToTab('Root.ProjectAttributes', $attributesField);
     $firstImageField = new CheckboxField('FirstImageIsPreview', 'Ignore First Image of Image Folder');
     $fields->addFieldToTab('Root.Main', $firstImageField, 'ImageFolderID');
     return $fields;
 }