示例#1
0
文件: init.php 项目: larakit/lk-html
    return HtmlSup::setContent($content);
});
Larakit\Twig::register_function('html_sub', function ($content = null) {
    return HtmlSub::setContent($content);
});
Larakit\Twig::register_function('html_ul', function ($items = []) {
    $list = HtmlUl::setContent(null);
    if (count($items)) {
        foreach ($items as $item) {
            $list->addItem($item);
        }
    }
    return $list;
});
Larakit\Twig::register_function('html_ol', function ($items = []) {
    $list = HtmlOl::setContent(null);
    if (count($items)) {
        foreach ($items as $item) {
            $list->addItem($item);
        }
    }
    return $list;
});
Larakit\Twig::register_function('html_table', function ($class = 'table table-striped table-bordered table-condensed') {
    return HtmlTable::addClass($class);
});
Larakit\Twig::register_function('html_image', function ($src = null) {
    return HtmlImg::setSrc($src);
});
Larakit\Twig::register_function('html_video', function ($src = null) {
    return HtmlVideo::setSrc($src);