You are here

protected function PdbBlock::addEntityJsContext in Decoupled Blocks 8

Add serialized entity to the JS Contexts.

Parameters

\Drupal\Core\Entity\Plugin\DataType\EntityAdapter $data: The entity to serialize.

array $js_contexts: The full array of JS contexts.

string $key: The context key.

Deprecated

in pdb:8.x-1.0 and is removed from pdb:2.0.0. Instead, you should just use ::getContextEntityValue().

File

src/Plugin/Block/PdbBlock.php, line 243

Class

PdbBlock
Class PdbBlock.

Namespace

Drupal\pdb\Plugin\Block

Code

protected function addEntityJsContext(EntityAdapter $data, array &$js_contexts, $key) {
  @trigger_error('addEntityJsContext() is deprecated in pdb:8.x-1.0 and is removed from pdb:2.0.0. Use ::getContextEntityValue() instead.', E_USER_DEPRECATED);
  $this
    ->getContextEntityValue($key, $data, $js_contexts);
}