function ResourceTypeRelationship::getRelatableResourceTypes
Same name in other branches
- 9 core/modules/jsonapi/src/ResourceType/ResourceTypeRelationship.php \Drupal\jsonapi\ResourceType\ResourceTypeRelationship::getRelatableResourceTypes()
- 8.9.x core/modules/jsonapi/src/ResourceType/ResourceTypeRelationship.php \Drupal\jsonapi\ResourceType\ResourceTypeRelationship::getRelatableResourceTypes()
- 10 core/modules/jsonapi/src/ResourceType/ResourceTypeRelationship.php \Drupal\jsonapi\ResourceType\ResourceTypeRelationship::getRelatableResourceTypes()
Gets the relatable resource types.
Return value
\Drupal\jsonapi\ResourceType\ResourceType[] The resource type to which this relationships can relate.
File
-
core/
modules/ jsonapi/ src/ ResourceType/ ResourceTypeRelationship.php, line 46
Class
- ResourceTypeRelationship
- Specialization of a ResourceTypeField to represent a resource relationship.
Namespace
Drupal\jsonapi\ResourceTypeCode
public function getRelatableResourceTypes() {
if (!isset($this->relatableResourceTypes)) {
throw new \LogicException("withRelatableResourceTypes() must be called before getting relatable resource types.");
}
return $this->relatableResourceTypes;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.