misato/bootstrap-duallistbox-bundle

轻松将Bootstrap Duallistbox集成到symfony2中

1.0.2 2015-05-19 13:41 UTC

This package is auto-updated.

Last update: 2024-09-20 00:36:05 UTC


README

此包简化了将bootstrap-duallistbundle集成到您的Symfony2项目中的过程。

安装

通过Composer安装

将BootstrapDuallistbox包作为依赖项添加到应用程序的composer.json中

{
    "require": {
        ...
        "misato/bootstrap-duallistbox-bundle": "dev-master"
        ...
    }
}

在composer update/install后激活自动符号链接

{
    "scripts": {
        "post-install-cmd": [
            "Misato\\BootstrapDuallistboxBundle\\Composer\\ScriptHandler::postInstallSymlinkBootstrapDuallistbox"
        ],
        "post-update-cmd": [
            "Misato\\BootstrapDuallistboxBundle\\Composer\\ScriptHandler::postInstallSymlinkBootstrapDuallistbox"
        ]
    }
}

还有一个控制台命令用于检查和/或安装此符号链接

(以下为更详细的步骤)

    php app/console misato:bootstrap-duallistbox:symlink

将BootstrapDuallistboxBundle添加到您的应用程序内核中。

// app/AppKernel.php
<?php
    // ...
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Misato\BootstrapDuallistbox\MisatoBootstrapDuallistboxBundle(),
        );
    }

将bootstrap-duallistbox资源添加到您的web文件夹中

要将bootstrap-duallistbox的css和javascript文件复制到web文件夹中,可以使用以下命令

    php app/console assets:install web/