You are here

public function ViewmodepagePattern::hasRelationship in View Mode Page 8.3

Same name and namespace in other branches
  1. 4.0.x src/Entity/ViewmodepagePattern.php \Drupal\view_mode_page\Entity\ViewmodepagePattern::hasRelationship()
  2. 3.2.x src/Entity/ViewmodepagePattern.php \Drupal\view_mode_page\Entity\ViewmodepagePattern::hasRelationship()

Returns whether a relationship exists.

Parameters

string $token: Relationship identifier.

Return value

bool TRUE if the relationship exists, FALSE otherwise.

Overrides ViewmodepagePatternInterface::hasRelationship

2 calls to ViewmodepagePattern::hasRelationship()
ViewmodepagePattern::addRelationship in src/Entity/ViewmodepagePattern.php
Adds a relationship.
ViewmodepagePattern::replaceRelationship in src/Entity/ViewmodepagePattern.php
Replaces a relationship.

File

src/Entity/ViewmodepagePattern.php, line 341

Class

ViewmodepagePattern
Defines the Viewmodepage pattern entity.

Namespace

Drupal\view_mode_page\Entity

Code

public function hasRelationship($token) {
  return isset($this->relationships[$token]);
}