Support from Acquia helps fund testing for Drupal Acquia logo

Comments

basil_snowman created an issue. See original summary.

basil_snowman’s picture

Status: Active » Needs review
FileSize
6.09 KB
andypost’s picture

Status: Needs review » Needs work
  1. +++ b/domain_menu_access.info.yml
    @@ -2,8 +2,16 @@ name: Domain Menu Access
    -version: VERSION
    -core: 8.x
    +# version: VERSION
    +# core: 8.x
    

    this change is wrong

    only version should be removed

  2. +++ b/domain_menu_access.info.yml
    @@ -2,8 +2,16 @@ name: Domain Menu Access
    +# Information added by Drupal.org packaging script on 2017-02-07
    +version: '8.x-1.0-alpha1+0-dev'
    +core: '8.x'
    +project: 'domain_menu_access'
    +datestamp: 1486480985
    

    use git as source so you never get packaging data in patches

  3. +++ b/domain_menu_access.module
    @@ -51,41 +51,3 @@ function domain_menu_access_form_menu_link_content_form_alter(&$form, FormStateI
    -function domain_menu_access_form_domain_access_settings_alter(&$form, FormStateInterface $form_state, $form_id) {
    
    +++ b/src/Form/DomainMenuAccessSettingsForm.php
    @@ -0,0 +1,81 @@
    +class DomainMenuAccessSettingsForm extends ConfigFormBase {
    

    imo bad idea, better to use menu edit form alter

andypost’s picture

  1. +++ b/domain_menu_access.info.yml
    @@ -2,8 +2,16 @@ name: Domain Menu Access
    +  - options
    

    domain_access already depends on options module, remove

  2. +++ b/domain_menu_access.module
    @@ -51,41 +51,3 @@ function domain_menu_access_form_menu_link_content_form_alter(&$form, FormStateI
    -function domain_menu_access_form_domain_access_settings_alter(&$form, FormStateInterface $form_state, $form_id) {
    ...
    -function domain_menu_access_form_submit(array &$form, FormStateInterface $form_state) {
    

    menu_ui module could be disabled so better left as is just change config name

basil_snowman’s picture

FileSize
5.84 KB

fixed a few bugs

basil_snowman’s picture

Status: Needs work » Needs review
andypost’s picture

  1. +++ b/config/schema/domain_menu_access.scheme.yml
    @@ -0,0 +1,4 @@
    +
    

    nit, useless extra line(

  2. +++ b/domain_menu_access.info.yml
    @@ -2,8 +2,9 @@ name: Domain Menu Access
     dependencies:
       - domain
       - domain_access
    +  - menu_link_content
    

    domain_access already depends on domain

basil_snowman’s picture

FileSize
5.41 KB
andypost’s picture

andypost’s picture

tim-diels’s picture

Thanks for the patch to add the config to the menu's. But I was missing the links to get to the admin form. So here is a patch that also includes the menu link and task link.

tim-diels’s picture

FileSize
6.2 KB

Apologires for wrong patch. Included is the correct patch

tim-diels’s picture

FileSize
6.2 KB

Fixed typo in patch.

davps’s picture

The patch #13 is not completely working.
Attached new patch based on #13

  • pifagor committed 36f46ef on 8.x-1.x
    Issue #2860387 by rocket.man: Replace deprecated uses. Issue #2851089 by...
pifagor’s picture

Status: Needs review » Fixed

Done

pifagor’s picture

Status: Fixed » Closed (fixed)