Logo MutantMahesh
  • Dark Theme
    Light Theme Dark Theme System Theme
Logo Inverted Logo
  • Posts
  • Drupal
  • Python
  • Tips and Tricks
Hero Image
How to write custom menu link tree manipulator

In this post, I will show you how to write custom menu link tree manipulator. In Drupal 9/10, we can write a custom menu link tree manipulator. For example, If you want to load the menu link tree sorted. The Drupal core provides the \Drupal\Core\Menu\DefaultMenuLinkTreeManipulators::generateIndexAndSort. This manipulator loads the sorted menu link tree as nested array but the keys of array also have the index. In this blog I am going to write a custom manipulator that will return the menu link tree sorted by menu link weight and maintain the array key as menu link plugin id.

December 20, 2023 Read
Hero Image
How to write custom views filter plugin to filter based on user zipcode

In this post, I will show you how to write custom views filter plugin to filter based on user zipcode. Just code no BS

May 24, 2023 Read
Hero Image
How to write custom access check for any entity

In this post, I will show you how to write custom access check for any entity, which can check more than user permission and role. In Drupal 8/9, we can write custom access check for any entity, which can check more than user permission and role. For example, we can check if the user is the author of the node or not. If the user is the author of the node, then we can allow the user to edit the node.

April 13, 2023 Read
Navigation
  • About
  • Skills
  • Experiences
  • Education
  • Recent Posts
Contact me:
  • msankhala
  • Mahesh Sankhala

© 2023 Copyright.