{"id":14983660,"url":"https://github.com/mmucklo/dtcgridbundle","last_synced_at":"2025-07-15T23:39:51.821Z","repository":{"id":47031870,"uuid":"2133010","full_name":"mmucklo/DtcGridBundle","owner":"mmucklo","description":"Datagrid for Symfony 2/3/4/5","archived":false,"fork":false,"pushed_at":"2023-06-21T16:13:08.000Z","size":2214,"stargazers_count":20,"open_issues_count":13,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-13T16:28:39.481Z","etag":null,"topics":["bootstrap","datatables","doctrine-odm","doctrine-orm","grid","jqgrid","jquery","php","symfony","symfony2","symfony3","symfony4"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mmucklo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-07-31T16:59:32.000Z","updated_at":"2023-09-27T16:18:17.000Z","dependencies_parsed_at":"2024-06-18T18:36:32.753Z","dependency_job_id":"b9b7957f-8667-47fa-a106-2419031b2971","html_url":"https://github.com/mmucklo/DtcGridBundle","commit_stats":{"total_commits":206,"total_committers":10,"mean_commits":20.6,"dds":0.2766990291262136,"last_synced_commit":"c6ed13ccc06181254f9f87e133bce8decee0a9e1"},"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/mmucklo/DtcGridBundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmucklo%2FDtcGridBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmucklo%2FDtcGridBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmucklo%2FDtcGridBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmucklo%2FDtcGridBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mmucklo","download_url":"https://codeload.github.com/mmucklo/DtcGridBundle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mmucklo%2FDtcGridBundle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265467717,"owners_count":23770769,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","datatables","doctrine-odm","doctrine-orm","grid","jqgrid","jquery","php","symfony","symfony2","symfony3","symfony4"],"created_at":"2024-09-24T14:07:44.703Z","updated_at":"2025-07-15T23:39:51.739Z","avatar_url":"https://github.com/mmucklo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"DtcGridBundle\n==============\n\n[![Build Status](https://travis-ci.org/mmucklo/DtcGridBundle.svg?branch=master)](https://travis-ci.org/mmucklo/DtcGridBundle)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mmucklo/DtcGridBundle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mmucklo/DtcGridBundle/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/mmucklo/DtcGridBundle/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/mmucklo/DtcGridBundle/?branch=master)\n\nGenerate a searchable Grid from a Doctrine ORM Entity or Doctrine MongoDB Document\n\n  * Utilize jQuery [DataTables](https://datatables.net), [jqGrid](http://www.trirand.com/blog/)(\\*), or a Styled HTML Table(\\*)\n  * Easily styled using Bootstrap\n  * Customize columns and more...\n  * (new as of 2.0): Easy to install, easy get started\n\n(*) search functionality supported on DataTables only\n\nRender customizable tables using jqGrid, or jQuery DataTables, or in a Styled HTML Table.\n\nSupports both Doctrine ORM and Doctrine MongoDB ODM\n\n![Screenshot](/Resources/doc/img/screenshot.png?raw=true \"Screenshot\")\n\nInstallation\n------------\n\n### Symfony 4/5\n\n```\n    composer.phar require mmucklo/grid-bundle\n```\n\nYou may see something like this (please answer 'y' to the question if prompted):\n\n```\n  -  WARNING  mmucklo/grid-bundle (\u003e=5.0): From github.com/symfony/recipes-contrib:master\n    The recipe for this package comes from the \"contrib\" repository, which is open to community contributions.\n    Review the recipe at https://github.com/symfony/recipes-contrib/tree/master/mmucklo/grid-bundle/4.0\n\n    Do you want to execute this recipe?\n    [y] Yes\n    [n] No\n    [a] Yes for all packages, only for the current installation session\n    [p] Yes permanently, never ask again for this project\n    (defaults to n): y\n  - Configuring mmucklo/grid-bundle (\u003e=5.0): From github.com/symfony/recipes-contrib:master\n```\n\n### Symfony 2/3\n    \nAdd this to your AppKernel.php file:\n\n```php\n    public function registerBundles()\n    {\n        $bundles = [\n            ...\n            new \\Dtc\\GridBundle\\DtcGridBundle(),\n            ...\n        ]\n```\n\nAdd this to your app/config/routing.yml file:\n\n```yaml\ndtc_grid:\n    resource: '@DtcGridBundle/Resources/config/routing.yml'\n```\n\nUsage\n-----\n\n### Get Started\n\nAfter installation, all entities and documents that have a Grid annotation should be available off the dtc_grid route:\n\n(NOTE: symfony5 example below, for symfony2/3, the namespace for the class may be different - e.g. AppBundle instead of App)\n\nThere are two recommended ways to setup a grid for a page, through Annotations, or through Reflection\n\n#### Reflection\n\nAutomatic Grid setup is possible by setting the reflections: allowed_entities: [...] parameter in the config/packages/dtc_grid.yaml configuration file (or config.yml for symfony \u003c= 3.4)\n\n```yaml\ndtc_grid:\n    reflection:\n        # allow any entity to be shown via the /dtc_grid route\n        # allowed_entities: ~, '*', or an array of entity names [ 'App:Product', 'App:Category', ... ]\n        #  ~ - no entities allowed for reflection\n        #  * - all entities allowed for reflection\n        #  [ 'App:Product', 'App:Category' ] - only App:Product and App:Category allowed\n        allowed_entities: ~\n```\n\n#### (New in 6.0) grid yaml file definition\n\nYou can place the grid column definitions in a custom yaml file:\n\n##### Step 1 - create the yaml file:\n```yaml\n# File location(s):\n#   - symfony 4+: config/dtc_grid/*.yaml (will load all *.yaml files in this directory)\n#   - symfony 2/3: src/*/*/Resources/config/dtc_grid.yaml (will only load files with this name or the name 'dtc_grid.yml')\n#   - custom (bundles): add the following to a CompilerPass:\n#        # $cacheDir = $container-\u003egetParameter('kernel.cache_dir');\n#        \\Dtc\\GridBundle\\Grid\\Source\\ColumnSource::cacheClassesFromFile($cacheDir, $filename);\nApp\\User:\n  columns:\n    id:\n      sortable: true\n    username:\n      sortable: true\n      searchable: true\n    email:\n      searchable: true\n    createdAt:\n      sortable: true\n    updatedAt:\n      sortable: true\n    status:\n      sortable: true\n      searchable: true\n  actions:\n    -\n      label: Show\n      type: show\n      route: dtc_grid_show\n    -\n      label: Archive\n      type: delete\n      route: dtc_grid_delete\n  sort:\n    id: ASC\n\nApp\\Article:\n  columns:\n    id:\n      sortable: true\n    userId:\n      sortable: true\n    createdAt:\n      sortable: true\n    updatedAt:\n      sortable: true\n    subject:\n      searchable: true\n    status:\n      sortable: true\n  actions:\n    -\n      label: Show\n      type: show\n      route: dtc_grid_show\n    -\n      label: Custom\n      onclick: \"alert('custom action')\"\n      button_class: btn-info\n  sort:\n    createdAt: DESC\n```\n\n#### Annotation Simple Example\n\nNote: this example still uses reflection to discover the columns, however if you want to customize the columns shown, and even which ones are shown, read on below in the section titled Customize Columns\n\n```php\n\u003c?php\n\nnamespace App\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\nuse Dtc\\GridBundle\\Annotation as Grid;\n\n/**\n * Class User\n * @Grid\\Grid\n * @ORM\\Entity\n * @package App\\Entity\n */\nclass User {\n    //...\n}\n```\n\nNow after adding the annotation, you may need to do:\n\n```\n    bin/console cache:clear\n    bin/console cache:warmup\n```\n\n## To access the grid:\n\nYou can access the grid without embedding it anywhere by going to the following url(s):\n\n  * Route: dtc_grid/dtc_grid/grid?class=App:User\n  * Parameters:\n      * class=[document_or_entity]\n         * This can be in either a fully-namespaced class name or symfony-style entity/document format separated by ':'\n            * e.g. either: 'App:User' or 'App\\Entity\\User'\n      * type=[datatables|table|jq_grid]\n\n#### Examples:\n```\n# A default HTML-based table\n# (warning: if your table is large, skip this example, and try the paginated datatables path below)\n\n\n# Datatables\n/dtc_grid/grid?class=App:User\u0026type=datatables\n\n# Full Class syntax \n/dtc_grid/grid?class=App\\Entity\\User\u0026type=datatables\n \n# MongoDB ODM examples\n/dtc_grid/grid?class=App:Event\u0026type=datatables\n/dtc_grid/grid?class=App\\Document\\Event\u0026type=datatables\n\n# Other types of tables\n/dtc_grid/grid?class=App:Event\u0026type=jq_grid\n/dtc_grid/grid?class=App:Event\u0026type=table\n\n \n```\n\n#### Note - Security\nFor production systems you may want to add the path ^/dtc_grid to your security.yml, and make it firewalled / admin-only:\n\n```yaml\nsecurity:\n    # ...\n    access_control:\n        # ...\n        - { path: ^/dtc_grid, roles: ROLE_ADMIN }\n\n```\n\n### Adding actions\n\nThere are presently several actions that you can add to your grid that will appear under a final column called \"Actions\"\n\nThese must be added as annotations to the Grid annotation.\n\n```php\n\u003c?php\n\nnamespace App\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\nuse Dtc\\GridBundle\\Annotation as Grid;\n\n/**\n * Class User\n * @Grid\\Grid(actions={@Grid\\ShowAction(), @Grid\\DeleteAction(), @Grid\\Action(label=\"Custom\",buttonClass=\"btn-info\",onclick=\"alert('custom-action')\")})\n * @ORM\\Entity\n * @package App\\Entity\n */\nclass User {\n    //...\n}\n```\n\n### A more custom Route\n\n```php\n/**\n * @Route(\"/users\", name=\"app_grid_users\")\n */\npublic function usersAction(Request $request) {\n    $renderer = $this-\u003eget('dtc_grid.renderer.factory')-\u003ecreate('datatables');\n    $gridSource = $this-\u003eget('dtc_grid.manager.source')-\u003eget('App:User');\n    $renderer-\u003ebind($gridSource);\n    return $this-\u003erender('@DtcGrid/Page/datatables.html.twig', $renderer-\u003egetParams());\n}\n```\n\n### Changing the renderer\n\n```php\n/**\n * @Route(\"/users_table\", name=\"app_grid_users_table\")\n */\npublic function usersAction(Request $request) {\n    $renderer = $this-\u003eget('dtc_grid.renderer.factory')-\u003ecreate('table');\n    $gridSource = $this-\u003eget('dtc_grid.manager.source')-\u003eget('App:User');\n    $renderer-\u003ebind($gridSource);\n    return $this-\u003erender('@DtcGrid/Page/datatables.html.twig', $renderer-\u003egetParams());\n}\n```\n\n### Customize Columns\n\nThere's a @Column annotation that lives in Dtc\\GridBundle\\Annotation that you place on each column you want to be visible.  Then you can specify a custom label, and or sortability if you want.  If there's no @GridColumn annotations at all, it will default to show all the columns.\n\n```php\n\n\u003c?php\n\nnamespace App\\Entity;\n\nuse Doctrine\\ORM\\Mapping as ORM;\nuse Dtc\\GridBundle\\Annotation as Grid;\n\n/**\n * Class User\n * @Grid\\Grid\n * @ORM\\Entity\n * @package App\\Entity\n */\nclass User {\n\n    /**\n     * @ORM\\Column(type=\"integer\")\n     * @ORM\\Id\n     * @ORM\\GeneratedValue(strategy=\"AUTO\")\n     */\n    protected $id;\n\n    /**\n     * @Grid\\Column(searchable=true)\n     * @ORM\\Column(type=\"string\")\n     */\n    protected $firstName;\n\n    /**\n     * @Grid\\Column(label=\"Last\", sortable=true, searchable=true)\n     * @ORM\\Column(type=\"string\")\n     */\n    protected $lastName;\n```\n\n### Customize jQuery, Purl, DataTables\n\nCustomization of the versions of jQuery, Purl, and DataTables can be done in config.yml\n\n```yaml\ndtc_grid:\n    theme: # theme defaults to bootstrap 3\n        css:\n            - 'path_or_url_to/bootstrap_or_any_other.css'\n            - 'etc. as necessary'\n        js:\n            - 'path_or_url_to/any_javascript_needed_for_theme.js'\n            - 'etc. as necessary'            \n    purl: 'path_or_url_to/purl.js' # presently defaults to v2.3.1 hosted on cdnjs\n    jquery: # presently defaults to 3.2.1 hosted on jquery's code.jquery.com cdn\n        url: 'path_or_url_to/jquery.js'\n        integrity: ~ # or an integrity for the file\n        crossorigin: ~ # or what goes in the crossorigin section of the script tag\n    datatables: # presently defaults to 1.10.16 hosted on cdn.datatables.net\n        css:\n            - 'path_or_url_to/datatables.css'\n            - 'path_or_url_to/any_other_needed.css'\n        js:\n            - 'path_or_url_to/datatables.js'\n            - 'path_or_url_to/datatables_theme.js'\n            - 'etc. as necessary'\n```\n\n### JQ Grid\n\nTo use JQ Grid, you need to specify the absolute URL, or relative/absolute path to the JQGrid files.\n\nAs JQ Grid has a different license than this bundle, there are no defaults provided.\n\n```yaml\n# config.yml\ndtc_grid:\n    jq_grid:\n        css:\n            - 'path_or_url_to/prettify.css'\n            - 'path_or_url_to/ui.jqgrid-bootstrap.css'\n        js:\n            - 'path_or_url_to/grid.locale-en.js'\n            - 'path_or_url_to/jquery.jqGrid.js'\n```\n\n```php\n    /**\n     * @Route(\"/users_table\", name=\"app_grid_users_table\")\n     */\n    public function usersAction(Request $request) {\n        $renderer = $this-\u003eget('dtc_grid.renderer.factory')-\u003ecreate('jq_grid');\n        $gridSource = $this-\u003eget('dtc_grid.manager.source')-\u003eget('App:User');\n        $renderer-\u003ebind($gridSource);\n        return $this-\u003erender('@DtcGrid/Page/datatables.html.twig', $renderer-\u003egetParams());\n    }\n```\n\n\n### Customize Bootstrap\n\n```yaml\n    # config.yml\n    dtc_grid:\n        bootstrap:\n            css: path_or_url_to_bootstrap.css\n            js: path_or_url_to_bootstrap.js\n```\n\n### Multiple Grids on the same page\n\nThe RendererFactory needs to be used if you want to render multiple grids on the same page.\n\nThere are presently three typs of renderers it supports:\n\n   * datatables\n   * jq_grid\n   * table\n\n```php\n    /**\n     * List jobs in system by default.\n     *\n     * @Route(\"/jobs/\")\n     */\n    public function jobsAction()\n    {\n        $rendererFactory = $this-\u003eget('dtc_grid.renderer.factory');\n        $renderer = $rendererFactory-\u003ecreate('datatables');\n        $gridSource = $this-\u003eget('dtc_grid.manager.source')-\u003eget('Dtc\\\\QueueBundle\\\\Documents\\\\Job');\n        $renderer-\u003ebind($gridSource);\n        $params = $renderer-\u003egetParams();\n\n        $renderer2 = $rendererFactory-\u003ecreate('datatables');\n        $gridSource2 = $this-\u003eget('dtc_grid.manager.source')-\u003eget('Dtc\\\\QueueBundle\\\\Documents\\\\JobArchive');\n        $renderer2-\u003ebind($gridSource2);\n        $params2 = $renderer2-\u003egetParams();\n\n        $params['archive_grid'] = $params2['dtc_grid'];\n        return $this-\u003erender('@DtcQueue/Queue/jobs.html.twig', $params);\n    }\n```\n\n\n#### Twig file rendering the multiple grids on the same page\n\njobs.html.twig:\n```twig\n{% extends \"DtcGridBundle:Page:datatables.html.twig\" %}\n\n{% block grid %}\n    \u003ch3\u003eLive Jobs\u003c/h3\u003e\n    {{ dtc_grid.render | raw }}\n    \u003ch3\u003eArchived Jobs\u003c/h3\u003e\n    {{ archive_grid.render | raw }}\n{% endblock %}\n```\n\n#### You can even render multiple types of grids on the same page\n\n```php\n    /**\n     * List jobs in system by default.\n     *\n     * @Route(\"/jobs/\")\n     */\n    public function jobsAction()\n    {\n        $rendererFactory = $this-\u003eget('dtc_grid.renderer.factory');\n        $renderer = $rendererFactory-\u003ecreate('jq_grid');  // NOTE THE DIFFERENT GRID TYPE\n        $gridSource = $this-\u003eget('dtc_grid.manager.source')-\u003eget('Dtc\\\\QueueBundle\\\\Documents\\\\Job');\n        $renderer-\u003ebind($gridSource);\n        $params = $renderer-\u003egetParams();\n\n        $renderer2 = $rendererFactory-\u003ecreate('datatables');\n        $gridSource2 = $this-\u003eget('dtc_grid.manager.source')-\u003eget('Dtc\\\\QueueBundle\\\\Documents\\\\JobArchive');\n        $renderer2-\u003ebind($gridSource2);\n        $params2 = $renderer2-\u003egetParams();\n\n        $params['archive_grid'] = $params2['dtc_grid'];\n        return $this-\u003erender('@DtcQueue/Queue/jobs.html.twig', $params);\n    }\n```\n\njobs.html.twig (a little complicated as styles and javascript has to be included for both grid types, although this isn't necessary if you use the \"table\" type renderer as it's CSS and Javascript overlaps with the \"datatables\" renderer):\n```twig\n{% extends '@DtcGrid/layout_base_jquery.html.twig' %}\n\n{% block dtc_grid_stylesheets %}\n    {% for stylesheet in dtc_grid_jq_grid_css %}\n        \u003clink rel=\"stylesheet\" href=\"{{ stylesheet }}\" /\u003e\n    {% endfor %}\n    {% for stylesheet in dtc_grid_datatables_css %}\n        \u003clink rel=\"stylesheet\" href=\"{{ stylesheet }}\" /\u003e\n    {% endfor %}\n{% endblock %}\n\n{% block dtc_grid_javascripts %}\n    {{ parent() }}\n    {% for javascript in dtc_grid_jq_grid_js %}\n        \u003cscript type=\"text/javascript\" src=\"{{ javascript }}\"\u003e\u003c/script\u003e\n    {% endfor %}    \n    {% for javascript in dtc_grid_datatables_js %}\n        \u003cscript src=\"{{ javascript }}\"\u003e\u003c/script\u003e\n    {% endfor %}\n{% endblock %}\n\n{% block grid %}\n    \u003ch3\u003eLive Jobs\u003c/h3\u003e\n    {{ dtc_grid.render | raw }}\n    \u003ch3\u003eArchived Jobs\u003c/h3\u003e\n    {{ archive_grid.render | raw }}\n{% endblock %}\n```\n\n### Customize/Embed Grid\n\nTo customize the grid's CSS/Javascript, or embed it into an existing page, follow the example below:\n\n```php\n/**\n * @Route(\"/users_custom\", name=\"app_grid_users_custom\")\n */\npublic function usersCustomAction(Request $request) {\n    // other setup, etc.\n    // Assuming you have a variable called \"$params\"\n\n    $renderer = $this-\u003eget('dtc_grid.renderer.factory')-\u003ecreate('datatables'); // or whichever renderer you want to use\n\n    $gridSource = $this-\u003eget('dtc_grid.manager.source')-\u003eget('App:User');\n    $renderer-\u003ebind($gridSource);\n\n    $renderer-\u003egetParams($params); // This will add the grid-specific params (mainly 'grid', and the bootstrap urls)\n    \n    // Alternatively you can do\n    // $dataGridParams = $renderer-\u003egetParams();\n    // $myParams['my_grid'] = $dataGridParams['dtc_grid'];\n\n    // render your page\n    return $this-\u003erender('@App/Something/somepage.html.twig', $params);\n}\n```\n\n#### Datatables Twig Example:\n```twig\n\u003chtml\u003e\n\u003chead\u003e\n    {% block stylesheets %}\n        {% for stylesheet in dtc_grid_theme_css %}\n            \u003clink rel=\"stylesheet\" href=\"{{ stylesheet }}\"\u003e\n        {% endfor %}\n    {% endblock %}\n\n    {% block dtc_grid_stylesheets %}\n        {% for stylesheet in dtc_grid_datatables_css %}\n            \u003clink rel=\"stylesheet\" href=\"{{ stylesheet }}\" /\u003e\n        {% endfor %}\n        {% for stylesheet in dtc_grid_local_css %}\n           \u003clink rel=\"stylesheet\" href=\"{{ app.request.baseUrl }}{{ stylesheet }}\" /\u003e\n        {% endfor %}\n    {% endblock %}\n    \n    {% block dtc_grid_javascripts %}\n        \u003cscript src=\"{{ dtc_grid_jquery.url }}\"\n            {% if dtc_grid_jquery.integrity is not empty  %} integrity=\"{{ dtc_grid_jquery.integrity }}\"{% endif %}\n            {% if dtc_grid_jquery.crossorigin is not empty  %} crossorigin=\"{{ dtc_grid_jquery.crossorigin }}\"{% endif %}\u003e\n        \u003c/script\u003e\n        \u003cscript src=\"{{ dtc_grid_purl }}\"\u003e\u003c/script\u003e\n        {% for javascript in dtc_grid_datatables_js %}\n            \u003cscript src=\"{{ javascript }}\"\u003e\u003c/script\u003e\n        {% endfor %}\n    {% endblock %}\n    \n    {% block javascripts %}\n        {% for javascript in dtc_grid_theme_js %}\n            \u003cscript src=\"{{ javascript }}\"\u003e\u003c/script\u003e\n        {% endfor %}\n        {% for javascript in dtc_grid_local_js %}\n            \u003cscript src=\"{{ app.request.baseUrl }}{{ javascript }}\"\u003e\u003c/script\u003e\n        {% endfor %}\n    {% endblock javascripts %}\n\u003c/head\u003e\n\u003cbody\u003e\n\n\u003c!-- .... --\u003e\n{# This is the most important part - 'dtc_grid.render' should be 'dtc_grid.render' or 'my_grid.render', or whatever you called it if you change the parameter's name #}\n{{ dtc_grid.render | raw }}\n\n\u003c!-- ... --\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n#### JQGrid Twig Example:\n```twig\n\u003chtml\u003e\n\u003chead\u003e\n    {% block stylesheets %}\n        {% for stylesheet in dtc_grid_theme_css %}\n            \u003clink rel=\"stylesheet\" href=\"{{ stylesheet }}\"\u003e\n        {% endfor %}\n        {% for stylesheet in dtc_grid_local_css %}\n           \u003clink rel=\"stylesheet\" href=\"{{ app.request.baseUrl }}{{ stylesheet }}\" /\u003e\n        {% endfor %}\n    {% endblock %}\n\n    {% block dtc_grid_stylesheets %}\n        {% for stylesheet in dtc_grid_jq_grid_css %}\n            \u003clink rel=\"stylesheet\" href=\"{{ stylesheet }}\" /\u003e\n        {% endfor %}\n    {% endblock %}\n    \n    {% block dtc_grid_javascripts %}\n        \u003cscript src=\"{{ dtc_grid_jquery.url }}\"\n            {% if dtc_grid_jquery.integrity is not empty  %} integrity=\"{{ dtc_grid_jquery.integrity }}\"{% endif %}\n            {% if dtc_grid_jquery.crossorigin is not empty  %} crossorigin=\"{{ dtc_grid_jquery.crossorigin }}\"{% endif %}\u003e\n        \u003c/script\u003e\n        \u003cscript src=\"{{ dtc_grid_purl }}\"\u003e\u003c/script\u003e\n        {% for javascript in dtc_grid_jq_grid_js %}\n            \u003cscript type=\"text/javascript\" src=\"{{ javascript }}\"\u003e\u003c/script\u003e\n        {% endfor %}    \n    {% endblock %}\n    \n    {% block javascripts %}\n        {% for javascript in dtc_grid_theme_js %}\n            \u003cscript src=\"{{ javascript }}\"\u003e\u003c/script\u003e\n        {% endfor %}\n        {% for javascript in dtc_grid_local_js %}\n            \u003cscript src=\"{{ app.request.baseUrl }}{{ javascript }}\"\u003e\u003c/script\u003e\n        {% endfor %}\n    {% endblock javascripts %}\n\u003c/head\u003e\n\u003cbody\u003e\n\n\u003c!-- .... --\u003e\n{# This is the most important part - 'dtc_grid.render' should be 'dtc_grid.render' or 'my_grid.render', or whatever you called it if you change the parameter's name #}\n{{ dtc_grid.render | raw }}\n\n\u003c!-- ... --\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n#### Table Twig Example:\n```twig\n\u003chtml\u003e\n\u003chead\u003e\n    {% block stylesheets %}\n        {% for stylesheet in dtc_grid_theme_css %}\n            \u003clink rel=\"stylesheet\" href=\"{{ stylesheet }}\"\u003e\n        {% endfor %}\n        {% for stylesheet in dtc_grid_local_css %}\n           \u003clink rel=\"stylesheet\" href=\"{{ app.request.baseUrl }}{{ stylesheet }}\" /\u003e\n        {% endfor %}\n    {% endblock %}\n\n    {% block javascripts %}\n        {% for javascript in dtc_grid_theme_js %}\n            \u003cscript src=\"{{ javascript }}\"\u003e\u003c/script\u003e\n        {% endfor %}\n        {% for javascript in dtc_grid_local_js %}\n            \u003cscript src=\"{{ app.request.baseUrl }}{{ javascript }}\"\u003e\u003c/script\u003e\n        {% endfor %}\n    {% endblock javascripts %}\n\u003c/head\u003e\n\u003cbody\u003e\n\n\u003c!-- .... --\u003e\n{# This is the most important part - 'dtc_grid.render' should be 'dtc_grid.render' or 'my_grid.render', or whatever you called it if you change the parameter's name #}\n{{ dtc_grid.render | raw }}\n\n\u003c!-- ... --\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nDocumentation\n-------------\nThere is additional (somewhat legacy at this point) documentation stored in `Resources/doc/`\n\n#### Legacy:\nYou used to have to use a \"Generator\" to create the grid.source service, however this is no longer necessary, however documentation on how to use it is still available in the Resources/doc/ area.\n\nLicense\n-------\nThis bundle is under the MIT license (see LICENSE file under [Resources/meta/LICENSE](Resources/meta/LICENSE)).\n\nCredit\n------\nOriginally written by @dtee\nMaintained by @mmucklo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmucklo%2Fdtcgridbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmmucklo%2Fdtcgridbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmmucklo%2Fdtcgridbundle/lists"}