bangpound/sculpin-oembed-bundle

dev-master / 1.0.x-dev 2015-07-11 05:38 UTC

This package is auto-updated.

Last update: 2024-09-12 03:21:10 UTC


README

此包尚未准备好使用!

设置

将此包添加到您的 sculpin.json 文件中

{
    "require": {
        "bangpound/sculpin-oembed-bundle": "~1.0@dev"
    }
}

并运行 sculpin update 命令来安装此包。

现在您可以在 app/SculpinKernel.php 文件中的 SculpinKernel 类中注册此包

class SculpinKernel extends \Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel
{
    protected function getAdditionalSculpinBundles()
    {
        return array(
           'Bangpound\Sculpin\Bundle\OEmbedBundle\SculpinOEmbedBundle'
        );
    }
}

如何使用

在 Twig 模板中,使用带有 URL 参数的 oembed 函数。

{{ oembed('https://vimeo.com/86129237') }}

待办事项