You are here

protected function TagBlock::getEntity in Doubleclick for Publishers (DFP) 8

Loads the block content entity of the block.

Return value

\Drupal\dfp\Entity\TagInterface|null The block content entity.

1 call to TagBlock::getEntity()
TagBlock::build in src/Plugin/Block/TagBlock.php
Builds and returns the renderable array for this block plugin.

File

src/Plugin/Block/TagBlock.php, line 122
Contains \Drupal\dfp\Plugin\Block\TagBlock.

Class

TagBlock
Defines a generic DFP Ad block type.

Namespace

Drupal\dfp\Plugin\Block

Code

protected function getEntity() {
  $uuid = $this
    ->getDerivativeId();
  if (!isset($this->tag)) {
    $this->tag = $this->entityRepository
      ->loadEntityByUuid('dfp_tag', $uuid);
  }
  return $this->tag;
}