Tools For Better Developers

Osm Admin

Previously known as The Big Red Button project.

A package for defining application data structures and logic using PHP 8 classes and attributes, pressing the big red button (it's also the project codename), and getting fully functioning Admin Panel and API.

Osm Admin: Filters

2022 January Osm Admin

2 years ago ∙ 3 minutes read

In the user interface, you can narrow displayed data using grid column filters, or filters displayed in the sidebar. To enable that, apply #[Filter\*] attributes to class properties.

Applied filters appear in the URL query parameters, for example, .../edit?id=5+16+19, and on the page.

You can apply filters not only to a grid page, but also to a form page - to mass edit all matching objects, or to an action URL (edit, delete, or custom) - to perform the action on all matching objects.

In the same way, you can apply filters to the API URLs in order to retrieve or modify matching objects in a script.