You are here

public function EntityEmbedDisplayBase::hasContextValue in Entity Embed 8

Returns whether or not value is set for a defined context.

Parameters

string $name: The name of the context in the plugin configuration.

Return value

bool True if context value exists, false otherwise.

2 calls to EntityEmbedDisplayBase::hasContextValue()
EntityEmbedDisplayBase::getEntityFromContext in src/EntityEmbedDisplay/EntityEmbedDisplayBase.php
Gets the entity from the current context.
EntityEmbedDisplayBase::getEntityTypeFromContext in src/EntityEmbedDisplay/EntityEmbedDisplayBase.php
Gets the entity type from the current context.

File

src/EntityEmbedDisplay/EntityEmbedDisplayBase.php, line 252

Class

EntityEmbedDisplayBase
Defines a base Entity Embed Display implementation.

Namespace

Drupal\entity_embed\EntityEmbedDisplay

Code

public function hasContextValue($name) {
  return array_key_exists($name, $this->context);
}