facet_group_assign
No security coverage
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)