コード例 #1
0
ファイル: TraitAccessorAttach.php プロジェクト: larakit/lk
 function thumbTypeAudio()
 {
     $url = $this->getAttachUrl();
     return \HtmlAudio::setSrc($url . '?' . microtime(true))->setControls('controls');
 }
コード例 #2
0
ファイル: init.php プロジェクト: larakit/lk-html
// регистрируем функции
//######################################################################
Larakit\Twig::register_function('html_progress', function () {
    return HtmlProgress::setContent('');
});
Larakit\Twig::register_function('html_map', function ($name, $id = null) {
    return \HtmlMap::setName($name)->setId($id ? $id : $name);
});
Larakit\Twig::register_function('html_progress_bar', function () {
    return HtmlProgressBar::setContent('');
});
Larakit\Twig::register_function('html_a', function ($url) {
    return HtmlA::setHref($url)->setContent($url);
});
Larakit\Twig::register_function('html_audio', function ($src) {
    return HtmlAudio::setSrc($src);
});
Larakit\Twig::register_function('html_abbr', function ($abbr, $fulltext) {
    return HtmlAbbr::setContent($abbr)->setTitle($fulltext);
});
Larakit\Twig::register_function('html_blockquote', function ($content, $author = null) {
    return HtmlBlockquote::setContent($content)->setAuthor($author);
});
Larakit\Twig::register_function('html_button', function ($content) {
    return HtmlButton::setContent($content);
});
Larakit\Twig::register_function('html_div', function ($content = null) {
    return HtmlDiv::setContent($content);
});
Larakit\Twig::register_function('html_i', function ($content = null) {
    return HtmlI::setContent($content);