You are here

public function EntityTagPlugin::doProcess in Extensible BBCode 8.3

Same name and namespace in other branches
  1. 4.0.x src/Plugin/XBBCode/EntityTagPlugin.php \Drupal\xbbcode\Plugin\XBBCode\EntityTagPlugin::doProcess()

Throws

\Twig\Error\LoaderError

\Twig\Error\RuntimeError

\Twig\Error\SyntaxError

Overrides TemplateTagPlugin::doProcess

File

src/Plugin/XBBCode/EntityTagPlugin.php, line 108

Class

EntityTagPlugin
A tag plugin based on a custom tag entity.

Namespace

Drupal\xbbcode\Plugin\XBBCode

Code

public function doProcess(TagElementInterface $tag) : TagProcessResult {
  $result = parent::doProcess($tag);
  $result
    ->addCacheableDependency($this
    ->getEntity());
  $result
    ->addAttachments($this
    ->getEntity()
    ->getAttachments());
  return $result;
}