function WorkflowListBuilder::render
Same name in other branches
- 9 core/modules/workflows/src/WorkflowListBuilder.php \Drupal\workflows\WorkflowListBuilder::render()
- 8.9.x core/modules/workflows/src/WorkflowListBuilder.php \Drupal\workflows\WorkflowListBuilder::render()
- 10 core/modules/workflows/src/WorkflowListBuilder.php \Drupal\workflows\WorkflowListBuilder::render()
Overrides EntityListBuilder::render
File
-
core/
modules/ workflows/ src/ WorkflowListBuilder.php, line 93
Class
- WorkflowListBuilder
- Provides a listing of Workflow entities.
Namespace
Drupal\workflowsCode
public function render() {
$build = parent::render();
$workflow_types_count = count($this->workflowTypeManager
->getDefinitions());
if ($workflow_types_count === 0) {
$build['table']['#empty'] = $this->t('There are no workflow types available. In order to create workflows you need to install a module that provides a workflow type. For example, the <a href=":content-moderation">Content Moderation</a> module provides a workflow type that enables workflows for content entities.', [
':content-moderation' => Url::fromRoute('system.modules_list', [], [
'fragment' => 'module-content-moderation',
])->toString(),
]);
}
return $build;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.