public function LinkCollection::hasLinkWithKey in JSON:API 8.2
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
- src/
JsonApiResource/ LinkCollection.php, line 107
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);
}