public function TagProcessorBase::process in Extensible BBCode 4.0.x
Same name and namespace in other branches
- 8.3 src/Parser/Processor/TagProcessorBase.php \Drupal\xbbcode\Parser\Processor\TagProcessorBase::process()
Process a tag match.
Parameters
\Drupal\xbbcode\Parser\Tree\TagElementInterface $tag: The tag to be rendered.
Return value
\Drupal\xbbcode\Parser\Tree\OutputElementInterface The rendered output.
Overrides TagProcessorInterface::process
File
- src/
Parser/ Processor/ TagProcessorBase.php, line 19
Class
- TagProcessorBase
- Base tag processor for wrapping the output.
Namespace
Drupal\xbbcode\Parser\ProcessorCode
public function process(TagElementInterface $tag) : OutputElementInterface {
$output = $this
->doProcess($tag);
if (!$output instanceof OutputElementInterface) {
$output = new OutputElement((string) $output);
}
return $output;
}