Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / workflows / src / WorkflowListBuilder.php
index 3e94103f4b1caf3e5e6b39a060715557ffa65328..a85ef659fb253eb494d966375f15f3e8d9e0368e 100644 (file)
@@ -73,10 +73,10 @@ class WorkflowListBuilder extends ConfigEntityListBuilder {
     $row['label'] = $entity->label();
 
     $row['type']['data'] = [
-      '#markup' => $entity->getTypePlugin()->label()
+      '#markup' => $entity->getTypePlugin()->label(),
     ];
 
-    $items = array_map([State::class, 'labelCallback'], $entity->getStates());
+    $items = array_map([State::class, 'labelCallback'], $entity->getTypePlugin()->getStates());
     $row['states']['data'] = [
       '#theme' => 'item_list',
       '#context' => ['list_style' => 'comma-list'],
@@ -93,7 +93,7 @@ class WorkflowListBuilder extends ConfigEntityListBuilder {
     $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 Content Moderation module provides a workflow type that enables workflows for content entities.');
+      $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' => '/admin/modules#module-content-moderation']);
     }
     return $build;
   }