first batch of content architecture and admin ui
This commit is contained in:
5
src/web/modules/custom/admin_menus/admin_menus.info.yml
Normal file
5
src/web/modules/custom/admin_menus/admin_menus.info.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
name: 'Admin Menus'
|
||||
type: module
|
||||
description: 'create editors admin menus through module as they will be exportable as config'
|
||||
core_version_requirement: ^8.8 || ^9.2
|
||||
package: 'Custom'
|
||||
@@ -0,0 +1,31 @@
|
||||
admin_menus.concernement_add:
|
||||
route_name: node.add
|
||||
route_parameters:
|
||||
node_type: 'concernement'
|
||||
title: 'Add Concernement'
|
||||
appears_on:
|
||||
- view.admin_nodes.page_1
|
||||
|
||||
admin_menus.entite_add:
|
||||
route_name: node.add
|
||||
route_parameters:
|
||||
node_type: 'entite'
|
||||
title: 'Add Entité'
|
||||
appears_on:
|
||||
- view.admin_nodes.page_2
|
||||
|
||||
# admin_menus.company_add:
|
||||
# route_name: entity.taxonomy_term.add_form
|
||||
# route_parameters:
|
||||
# taxonomy_vocabulary: 'company'
|
||||
# title: 'Add Companie'
|
||||
# appears_on:
|
||||
# - view.admin_taxo.page_1
|
||||
|
||||
|
||||
# admin_menus.user_add:
|
||||
# route_name: user.admin_create
|
||||
# title: 'Add User'
|
||||
# appears_on:
|
||||
# - view.admin_users.page_1
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
admin_menus.contents:
|
||||
title: Contents
|
||||
description: ''
|
||||
parent: administrator
|
||||
route_name: view.admin_nodes.page_1
|
||||
menu_name: administrator
|
||||
weight: 0
|
||||
|
||||
admin_menus.concernements:
|
||||
title: Concernements
|
||||
description: ''
|
||||
parent: admin_menus.contents
|
||||
route_name: view.admin_nodes.page_1
|
||||
menu_name: administrator
|
||||
weight: 0
|
||||
|
||||
admin_menus.entitees:
|
||||
title: Entitees
|
||||
description: ''
|
||||
parent: admin_menus.contents
|
||||
route_name: view.admin_nodes.page_2
|
||||
menu_name: administrator
|
||||
weight: 2
|
||||
24
src/web/modules/custom/admin_menus/admin_menus.module
Normal file
24
src/web/modules/custom/admin_menus/admin_menus.module
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains admin_menus.module.
|
||||
*/
|
||||
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
|
||||
/**
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function admin_menus_help($route_name, RouteMatchInterface $route_match) {
|
||||
switch ($route_name) {
|
||||
// Main module help for the editors_menus module.
|
||||
case 'help.page.admin_menus':
|
||||
$output = '';
|
||||
$output .= '<h3>' . t('About') . '</h3>';
|
||||
$output .= '<p>' . t('create editors admins menus through module as they will be exportable as config') . '</p>';
|
||||
return $output;
|
||||
|
||||
default:
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
langcode: und
|
||||
status: true
|
||||
dependencies: { }
|
||||
id: administrator
|
||||
label: Administrators
|
||||
description: 'An admin menu for content administrators (must be customized for each new project)'
|
||||
locked: false
|
||||
Reference in New Issue
Block a user