'#title' =>
$this->
t('States'
),
'#empty' =>
$this->
t('There are no states yet.'
),
'#tabledrag' =>
[ [ 'action' => 'order',
'relationship' => 'sibling',
'group' => 'state-weight',
],
],
];
$states =
$workflow->
getTypePlugin()->
getStates();
// Warn the user if there are no states.
if (empty($states)) { $this->
messenger()->
addWarning( $this->
t( 'This workflow has no states and will be disabled until there is at least one, <a href=":add-state">add a new state.</a>',
[':add-state' =>
$workflow->
toUrl('add-state-form'
)->
toString()] ) );
}