public function __construct(EntityTypeInterface $parent, AttributeInterface $parent_attribute)
 {
     parent::__construct('ReferencedCategory', [new TextAttribute('identifier', $this, [], $parent_attribute), new TextAttribute('referenced_identifier', $this, [], $parent_attribute), new EntityReferenceListAttribute('subcategories', $this, [EntityReferenceListAttribute::OPTION_ENTITY_TYPES => [ReferencedSubCategoryType::CLASS]], $parent_attribute)], new Options(['referenced_type' => CategoryType::CLASS, 'identifying_attribute' => 'identifier']), $parent, $parent_attribute);
 }
Example #2
0
 public function __construct()
 {
     parent::__construct('InvalidType');
 }
 public function __construct(EntityTypeInterface $parent, AttributeInterface $parent_attribute)
 {
     parent::__construct('ReferencedCategory', [new TextAttribute('identifier', $this, [], $parent_attribute), new TextAttribute('referenced_identifier', $this, [], $parent_attribute)], new Options(['referenced_type' => CategoryType::CLASS, 'identifying_attribute' => 'identifier']), $parent, $parent_attribute);
 }
Example #4
0
 public function __construct()
 {
     parent::__construct('Article', [new UuidAttribute('uuid', $this), new TextAttribute('headline', $this, [TextAttribute::OPTION_MIN_LENGTH => 4]), new TextAttribute('content', $this), new IntegerAttribute('click_count', $this), new FloatAttribute('float', $this), new GeoPointAttribute('coords', $this), new TextAttribute('author', $this), new EmailAttribute('email', $this), new UrlAttribute('website', $this), new TimestampAttribute('birthday', $this, [TimestampAttribute::OPTION_DEFAULT_VALUE => '2015-01-29T09:18:28.534429+00:00']), new IntegerListAttribute('images', $this), new TextListAttribute('keywords', $this), new BooleanAttribute('enabled', $this), new EmbeddedEntityListAttribute('content_objects', $this, [EmbeddedEntityListAttribute::OPTION_ENTITY_TYPES => [ParagraphType::CLASS], EmbeddedEntityListAttribute::OPTION_MIN_COUNT => 1]), new EntityReferenceListAttribute('categories', $this, [EntityReferenceListAttribute::OPTION_ENTITY_TYPES => [ReferencedCategoryType::CLASS]]), new KeyValueListAttribute('meta', $this, [KeyValueListAttribute::OPTION_VALUE_TYPE => KeyValueListAttribute::VALUE_TYPE_SCALAR, KeyValueListAttribute::OPTION_MIN_COUNT => 1]), new EmbeddedEntityListAttribute('workflow_state', $this, [EmbeddedEntityListAttribute::OPTION_ENTITY_TYPES => [WorkflowStateType::CLASS]])], new Options(['foo' => 'bar', 'nested' => ['foo' => 'bar', 'blah' => 'blub']]));
 }
Example #5
0
 public function __construct(EntityTypeInterface $parent, AttributeInterface $parent_attribute)
 {
     parent::__construct('Paragraph', [new TextAttribute('title', $this, [], $parent_attribute), new TextareaAttribute('content', $this, [], $parent_attribute), new GeoPointAttribute('coords', $this, [], $parent_attribute)], new Options(['foo' => 'bar', 'nested' => ['foo' => 'bar', 'blah' => 'blub']]), $parent, $parent_attribute);
 }
Example #6
0
 public function __construct()
 {
     parent::__construct('Category', [new TextAttribute('title', $this), new TextareaAttribute('description', $this)], new Options(['foo' => 'bar', 'nested' => ['foo' => 'bar', 'blah' => 'blub']]));
 }
Example #7
0
 public function __construct(EntityTypeInterface $parent, AttributeInterface $parent_attribute)
 {
     parent::__construct('WorkflowState', [new TextAttribute('workflow_name', $this, [], $parent_attribute), new TextAttribute('workflow_step', $this, [], $parent_attribute)], new Options(['foo' => 'bar', 'nested' => ['foo' => 'bar', 'blah' => 'blub']]), $parent, $parent_attribute);
 }