{"id":20961824,"url":"https://github.com/heimrichhannot/contao-entity-filter-bundle","last_synced_at":"2025-07-03T22:07:28.592Z","repository":{"id":62515535,"uuid":"118007645","full_name":"heimrichhannot/contao-entity-filter-bundle","owner":"heimrichhannot","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-31T14:39:00.000Z","size":126,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-08T21:57:09.651Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heimrichhannot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2018-01-18T16:23:49.000Z","updated_at":"2025-03-31T14:38:59.000Z","dependencies_parsed_at":"2025-01-20T00:51:23.611Z","dependency_job_id":"ee077e38-800e-4f31-b832-af97c43fa9e3","html_url":"https://github.com/heimrichhannot/contao-entity-filter-bundle","commit_stats":{"total_commits":23,"total_committers":3,"mean_commits":7.666666666666667,"dds":0.3913043478260869,"last_synced_commit":"fc91c8dbeda382e91584c98a9acaf927db84dfbf"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/heimrichhannot/contao-entity-filter-bundle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-entity-filter-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-entity-filter-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-entity-filter-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-entity-filter-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heimrichhannot","download_url":"https://codeload.github.com/heimrichhannot/contao-entity-filter-bundle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-entity-filter-bundle/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263410776,"owners_count":23462299,"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":[],"created_at":"2024-11-19T02:17:43.591Z","updated_at":"2025-07-03T22:07:28.564Z","avatar_url":"https://github.com/heimrichhannot.png","language":"PHP","readme":"# Contao Entity Filter Bundle\n\nThis module offers an input type for selecting one or more entities by comfortably \"clicking together\" sql-like conditions.\n\n![alt text](./docs/screenshot.png \"Demo in the backend\")\n\n## Features\n\n- \"click together\" conditions for filtering (aka selecting) arbitrary contao entities\n- load existing filter conditions from other records\n- display a result list of your filtering right in the contao record's edit view\n\n### Technical instructions\n\nThis module offers 3 comfortable different functions for adding the widgets mentioned before right to your dca.\n\n_Note: Of course, you can also copy these 3 functions and customize them if they don't suit your needs_\n\n\n#### Add the entity filter widget to your dca:\n\n*Hint: If you like to set the table to be filtered dynamically, you can do that in an `onload_callback`.\nBut you still have to call the following function in your dca and not the callback because else `exclude` wouldn't be set correctly.* \n\n```\n\\Contao\\System::getContainer()-\u003eget('huh.entity_filter.manager')-\u003eaddFilterToDca(\n    // the name of the field\n    'memberConditions',\n    // your dca\n    'tl_md_recipient_list',\n    // the table to be filtered\n    'tl_member'\n);\n```\n\n#### Add a field for copying entity filters from other records:\n\n```\n\\Contao\\System::getContainer()-\u003eget('huh.entity_filter.manager')-\u003eaddFilterCopierToDca(\n    // the name of the field\n    'filterCopier',\n    // your dca\n    'tl_recipient_list',\n    // the dca where the field values are situated you want to copy (usually the same as your dca)\n    'tl_recipient_list',\n    // the entity_filter field\n    'memberConditions',\n    // a custom options_callback -\u003e if left out, ['huh.field_value_copier.util.field_value_copier_util', 'getOptions'] is used\n    ['huh.field_value_copier.util.field_value_copier_util', 'getOptions'],\n    // config parameters for field value copier widget\n    [\n        'labelPattern' =\u003e '%title% (ID %id%)'\n    ]\n);\n```\n\n#### Add a live-reloaded table for showing the results of your conditions:\n\n```\n\\Contao\\System::getContainer()-\u003eget('huh.entity_filter.manager')-\u003eaddListToDca(\n    // the name of the field\n    'memberList',\n    // your dca\n    'tl_recipient_list',\n    // the entity_filter field\n    'memberConditions',\n    // the table being filtered\n    'tl_member',\n    // the header fields of the table\n    array(\n        'title',\n        'firstname',\n        'lastname',\n        'email',\n    )\n);\n```\n\n## Events\n\nName | Arguments\n---- | ---------\n`ModifyEntityFilterQueryEvent` | `string $table`, `string $field`, `$activeRecord`, `string $query`, `string $where`, `array $values`, `array $listDca`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheimrichhannot%2Fcontao-entity-filter-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheimrichhannot%2Fcontao-entity-filter-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheimrichhannot%2Fcontao-entity-filter-bundle/lists"}