public function WorkflowConfigTransitionRoleForm::buildHeader in Workflow 8
File
- src/Form/WorkflowConfigTransitionRoleForm.php, line 28
Class
- WorkflowConfigTransitionRoleForm
- Defines a class to build a listing of Workflow Config Transitions entities.
Namespace
Drupal\workflow\Form
Code
public function buildHeader() {
$header = [];
$workflow = $this->workflow;
$states = $workflow
->getStates($all = 'CREATION');
if ($states) {
$header['label_new'] = $this
->t('From \\ To');
foreach ($states as $state) {
if (!$state
->isCreationState()) {
$header[$state
->id()] = $this
->t('@label', [
'@label' => $state
->label(),
]);
}
}
}
return $header;
}