Flarum\Formatter\Formatter::render PHP Метод

render() публичный Метод

Render parsed XML.
public render ( string $xml, mixed $context = null ) : string
$xml string
$context mixed
Результат string
    public function render($xml, $context = null)
    {
        $renderer = $this->getRenderer($context);
        $this->events->fire(new ConfigureFormatterRenderer($renderer, $context, $xml));
        return $renderer->render($xml);
    }

Usage Example

Пример #1
0
 /**
  * Get the content rendered as HTML.
  *
  * @return string
  */
 public function getContentHtmlAttribute()
 {
     if ($this->is_html) {
         return nl2br($this->content);
     }
     return static::$formatter->render($this->attributes['content'], $this);
 }
All Usage Examples Of Flarum\Formatter\Formatter::render