Browse Source

Document the add members and add media pages.

pull/908/head
Rosie Le Faive 2 years ago
parent
commit
e3c7e6edda
  1. 9
      src/Controller/ManageMediaController.php
  2. 10
      src/Controller/ManageMembersController.php

9
src/Controller/ManageMediaController.php

@ -25,7 +25,7 @@ class ManageMediaController extends ManageMembersController {
public function addToNodePage(NodeInterface $node) {
$field = IslandoraUtils::MEDIA_OF_FIELD;
return $this->generateTypeList(
$add_media_list = $this->generateTypeList(
'media',
'media_type',
'entity.media.add_form',
@ -33,6 +33,13 @@ class ManageMediaController extends ManageMembersController {
$field,
['query' => ["edit[$field][widget][0][target_id]" => $node->id()]]
);
return [
'#type' => 'markup',
'#markup' => $this->t("These available media types below have <em>@field</em> and it is configured to allow this content type.",
['@field' => $field]),
'add_media' => $add_media_list,
];
}
/**

10
src/Controller/ManageMembersController.php

@ -88,7 +88,8 @@ class ManageMembersController extends EntityController {
*/
public function addToNodePage(NodeInterface $node) {
$field = IslandoraUtils::MEMBER_OF_FIELD;
return $this->generateTypeList(
$add_node_list = $this->generateTypeList(
'node',
'node_type',
'node.add',
@ -96,6 +97,13 @@ class ManageMembersController extends EntityController {
$field,
['query' => ["edit[$field][widget][0][target_id]" => $node->id()]]
);
return [
'#type' => 'markup',
'#markup' => $this->t("These available content types below have <em>@field</em> and it is configured to allow this content type.",
['@field' => $field]),
'add_node' => $add_node_list,
];
}
/**

Loading…
Cancel
Save