{"repo":"andanteproject/page-filter-form-bundle","free":true,"listed":false,"github":"https://github.com/andanteproject/page-filter-form-bundle","clone":"git clone https://github.com/andanteproject/page-filter-form-bundle.git","description":"A Symfony Bundle to simplify the handling of page filters for lists/tables in admin panels.","language":"PHP","stars":10,"topics":["symfony","symfony-bundle","form","symfony-form","admin-panel","filters","php","php7","php74","page-filters"],"license":"MIT","category":"dashboards-admin","readme_excerpt":"Page Filter Form Bundle Symfony Bundle - AndanteProject A Symfony Bundle to simplify the handling of page filters for lists/tables in admin panels. 🧪 Requirements Symfony 4.x-7.x and PHP 7.4-8.0. Features - Use Symfony Form; - Keep your URL parameters clean as ?search=value&otherFilterName=anotherValue by default; - Form will work even if you render form elements outside the form tag , around the web page, exactly where you need, avoiding nested form conflicts . - Super easy to implement and maintain; - Works like magic ✨. How to install After installation, make sure you have the bundle registered in your Symfony bundles list ( config/bundles.php ): This should have been done automatically if you are using Symfony Flex. Otherwise, register it yourself. The problem Let's suppose you have this common admin panel controller with a page listing some Employee entities. To add filters to this page, let's create a Symfony form. Let's add this Form to our controller page: The code above has some huge problems: - 👎 Handling all this filter logic inside the controller is not a good idea. Sure, you can move it into a dedicated service, but that means creating another class file alongside EmployeeFilterType to handle filters, and that still does not solve the second point in this list; - 👎 You need to carry around and match form element names. search , senior and orderBy are keys you could store in constants to avoid repeating yourself, but this will drive you crazy as the filter logi","default_branch":null,"files":null,"tree":[],"storefront":"/r/andanteproject","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/andanteproject/page-filter-form-bundle/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}