Skip to content
Snippets Groups Projects
Commit 1d7ee4db authored by sarwan verma's avatar sarwan verma Committed by Doug Green
Browse files

Issue #3472463: Place block menu_ui_get_menus() deprecated

parent 96a91790
No related branches found
No related tags found
2 merge requests!8Created a new merge request to get the list of all the PHP_CodeSniffer errors/warnings to fix,!4Resolve #3472463 "Place block menuuigetmenus"
(function ($, Drupal) {
Drupal.behaviors.smartmenusBehaviour = {
attach: function (context, settings) {
$('.sm', context).once('smartmenus-behavior').each(function () {
$(once('smartmenus-behavior', '.sm', context)).each(function () {
$(this).smartmenus(
{
mainMenuSubOffsetX: -1,
......@@ -13,7 +13,7 @@
});
// https://www.smartmenus.org/docs/#menu-toggle-button
$('.sm-menu-state', context).once('smartmenus-behavior').each(function() {
$(once('smartmenus-menu-state', '.sm-menu-state', context)).each(function () {
var $mainMenuState = $(this);
// animate mobile menu
$mainMenuState.change(function(e) {
......
......@@ -3,6 +3,7 @@ smartmenus-lib:
version: 1.1.1
header: false
license:
name: MIT
url: https://github.com/vadikom/smartmenus/blob/master/LICENSE-MIT
js:
/libraries/smartmenus/jquery.smartmenus.min.js: {}
......@@ -15,7 +16,7 @@ smartmenus-lib:
/libraries/smartmenus/css/sm-core-css.css: {}
dependencies:
- core/jquery
- core/jquery.once
- core/once
- core/drupal
smartmenus-custom:
js:
......
......@@ -11,6 +11,7 @@ use Drupal\Core\Menu\MenuLinkTreeInterface;
use Drupal\Core\Render\Renderer;
use Drupal\Component\Utility\Html;
use Drupal\smartmenus\SmartmenusUtil;
use Drupal\system\Entity\Menu;
/**
* Provides a 'SmartMenusBlock' block.
......@@ -115,7 +116,7 @@ class SmartMenusBlock extends BlockBase implements ContainerFactoryPluginInterfa
$form['smartmenus']['smartmenus_menu'] = array(
'#type' => 'select',
'#title' => $this->t('Menu'),
'#options' => menu_ui_get_menus(),
'#options' => Menu::loadMultiple(),
'#description' => t('The desired menu to render as a Smartmenu.'),
'#default_value' => $config['smartmenus_menu'] ? $config['smartmenus_menu'] : '',
'#required' => TRUE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment