Skip to content
Snippets Groups Projects
Commit 8bc92884 authored by Mrinalini Kumari's avatar Mrinalini Kumari Committed by Adrian Cid Almaguer
Browse files

Issue #3295269 by mrinalini9, Ishani Patel, atul ghate, adriancid, Shubham...

Issue #3295269 by mrinalini9, Ishani Patel, atul ghate, adriancid, Shubham Sharma 77: Drupal Coding Standards
parent 6dd65168
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@
source: function (request, response) {
var data = $self.handleAutocomplete(request.term);
if (!$self.extraFetched && drupalSettings.adminToolbarSearch.loadExtraLinks) {
$.getJSON( Drupal.url('admin/admin-toolbar-search'), function( data ) {
$.getJSON( Drupal.url('admin/admin-toolbar-search'), function ( data ) {
$(data).each(function () {
var item = this;
item.label = this.labelRaw + ' ' + this.value;
......
......@@ -4,4 +4,4 @@ services:
arguments:
- '@entity_type.manager'
- '@plugin.manager.menu.local_task'
- '@current_route_match'
\ No newline at end of file
- '@current_route_match'
......@@ -44,4 +44,4 @@
.toolbar-bar .toolbar-icon-local-tasks:before {
background-image: url(../misc/icons/bebebe/tasks.svg);
}
\ No newline at end of file
}
......@@ -53,11 +53,11 @@ class AdminToolbarToolsHelper implements TrustedCallbackInterface {
}
/**
* {@inheritdoc}
*/
public static function trustedCallbacks() {
return ['localTasksTrayLazyBuilder'];
}
* {@inheritdoc}
*/
public static function trustedCallbacks() {
return ['localTasksTrayLazyBuilder'];
}
/**
* Lazy builder callback for the admin_toolbar_local_tasks tray items.
......
......@@ -370,7 +370,14 @@ class ExtraLinks extends DeriverBase implements ContainerDeriverInterface {
'route_parameters' => ['menu' => $menu_id],
] + $base_plugin_definition;
// Un-deletable menus.
$un_deletable_menus = ['admin', 'devel', 'footer', 'main', 'tools', 'account'];
$un_deletable_menus = [
'admin',
'devel',
'footer',
'main',
'tools',
'account',
];
if (!in_array($menu_id, $un_deletable_menus)) {
$links['entity.menu.delete_form.' . $menu_id] = [
'title' => $this->t('Delete'),
......
......@@ -2,8 +2,6 @@
namespace Drupal\Tests\admin_toolbar\Functional;
use Drupal\Core\Url;
use Drupal\menu_link_content\Entity\MenuLinkContent;
use Drupal\Tests\toolbar\Functional\ToolbarAdminMenuTest;
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment