public function WorkflowStateListBuilder::load in Workflow 8
Load the Transitions, and filter for Workflow type.
Overrides ConfigEntityListBuilder::load
File
- src/
WorkflowStateListBuilder.php, line 22
Class
- WorkflowStateListBuilder
- Defines a class to build a draggable listing of Workflow State entities.
Namespace
Drupal\workflowCode
public function load() {
$entities = [];
if (!($workflow = workflow_url_get_workflow())) {
return $entities;
}
$wid = $workflow
->id();
/** @var \Drupal\workflow\Entity\WorkflowState[] $entities */
$entities = parent::load();
foreach ($entities as $key => $entity) {
if ($entity
->getWorkflowId() != $wid) {
unset($entities[$key]);
}
}
return $entities;
}