Skip to content
Snippets Groups Projects

Warn if an entity delete will cause menu item re-parenting

Open dpi requested to merge issue/drupal-3387665:3387665-dpi-rework into 11.x

Closes #3387665

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 116 /** @var \Drupal\menu_link_content\Entity\MenuLinkContent|null $menuLink */
    117 $menuLink = $id !== FALSE ? $menuLinkContentStorage->load($id) : NULL;
    118 if ($menuLink === NULL) {
    119 return [];
    120 }
    121
    122 $menuLink = $this->entityRepository->getTranslationFromContext($menuLink);
    123 $parameters = (new MenuTreeParameters())
    124 ->setRoot($menuLink->getPluginId())
    125 ->excludeRoot()
    126 ->setMinDepth(1)
    127 ->setMaxDepth(1);
    128 return $this->menuLinkTree->transform(
    129 tree: $this->menuLinkTree->load($menuLink->getMenuName(), $parameters),
    130 manipulators: [
    131 ['callable' => 'menu.default_tree_manipulators:checkAccess'],
  • Code review, no manual testing (Yet)

  • dpi added 1 commit

    added 1 commit

    • b8f0a351 - properly inject stringtranslation so this->t() uses it

    Compare with previous version

  • dpi added 1 commit

    added 1 commit

    • 59644bdb - add message for menu content form delete also

    Compare with previous version

  • Samit Khulve added 1280 commits

    added 1280 commits

    • 59644bdb...1bcc8960 - 1279 commits from branch project:11.x
    • f3624baa - 3387665: Fix conflicts and chnages in test file with D11 compatibility

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • shalini jha added 288 commits

    added 288 commits

    • 3232de03...2546cebc - 286 commits from branch project:11.x
    • db179cdd - 3387665: Fix conflicts and chnages in test file with D11 compatibility
    • b19c1bf5 - Removing un-needed changes

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading