{"id":15021857,"url":"https://github.com/augustomoita/mottapgbundle","last_synced_at":"2026-01-03T22:05:19.659Z","repository":{"id":56942290,"uuid":"110179432","full_name":"augustomoita/MottaPgBundle","owner":"augustomoita","description":"Pagination bundle for Symfony","archived":false,"fork":false,"pushed_at":"2019-08-07T13:37:37.000Z","size":73,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-24T14:18:55.103Z","etag":null,"topics":["actions","bootstrap4","excel","export","pagination","pdf","php","symfony-bundle","symfony3"],"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/augustomoita.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-09T23:52:12.000Z","updated_at":"2024-04-24T14:18:55.104Z","dependencies_parsed_at":"2022-08-21T07:50:36.188Z","dependency_job_id":null,"html_url":"https://github.com/augustomoita/MottaPgBundle","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustomoita%2FMottaPgBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustomoita%2FMottaPgBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustomoita%2FMottaPgBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustomoita%2FMottaPgBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/augustomoita","download_url":"https://codeload.github.com/augustomoita/MottaPgBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243910820,"owners_count":20367545,"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":["actions","bootstrap4","excel","export","pagination","pdf","php","symfony-bundle","symfony3"],"created_at":"2024-09-24T19:57:08.875Z","updated_at":"2026-01-03T22:05:14.617Z","avatar_url":"https://github.com/augustomoita.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MottaPgBundle\n---\n#### Installation\n- Add via composer\n    ```console\n    $ composer require agusmoita/mottapg-bundle\n    ```\n\n#### Usage\n- Controller\n    ```php\n    use MottaPgBundle\\Util\\Paginator\\Paginator;\n    \n    /**\n     * @Route(\"/\", name=\"person_index\", methods={\"GET|POST\"})\n     */\n    public function indexAction(Paginator $pg, PersonRepository $repo)\n    {\n        return $pg\n                -\u003esetView('person/index.html.twig')\n                -\u003epaginate($repo);\n    }\n    ```\n    \n- Repository\n    ```php\n    // PersonRepository.php\n    \n    public function buildQuery($query, $pg)\n    {\n        // return SELECT a FROM AppBundle:Person a\n        return $query;\n    }\n    ```\n\n- View\n    ```twig\n    {# person/index.html.twig #}\n    \n    {% extends '@MottaPg/Paginator/table.html.twig' %}\n    \n    {% block title %}\n        \u003ch1\u003eList of People\u003c/h1\u003e\n    {% endblock %}\n    \n    {% block paginator_table_header %}\n        \u003cth\u003eFirst Name\u003c/th\u003e\n        \u003cth\u003eLast Name\u003c/th\u003e\n        \u003cth\u003eBirthday\u003c/th\u003e\n    {% endblock %}\n    \n    {% block paginator_table_data %}\n        \u003ctd\u003e{{ entity.firstName }}\u003c/td\u003e\n        \u003ctd\u003e{{ entity.lastName }}\u003c/td\u003e\n        \u003ctd\u003e{{ entity.birthday|date('m-d-Y') }}\u003c/td\u003e\n    {% endblock %}\n    ```\n    \n#### License\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugustomoita%2Fmottapgbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faugustomoita%2Fmottapgbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugustomoita%2Fmottapgbundle/lists"}