{"id":15287377,"url":"https://github.com/elma/devexpressbundle","last_synced_at":"2025-04-13T05:09:00.513Z","repository":{"id":56976887,"uuid":"77622700","full_name":"Elma/DevExpressBundle","owner":"Elma","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-30T12:44:09.000Z","size":94,"stargazers_count":4,"open_issues_count":3,"forks_count":8,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-13T05:08:47.425Z","etag":null,"topics":["bundle","devexpress","php","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":null,"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/Elma.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-29T15:48:36.000Z","updated_at":"2020-04-09T11:53:45.000Z","dependencies_parsed_at":"2024-10-14T18:21:12.736Z","dependency_job_id":null,"html_url":"https://github.com/Elma/DevExpressBundle","commit_stats":{"total_commits":33,"total_committers":6,"mean_commits":5.5,"dds":"0.48484848484848486","last_synced_commit":"0b21b2019900c4a302fb7e1ac945e7f45074b6ea"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Elma%2FDevExpressBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Elma%2FDevExpressBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Elma%2FDevExpressBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Elma%2FDevExpressBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Elma","download_url":"https://codeload.github.com/Elma/DevExpressBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665747,"owners_count":21142123,"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":["bundle","devexpress","php","symfony","symfony-bundle"],"created_at":"2024-09-30T15:27:59.181Z","updated_at":"2025-04-13T05:09:00.493Z","avatar_url":"https://github.com/Elma.png","language":"PHP","readme":"[![Build Status](https://circleci.com/gh/Elma/DevExpressBundle.png?style=shield\u0026circle-token=68c368dfa20dfcf807557136ea6a555da88c3adf)](https://circleci.com/gh/Elma/DevExpressBundle/tree/master)\n[![Coding Style]( https://styleci.io/repos/77622700/shield)](https://styleci.io/repos/77622700)\n\n## Overview ##\n\n- This bundle is an not an official bundle of the DevExpress team.\n- This bundle does not include any files related to the DevExpress libraries\n- This bundle provides a simple (and incomplete) bridge between the DevExpressJs widgets and doctrine\n- This bundle is a WIP and PR are more than welcome\n\nCurrently only a dxDataGrid bridge is provided\n\n## Installation ##\nAdd the bundle to your composer.json file:\n```\ncomposer require elma/devexpressbundle \"~1.0@dev\"\n```\nRegister the bundle in your composer\n```\n//File : app/AppKernel.php\n$bundles = [\n    // ...\n    new Bilendi\\DevExpressBundle\\BilendiDevExpressBundle,\n    // ...\n]\n```\n## dxDataGrid ##\n\nHere is a detailed example of an implementation.\n```php\n    /**\n     * @return \\Symfony\\Component\\HttpFoundation\\Response\n     * @Route(...)\n     */\n    public function indexAction(Request $request)\n    {\n        // Initiate the parser\n        $parser = new SearchQueryParser(); \n        // Parse the DevExpress object\n        $query = $parser-\u003eparse(json_decode($request-\u003eget('loadOptions')));\n\n        // Link between the column header and the doctrine field\n        $map = [\n            \"Username\" =\u003e \"u.username\",\n            \"FirstName\" =\u003e \"u.firstName\"\n        ];\n        // Create the config with the mapping\n        $config = new DoctrineQueryConfig($map);\n\n        // Return the data and the total number of item\n        return $this-\u003ejson([\n            'content' =\u003e $this-\u003egetContent($config, $query),\n            'total' =\u003e $this-\u003egetTotal($config, $query)\n        ]);\n    }\n```\nReturn the data\n```php\n    private function getContent(DoctrineQueryConfig $config, SearchQuery $query)\n    {\n        // Create the query builder\n        $queryBuilder = $this-\u003egetDoctrine()-\u003egetManager()-\u003ecreateQueryBuilder();\n        // Select Data from the DB\n        $queryBuilder-\u003eselect('u')-\u003efrom('AcmeUserBundle:Order', 'u');\n\n        // Create the query handle\n        $handler = new DoctrineQueryHandler($config, $queryBuilder, $query);\n        // Binds the filters, pagination and sorting\n        $queryBuilder = $handler-\u003eaddAllModifiers();\n\n        return $queryBuilder-\u003egetQuery()-\u003egetResult();\n    }\n```\nReturn the number of items\n```php\n    private function getTotal(DoctrineQueryConfig $config, SearchQuery $query)\n    {\n        $queryBuilder = $this-\u003egetDoctrine()-\u003egetManager('catalogue')-\u003ecreateQueryBuilder();\n        $queryBuilder-\u003eselect('COUNT(u)')-\u003efrom('AcmeUserBundle:Order', 'u');\n\n        $handler = new DoctrineQueryHandler($config, $queryBuilder, $query);\n        // Add only the filters. You must not add the pagination. You should not add sorting (useless for counting)\n        $handler-\u003eaddFilters();\n\n       return $queryBuilder-\u003egetQuery()-\u003egetSingleScalarResult();\n    }\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felma%2Fdevexpressbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felma%2Fdevexpressbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felma%2Fdevexpressbundle/lists"}