Commit b7439e49 authored by Merlin Axel Rutz's avatar Merlin Axel Rutz Committed by vincent baronnet
Browse files

Issue #3114588: Add forked domain_menu_access as a sub module

parent d9dddf5a
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
langcode: en
status: true
dependencies:
  config:
    - field.storage.menu_link_content.domain_access
  module:
    - domain_entity
    - menu_link_content
third_party_settings:
  domain_entity:
    domains: {  }
    behavior: auto
id: menu_link_content.menu_link_content.domain_access
field_name: domain_access
entity_type: menu_link_content
bundle: menu_link_content
label: 'Domain Access'
description: 'Select the affiliate domain(s). If nothing was selected: Affiliated to all domains.'
required: false
translatable: true
default_value: {  }
default_value_callback: domain_entity_field_default_domains
settings:
  handler: 'default:domain'
  handler_settings: {  }
field_type: entity_reference
+19 −0
Original line number Diff line number Diff line
langcode: en
status: true
dependencies:
  module:
    - domain
    - menu_link_content
id: menu_link_content.domain_access
field_name: domain_access
entity_type: menu_link_content
type: entity_reference
settings:
  target_type: domain
module: core
locked: false
cardinality: -1
translatable: true
indexes: {  }
persist_with_no_fields: true
custom_storage: false
+10 −0
Original line number Diff line number Diff line
name: Domain Menu Access
description: 'Domain-based access control for Drupal core menu links.'
type: module
package: Domain
version: VERSION
core_version_requirement: ^9 || ^10
dependencies:
  - domain_entity:domain_entity
  - drupal:menu_link_content
configure: domain_menu_access.settings
+23 −0
Original line number Diff line number Diff line
<?php

/**
 * @file
 * Install, update and uninstall functions for the Domain Menu Access module.
 */

use Drupal\domain_entity\DomainEntityMapper;

/**
 * Implements hook_uninstall().
 *
 * Removes access control fields on uninstall.
 */
function domain_menu_access_uninstall() {
  $field_storage_config = \Drupal::entityTypeManager()
    ->getStorage('field_storage_config');

  $id = 'menu_link_content.' . DomainEntityMapper::FIELD_NAME;
  if ($field = $field_storage_config->load($id)) {
    $field->delete();
  }
}
+6 −0
Original line number Diff line number Diff line
domain_menu_access.settings:
  title: Domain Menu Access settings
  route_name: domain_menu_access.settings
  parent: domain.admin
  description: 'Domain Menu Access module settings'
  weight: 50
Loading