jagilpe/entity-list-bundle

用于创建和渲染实体列表的 Symfony Bundle

1.0.0 2017-05-29 18:07 UTC

This package is not auto-updated.

Last update: 2024-09-23 07:22:14 UTC


README

EntityListBundle 是一个用于构建和渲染实体列表的 Symfony Bundle。

安装

您可以使用 composer 安装此 Bundle

composer require jagilpe/entity-list-bundle

或者直接在您的 composer.json 文件中添加此包。

要启用 Bundle,只需在您的 AppKernel.php 文件中注册该 Bundle 即可

// in AppKernel::registerBundles()
$bundles = array(
    // ...
    new Jagilpe\EntityListBundle\JagilpeEntityListBundle(),
    // ...
);

最后,您需要将提供的 JavaScript 文件包含在您的基本模板中。如果您使用 assetic 来管理资产

{% block javascripts %}
    {{ parent() }}
    {% javascripts
        'bundles/jagilpeentitylist/js/jgp-searchable-table.js' %}
        <script src="{{ asset_url }}"></script>
    {% endjavascripts %}
{% endblock %}

此 JavaScript 依赖于 jQuery、List.js (>=1.5.0)。请参阅 jQuery 和 List.js 文档,了解如何在您的项目中启用它。

http://listjs.com/

文档

您可以在 此处 阅读该 Bundle 的使用文档

您还可以在 https://demos.gilpereda.com/symfony-bundles/entity-list/ 中查看此 Bundle 的演示,或直接从 https://github.com/jagilpe/bundles-demo 下载演示

API 参考

https://api.gilpereda.com/entity-list-bundle/master/