public function CallbackTagProcessor::doProcess in Extensible BBCode 4.0.x
Same name and namespace in other branches
- 8.3 src/Parser/Processor/CallbackTagProcessor.php \Drupal\xbbcode\Parser\Processor\CallbackTagProcessor::doProcess()
Override this function to return any printable value.
Parameters
\Drupal\xbbcode\Parser\Tree\TagElementInterface $tag: Tag element in the parse tree.
Return value
mixed Any value that can be cast to string.
Overrides TagProcessorBase::doProcess
File
- src/
Parser/ Processor/ CallbackTagProcessor.php, line 54
Class
- CallbackTagProcessor
- A simple wrapper that allows using callable functions as tag plugins.
Namespace
Drupal\xbbcode\Parser\ProcessorCode
public function doProcess(TagElementInterface $tag) {
if ($this->processFunction) {
return ($this->processFunction)($tag);
}
return NULL;
}