This project provides a Drush command to easily assign specific or all available global directory facets to a Drupal Group. This helps organize and filter content within microsite groups efficiently.
Provides a Drush command to assign global directory facets (localgov_directories_facets) to a microsite group (Drupal Group module).
Features
Assign facets of specific types to a group:
drush facet-group:assign --group-id=5 --facet-types=location,type_of_activity,cost
Assign all facet types:
drush facet-group:assign --group-id=5 --all-facet-types
Reset progress and start fresh:
drush facet-group:assign --group-id=5 --all-facet-types --reset
Options
Option Type Default Description--group-id
integer
required
Group ID to assign facets to
--facet-types
string
—
Comma-separated list of facet bundle types
--all-facet-types
boolean
false
Process all facet types
--reset
boolean
false
Clear progress tracker and restart
--plugin
string
group_localgov_directories_facets
Group relationship plugin ID
Progress tracking
The command stores processed facet IDs in Drupal state (facet_group_assign.processed). If interrupted, re-running the same command will skip already-processed facets. Use --reset to clear the tracker and start from scratch.
Output summary
After completion, the command prints:
- Per facet type success/failure counts
- Number of previously assigned facets (skipped)
- Total new assignments
- List of failed facet IDs (if any)
Additional Requirements
grouplocalgov_directories(provides thelocalgov_directories_facetsentity type)
Ask your assistant about Facet Group Assign
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.