You are here

public function EntityTagPlugin::doProcess in Extensible BBCode 4.0.x

Same name and namespace in other branches
  1. 8.3 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;
}