You are here

function menu_multilingual_block_alter in Menu Multilingual 8

Implements hook_block_alter().

File

./menu_multilingual.module, line 54
Enhances the multilingual capabilities for the blocks with menus.

Code

function menu_multilingual_block_alter(&$definitions) {
  foreach ($definitions as $key => $definition) {
    if (substr($key, 0, 18) == 'system_menu_block:') {
      $definitions[$key]['class'] = 'Drupal\\menu_multilingual\\Plugin\\Block\\SystemMenuBlockMultilingual';
    }
    if (substr($key, 0, 11) == 'menu_block:') {
      $definitions[$key]['class'] = 'Drupal\\menu_multilingual\\Plugin\\Block\\MenuBlockMultilingual';
    }
  }
}