Can someone give me an example of how to write a hook_menu_local_actions_alter() implementation?
I want to modify part of the $local_actions array to add a new path for the node.add_page route but I am not sure how to achieve it.

Comments

dianacastillo created an issue. See original summary.

valthebald’s picture

Project: Drupal core » Examples for Developers
Version: 8.0.5 » 8.x-1.x-dev
Component: views.module » Action Example
valthebald’s picture

Component: Action Example » Menu Example
valthebald’s picture

Version: 8.x-1.x-dev » 3.x-dev
Parent issue: » #3150762: [META] New examples for 11.4+

Moving to new examples meta

avpaderno’s picture

Title: example of hook_menu_local_actions_alter » example of hook_menu_local_actions_alter()
Component: Menu Example » Code
avpaderno’s picture

Title: example of hook_menu_local_actions_alter() » Example of hook_menu_local_actions_alter()
Component: Code » New modules
Category: Support request » Task
Issue summary: View changes
Status: Active » Closed (won't fix)
Parent issue: #3150762: [META] New examples for 11.4+ »

We do not have example implementations for every hook used by Drupal core.
It would be worth adding a module to show how to implement an alter hook, if that module would contain other hook implementations.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.