public function LinkCollection::getContext in Drupal 8
Same name and namespace in other branches
- 9 core/modules/jsonapi/src/JsonApiResource/LinkCollection.php \Drupal\jsonapi\JsonApiResource\LinkCollection::getContext()
Gets the LinkCollection's context object.
Return value
\Drupal\jsonapi\JsonApiResource\JsonApiDocumentTopLevel|\Drupal\jsonapi\JsonApiResource\ResourceObject|\Drupal\jsonapi\JsonApiResource\Relationship The LinkCollection's context.
File
- core/
modules/ jsonapi/ src/ JsonApiResource/ LinkCollection.php, line 131
Class
- LinkCollection
- Contains a set of JSON:API Link objects.
Namespace
Drupal\jsonapi\JsonApiResourceCode
public function getContext() {
assert(!is_null($this->context), 'A LinkCollection is invalid unless a context has been established.');
return $this->context;
}