diff --git a/src/Controller/ManageMediaController.php b/src/Controller/ManageMediaController.php
index d15175f9..025d1d9d 100644
--- a/src/Controller/ManageMediaController.php
+++ b/src/Controller/ManageMediaController.php
@@ -6,6 +6,7 @@ use Drupal\islandora\IslandoraUtils;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Routing\RouteMatch;
use Drupal\node\Entity\Node;
+use Drupal\Core\Url;
use Drupal\node\NodeInterface;
/**
@@ -34,13 +35,18 @@ class ManageMediaController extends ManageMembersController {
['query' => ["edit[$field][widget][0][target_id]" => $node->id()]]
);
+ $manage_link = Url::fromRoute('entity.media_type.collection')->toRenderArray();
+ $manage_link['#title'] = $this->t('Manage media types');
+ $manage_link['#type'] = 'link';
+ $manage_link['#prefix'] = ' ';
+ $manage_link['#suffix'] = '.';
+
return [
'#type' => 'markup',
- '#markup' => $this->t("The following media types can be added because they have the @field
field. Manage media types.",
- [
- '@field' => $field,
- '@manage_media_page' => '/admin/structure/media',
- ]),
+ '#markup' => $this->t("The following media types can be added because they have the @field
field.", [
+ '@field' => $field,
+ ]),
+ 'manage_link' => $manage_link,
'add_media' => $add_media_list,
];
}
diff --git a/src/Controller/ManageMembersController.php b/src/Controller/ManageMembersController.php
index bfd2cf74..9827ff35 100644
--- a/src/Controller/ManageMembersController.php
+++ b/src/Controller/ManageMembersController.php
@@ -7,6 +7,7 @@ use Drupal\Core\Render\RendererInterface;
use Drupal\Core\Entity\Controller\EntityController;
use Drupal\Core\Entity\EntityFieldManagerInterface;
use Drupal\Core\Link;
+use Drupal\Core\Url;
use Drupal\islandora\IslandoraUtils;
use Drupal\node\NodeInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -98,13 +99,18 @@ class ManageMembersController extends EntityController {
['query' => ["edit[$field][widget][0][target_id]" => $node->id()]]
);
+ $manage_link = Url::fromRoute('entity.node_type.collection')->toRenderArray();
+ $manage_link['#title'] = $this->t('Manage content types');
+ $manage_link['#type'] = 'link';
+ $manage_link['#prefix'] = ' ';
+ $manage_link['#suffix'] = '.';
+
return [
'#type' => 'markup',
- '#markup' => $this->t("The following content types can be added because they have the @field
field. Manage content types.",
- [
- '@field' => $field,
- '@manage_content_types' => '/admin/structure/types',
- ]),
+ '#markup' => $this->t("The following content types can be added because they have the @field
field.", [
+ '@field' => $field,
+ ]),
+ 'manage_link' => $manage_link,
'add_node' => $add_node_list,
];
}