Example #1
0
 public function __construct()
 {
     parent::__construct('Publication', [new IntegerAttribute('year', $this, []), new TextAttribute('description', $this, [])]);
 }
 public function __construct()
 {
     parent::__construct('Book', [new TextAttribute('title', $this, ['mandatory' => true]), new TextAttribute('description', $this)]);
 }
 public function __construct()
 {
     parent::__construct('Publisher', [new TextAttribute('name', $this, ['mandatory' => true]), new TextAttribute('description', $this)]);
 }
 public function __construct()
 {
     parent::__construct('Author', [new TextAttribute('firstname', $this, ['mandatory' => true, 'min_length' => 2]), new TextAttribute('lastname', $this, ['min_length' => 2]), new EmailAttribute('email', $this, ['mandatory' => true]), new TextAttribute('blurb', $this, ['default_value' => 'the grinch']), new TokenAttribute('token', $this), new TextListAttribute('tags', $this), new ImageListAttribute('images', $this), new EmbeddedEntityListAttribute('products', $this, ['max_count' => 2, 'entity_types' => ['\\Honeybee\\Tests\\Fixture\\BookSchema\\Model\\Author\\Embed\\HighlightType']]), new EntityReferenceListAttribute('books', $this, ['inline_mode' => true, 'entity_types' => ['\\Honeybee\\Tests\\Fixture\\BookSchema\\Model\\Author\\Reference\\BookType']])]);
 }