public function LinkCollection::hasLinkWithKey in Drupal 8
Same name and namespace in other branches
- 9 core/modules/jsonapi/src/JsonApiResource/LinkCollection.php \Drupal\jsonapi\JsonApiResource\LinkCollection::hasLinkWithKey()
Whether a link with the given key exists.
Parameters
string $key: The key.
Return value
bool TRUE if a link with the given key exist, FALSE otherwise.
File
- core/
modules/ jsonapi/ src/ JsonApiResource/ LinkCollection.php, line 108
Class
- LinkCollection
- Contains a set of JSON:API Link objects.
Namespace
Drupal\jsonapi\JsonApiResourceCode
public function hasLinkWithKey($key) {
return array_key_exists($key, $this->links);
}