Commit 1a7a4120 by Manzar Hussain

remove error

parent 88f5d42e
...@@ -31,35 +31,7 @@ function envigo_form_search_block_form_alter(&$form, &$form_state) { ...@@ -31,35 +31,7 @@ function envigo_form_search_block_form_alter(&$form, &$form_state) {
$form['actions']['submit']['#attributes']['class'][] = 'search-button'; $form['actions']['submit']['#attributes']['class'][] = 'search-button';
} }
function envigo_preprocess_menu(&$variables, $hook) {
if ($hook == 'menu') {
$current_path = \Drupal::request()->getRequestUri();
foreach ($variables['items'] as &$item) {
if ($item['in_active_trail']) {
if ($item['url']->toString() == $current_path) {
$item['is_active'] = TRUE;
} elseif (count($item['below'])) {
_themename_menu_process_submenu($item['below'], $current_path);
}
}
}
}
}
/**
* Set active and active-trail class for sub-menus recursively.
*/
function _envigo_menu_process_submenu(&$submenu, $current_path) {
foreach ($submenu as &$item) {
if ($item['in_active_trail']) {
if ($item['url']->toString() == $current_path) {
$item['is_active'] = TRUE;
} elseif (count($item['below'])) {
_themename_menu_process_submenu($item['below'], $current_path);
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment