protected function WorkflowManager::getGroupLabels in State Machine 8
Gets a list of group labels for the given entity type ID.
Parameters
string $entity_type_id: The entity type ID.
Return value
array A list of groups labels keyed by ID.
1 call to WorkflowManager::getGroupLabels()
- WorkflowManager::getGroupedLabels in src/
WorkflowManager.php - Gets the grouped workflow labels.
File
- src/
WorkflowManager.php, line 189
Class
- WorkflowManager
- Manages discovery and instantiation of workflow plugins.
Namespace
Drupal\state_machineCode
protected function getGroupLabels($entity_type_id = NULL) {
$group_definitions = $this->groupManager
->getDefinitionsByEntityType($entity_type_id);
$group_labels = array_map(function ($group_definition) {
return (string) $group_definition['label'];
}, $group_definitions);
natcasesort($group_labels);
return $group_labels;
}