diff --git a/docs/install.txt b/docs/install.txt index 9b4bb31..ae130c8 100644 --- a/docs/install.txt +++ b/docs/install.txt @@ -3,15 +3,23 @@ SYSTEM apt install php-gd php-mbstring php-xml php-curl composer a2enmod rewrite + + SITE ==== #TODO make the vhost #TODO in apache2.conf set Override All on the directory + DRUPAL ====== + composer create-project drupal/recommended-project drupal +#TODO place composer.json in the drupal directory that should have appeared + +composer install + mysql -uroot -p drop database ...; create database ...; diff --git a/modules/opencase_defaults/opencase_defaults.links.menu.yml b/modules/opencase_defaults/opencase_defaults.links.menu.yml index 6976b9d..7b8f542 100644 --- a/modules/opencase_defaults/opencase_defaults.links.menu.yml +++ b/modules/opencase_defaults/opencase_defaults.links.menu.yml @@ -16,5 +16,4 @@ opencase.opencase_all_cases: menu_name: opencase parent: opencase.see_all url: internal:/opencase/all-cases - weight: 1 - + weight: -1 diff --git a/opencase.links.menu.yml b/opencase.links.menu.yml index 533716f..fc464d5 100644 --- a/opencase.links.menu.yml +++ b/opencase.links.menu.yml @@ -3,6 +3,11 @@ opencase.see_all: menu_name: opencase route_name: opencase.opencase_cases_menu weight: 0 +opencase.see_all_people_links: + class: Drupal\opencase\Plugin\Menu\SeeAllActorsMenuLink + deriver: Drupal\opencase\Plugin\Derivative\SeeAllActorsMenuLink + menu_name: opencase + parent: opencase.see_all opencase.opencase_add_new_things_menu: title: 'Add new...' menu_name: opencase diff --git a/src/Plugin/Derivative/SeeAllActorsMenuLink.php b/src/Plugin/Derivative/SeeAllActorsMenuLink.php new file mode 100644 index 0000000..3aada7f --- /dev/null +++ b/src/Plugin/Derivative/SeeAllActorsMenuLink.php @@ -0,0 +1,55 @@ +entityTypeManager = $entity_type_manager; + } + + /** +   * {@inheritdoc} +   */ + public static function create(ContainerInterface $container, $base_plugin_id) { + return new static( + $base_plugin_id, + $container->get('entity_type.manager') + ); + } + /** +   * {@inheritdoc} +   */ + public function getDerivativeDefinitions($base_plugin_definition) { + $links = []; + $actorTypes = $this->entityTypeManager->getStorage('oc_actor_type')->loadMultiple(); + foreach ($actorTypes as $id => $actorType) { + $links[$id] = [ + 'title' => $actorType->label().'s', + 'route_name' => "view.all_actors_of_a_type.page_1", + 'route_parameters' => ['actor_type' => $actorType->id()] + ] + $base_plugin_definition; + } + return $links; + } +} diff --git a/src/Plugin/Menu/SeeAllActorsMenuLink.php b/src/Plugin/Menu/SeeAllActorsMenuLink.php new file mode 100644 index 0000000..b54ba55 --- /dev/null +++ b/src/Plugin/Menu/SeeAllActorsMenuLink.php @@ -0,0 +1,9 @@ +