/**
  * RelationshipField constructor.
  * @param ResourceDefinition $resourceDefinition
  * @param string $fieldName
  * @param string $childResource
  */
 public function __construct(ResourceDefinition $resourceDefinition, $fieldName, $childResource)
 {
     parent::__construct($resourceDefinition, $fieldName);
     $this->childResource = $childResource;
     $this->cardinality = Cardinality::MANY;
     $this->isExpandable = false;
     $this->expanded = false;
     $this->meta = [];
 }
Esempio n. 2
0
 public function __construct(ResourceDefinition $resourceDefinition, $fieldName)
 {
     parent::__construct($resourceDefinition, $fieldName);
     $this->sortable = false;
 }