Redaxscript\Modules\Preview\Preview::render PHP Метод

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

render
С версии: 3.0.0
public static render ( string $alias = null, string $path = null ) : string
$alias string
$path string
Результат string
    public static function render($alias = null, $path = null)
    {
        $titleElement = new Html\Element();
        $titleElement->init('h2', ['class' => 'rs-title-preview', 'id' => $alias]);
        $linkElement = new Html\Element();
        $linkElement->init('a', ['href' => Registry::get('secondParameter') === $alias ? Registry::get('parameterRoute') . 'preview#' . $alias : Registry::get('parameterRoute') . 'preview/' . $alias])->text(Registry::get('secondParameter') === $alias ? Language::get('back') : $alias);
        /* collect output */
        $output = $titleElement->html($linkElement);
        $output .= Template\Tag::partial($path);
        return $output;
    }