예제 #1
0
 public function getDefaultAttributes()
 {
     $default_attributes = [new TextAttribute('referenced_identifier', $this, [], $this->getParentAttribute())];
     $default_attributes_map = new AttributeMap($default_attributes);
     return parent::getDefaultAttributes()->append($default_attributes_map);
 }
 public function __construct(EntityTypeInterface $parent = null, AttributeInterface $parent_attribute = null)
 {
     parent::__construct('Highlight', [new TextAttribute('title', $this, ['mandatory' => true, 'min_length' => 2], $parent_attribute), new TextAttribute('description', $this, [], $parent_attribute), new TextAttribute('ignored', $this, [], $parent_attribute)], new Options([]), $parent, $parent_attribute);
 }
예제 #3
0
 public function __construct(EntityTypeInterface $parent = null, AttributeInterface $parent_attribute = null)
 {
     parent::__construct('Badge', [new Text('award', $this, [], $parent_attribute)], new Options(), $parent, $parent_attribute);
 }
예제 #4
0
 public function __construct(EntityTypeInterface $parent = null, AttributeInterface $parent_attribute = null)
 {
     parent::__construct('Challenge', [new IntegerAttribute('attempts', $this, [], $parent_attribute)], new Options(), $parent, $parent_attribute);
 }
예제 #5
0
 public function __construct(EntityTypeInterface $parent = null, AttributeInterface $parent_attribute = null)
 {
     parent::__construct('Profile', [new Text('alias', $this, [], $parent_attribute), new TextListAttribute('tags', $this, [], $parent_attribute), new EntityReferenceListAttribute('teams', $this, ['entity_types' => [EntityType::NAMESPACE_PREFIX . 'Player\\Reference\\TeamType']], $parent_attribute), new EmbeddedEntityListAttribute('badges', $this, ['entity_types' => [EntityType::NAMESPACE_PREFIX . 'Player\\Embed\\BadgeType']], $parent_attribute)], new Options(), $parent, $parent_attribute);
 }
예제 #6
0
 public function __construct(EntityTypeInterface $parent = null, AttributeInterface $parent_attribute = null)
 {
     parent::__construct('Profile', [new Text('nickname', $this, [], $parent_attribute), new Text('alias', $this, [], $parent_attribute), new TextListAttribute('tags', $this, [], $parent_attribute), new EmbeddedEntityListAttribute('badges', $this, ['entity_types' => ['\\Honeybee\\Tests\\Fixture\\GameSchema\\Model\\Game\\Embed\\BadgeType']], $parent_attribute), new EntityReferenceListAttribute('memberships', $this, ['entity_types' => ['\\Honeybee\\Tests\\Fixture\\GameSchema\\Model\\Game\\Reference\\MembershipType']], $parent_attribute)], new Options(), $parent, $parent_attribute);
 }