SHARE
TWEET

Untitled

a guest Jan 22nd, 2020 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $menu = \Drupal::entityTypeManager()->getStorage('menu_link_content')->loadByProperties(
  4.     ['menu_name' => 'mon_menu']
  5. );
  6.  
  7. $menuLinkManager = \Drupal::service('plugin.manager.menu.link');
  8.  
  9. foreach ($menu as $menu_item) {
  10.     $definitions = $menu_item->getPluginDefinition();
  11.  
  12.     // Update du tableau definitions
  13.      $definitions['options']['attributes']['class'] = 'sitemap';
  14.  
  15.     // sauvegarde
  16.     ?????
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top