registerArgument('content', 'string', 'Content to be trimmed'); $this->registerArgument('characters', 'string', 'Characters to be removed', false); } /** * @param array $arguments * @param \Closure $renderChildrenClosure * @param RenderingContextInterface $renderingContext * * @return string */ public static function renderStatic( array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext ) { $content = $arguments['content'] ? $arguments['content'] : $renderChildrenClosure(); $characters = $arguments['characters'] ? $arguments['characters'] : null; if ($characters !== null) { $content = trim($content, $characters); } else { $content = trim($content); } return $content; } }