Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LinkCollection.php

function 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\JsonApiResource

Code

public function hasLinkWithKey($key) {
    return array_key_exists($key, $this->links);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal