public function TagPluginInterface::prepare in Extensible BBCode 8.3
Same name and namespace in other branches
- 4.0.x src/Plugin/TagPluginInterface.php \Drupal\xbbcode\Plugin\TagPluginInterface::prepare()
Transform an elements' content, to armor against other filters.
- Use the inner content if all children will be rendered. (This just means the children's own ::prepare() functions are used.)
- Use $tag->getSource() if no children will be rendered.
- Traverse the tag's descendants for more complex cases.
Parameters
string $content: The content, after applying inner transformations.
\Drupal\xbbcode\Parser\Tree\TagElementInterface $tag: The original tag element.
Return value
string The prepared output.
1 method overrides TagPluginInterface::prepare()
- TagPluginBase::prepare in src/
Plugin/ TagPluginBase.php - Transform an elements' content, to armor against other filters.
File
- src/
Plugin/ TagPluginInterface.php, line 110
Class
- TagPluginInterface
- Defines the interface for XBBCode tag plugins.
Namespace
Drupal\xbbcode\PluginCode
public function prepare(string $content, TagElementInterface $tag) : string;