0

I've trying figure out how to install Braincrafted/Bundle/BootstrapBundle into PHP Bolt CMS and take advantage of Boostrap Twig Templates Tags for my Bolt theme. But sadly come to a dead-end at install. :(

Since both are based on the Symfony Framework, the idea of adding "braincrafted/bootstrap-bundle": "~2.0" to my composer.json, ignore the Assetic Management part and adding the following to app/AppKernel.php sounded possible.

class AppKernel extends Kernel {
    public function registerBundles() {
        $bundles = array(new Braincrafted\Bundle\BootstrapBundle\BraincraftedBootstrapBundle());
        return $bundles;
    }
}

But where is "class AppKernel extends Kernel" in my Php Bolt Application? I'm guessing the index.php would be a start, or should I build a Php Bolt Extension path?

All I want is:

{{ knp_menu_render(menu, { 'style': 'tabs' }) }}

and

<form action="..." method="..." class="form-horizontal">
    {{ bootstrap_set_style('horizontal') }}

    {{ form_row(form.firstName) }}
    {{ form_row(form.lastName) }}

    {{ bootstrap_set_style('') }}
</form> 
{{ label_success('Success') }}

Thanks to anyone for help. P.S Php Bolt is +1 for ME so far :)

4

1 回答 1

1

Bolt CMS 基于Silex PHP 微框架,而后者又基于 Symfony组件,而不是 Symfony 框架。没有任何捆绑包,而是 Silex 的ServiceProvider。此外,Bolt 没有利用安全组件。

Bolt CMS 可以通过扩展进行扩展,但也可以覆盖内置的服务提供者——您只需在之后立即以相同的名称注册您自己的提供者$app->initialize()(您需要一些应用程序架构调整)。

有关注册服务提供商的更多信息,请参阅 Silex 文档。

于 2015-03-19T17:06:23.057 回答