Source of file CheckboxAttribueType.php
Size: 0,736 Bytes - Last Modified: 2021-12-23T10:02:45+00:00
/var/www/docs.ssmods.com/process/src/code/model/attributes/CheckboxAttribueType.php
123456789101112131415161718192021222324252627282930 | <?php /** * Created by PhpStorm. * User: Magnum * Date: 2018-02-03 * Time: 22:17 */ class CheckboxAttribueType extends AttributeType { private static $singular_name = "Checkbox Attribute"; private static $plural_name = "Checkobox Attributes"; private static $has_many = array( "AttributeValues" => "AttributeValue" ); public function getCMSFields() { $fields = parent::getCMSFields(); $fields->removeByName("Sort"); $config = GridFieldConfig_RelationEditor::create(); $GridField = new GridField("AttributeValues", "Values", $this->AttributeValues(), $config); $fields->addFieldToTab("Root.Values", $GridField); return $fields; } } |