Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes

This commit is contained in:
Pantheon Automation 2016-04-20 09:56:34 -07:00 committed by Greg Anderson
parent b11a755ba8
commit c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions

View file

@ -3,7 +3,7 @@
* Menu UI admin behaviors.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
@ -65,4 +65,4 @@
});
};
})(jQuery);
})(jQuery, Drupal);

View file

@ -1,25 +0,0 @@
<?php
/**
* @file
* Install, update and uninstall functions for the menu_ui module.
*/
/**
* Implements hook_install().
*/
function menu_ui_install() {
// Rebuild all the menu data.
// @todo - remove this when we understand why removing it breaks the
// standard install profile, possibly need to be handled in
// \Drupal\Core\Extension\ModuleHandler::install().
// @see https://www.drupal.org/node/2181151
\Drupal::service('router.builder')->rebuild();
}
/**
* Implements hook_uninstall().
*/
function menu_ui_uninstall() {
\Drupal::service('router.builder')->setRebuildNeeded();
}

View file

@ -3,7 +3,7 @@
* Menu UI behaviors.
*/
(function ($) {
(function ($, Drupal) {
'use strict';
@ -88,4 +88,4 @@
}
};
})(jQuery);
})(jQuery, Drupal);

View file

@ -15,7 +15,6 @@ use Drupal\Core\Block\BlockPluginInterface;
use Drupal\Core\Link;
use Drupal\Core\Menu\MenuLinkInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\Element;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\menu_link_content\Entity\MenuLinkContent;
use Drupal\node\NodeTypeInterface;
@ -150,7 +149,7 @@ function _menu_ui_node_save(NodeInterface $node, array $values) {
}
else {
// Create a new menu_link_content entity.
$entity = entity_create('menu_link_content', array(
$entity = MenuLinkContent::create(array(
'link' => ['uri' => 'entity:node/' . $node->id()],
'langcode' => $node->language()->getId(),
));

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\menu_ui\Controller\MenuController.
*/
namespace Drupal\menu_ui\Controller;
use Drupal\Component\Utility\Xss;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\menu_ui\Form\MenuDeleteForm.
*/
namespace Drupal\menu_ui\Form;
use Drupal\Core\Database\Connection;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\menu_ui\Form\MenuLinkEditForm.
*/
namespace Drupal\menu_ui\Form;
use Drupal\Core\DependencyInjection\ClassResolverInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\menu_ui\Form\MenuLinkResetForm.
*/
namespace Drupal\menu_ui\Form;
use Drupal\Core\Access\AccessResult;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\menu_ui\MenuForm.
*/
namespace Drupal\menu_ui;
use Drupal\Component\Utility\NestedArray;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\menu_ui\MenuListBuilder.
*/
namespace Drupal\menu_ui;
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\menu_ui\Plugin\Menu\LocalAction\MenuLinkAdd.
*/
namespace Drupal\menu_ui\Plugin\Menu\LocalAction;
use Drupal\Core\Menu\LocalActionDefault;

View file

@ -1,14 +1,11 @@
<?php
/**
* @file
* Contains \Drupal\menu_ui\Tests\MenuCacheTagsTest.
*/
namespace Drupal\menu_ui\Tests;
use Drupal\Core\Url;
use Drupal\menu_link_content\Entity\MenuLinkContent;
use Drupal\system\Tests\Cache\PageCacheTagsTestBase;
use Drupal\system\Entity\Menu;
/**
* Tests the Menu and Menu Link entities' cache tags.
@ -32,7 +29,7 @@ class MenuCacheTagsTest extends PageCacheTagsTestBase {
$url = Url::fromRoute('test_page_test.test_page');
// Create a Llama menu, add a link to it and place the corresponding block.
$menu = entity_create('menu', array(
$menu = Menu::create(array(
'id' => 'llama',
'label' => 'Llama',
'description' => 'Description text',
@ -79,7 +76,7 @@ class MenuCacheTagsTest extends PageCacheTagsTestBase {
// Verify that after adding a menu link, there is a cache miss.
$this->pass('Test addition of menu link.', 'Debug');
$menu_link_2 = entity_create('menu_link_content', array(
$menu_link_2 = MenuLinkContent::create(array(
'id' => '',
'parent' => '',
'title' => 'Alpaca',

View file

@ -1,12 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\menu_ui\Tests\MenuLanguageTest.
*
* Tests for menu_ui language settings.
*/
namespace Drupal\menu_ui\Tests;
use Drupal\Component\Utility\Unicode;
@ -14,6 +7,8 @@ use Drupal\language\Entity\ConfigurableLanguage;
use Drupal\language\Entity\ContentLanguageSettings;
/**
* Tests for menu_ui language settings.
*
* Create menu and menu links in non-English language, and edit language
* settings.
*

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\menu_ui\Tests\MenuLinkReorderTest.
*/
namespace Drupal\menu_ui\Tests;
use Drupal\simpletest\WebTestBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\menu_ui\Tests\MenuNodeTest.
*/
namespace Drupal\menu_ui\Tests;
use Drupal\simpletest\WebTestBase;
@ -204,7 +199,7 @@ class MenuNodeTest extends WebTestBase {
$this->assertNoLink($node_title);
// Add a menu link to the Administration menu.
$item = entity_create('menu_link_content', array(
$item = MenuLinkContent::create(array(
'link' => [['uri' => 'entity:node/' . $node->id()]],
'title' => $this->randomMachineName(16),
'menu_name' => 'admin',
@ -226,7 +221,7 @@ class MenuNodeTest extends WebTestBase {
// Create a second node.
$child_node = $this->drupalCreateNode(array('type' => 'article'));
// Assign a menu link to the second node, being a child of the first one.
$child_item = entity_create('menu_link_content', array(
$child_item = MenuLinkContent::create(array(
'link' => [['uri' => 'entity:node/' . $child_node->id()]],
'title' => $this->randomMachineName(16),
'parent' => $item->getPluginId(),

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\menu_ui\Tests\MenuTest.
*/
namespace Drupal\menu_ui\Tests;
use Drupal\block\Entity\Block;
@ -157,7 +152,7 @@ class MenuTest extends MenuWebTestBase {
$menu_name = substr(hash('sha256', $this->randomMachineName(16)), 0, MENU_MAX_MENU_NAME_LENGTH_UI);
$label = $this->randomMachineName(16);
$menu = entity_create('menu', array(
$menu = Menu::create(array(
'id' => $menu_name,
'label' => $label,
'description' => 'Description text',
@ -298,7 +293,7 @@ class MenuTest extends MenuWebTestBase {
// Verify add link button.
$this->drupalGet('admin/structure/menu');
$this->assertLinkByHref('admin/structure/menu/manage/' . $menu_name . '/add', 0, "The add menu link button url is correct");
$this->assertLinkByHref('admin/structure/menu/manage/' . $menu_name . '/add', 0, "The add menu link button URL is correct");
// Verify form defaults.
$this->doMenuLinkFormDefaultsTest();
@ -601,7 +596,7 @@ class MenuTest extends MenuWebTestBase {
* test whether it works when we do the authenticatedUser tests. Defaults
* to FALSE.
* @param string $weight
* Menu weight. Defaults to 0.
* Menu weight. Defaults to 0.
*
* @return \Drupal\menu_link_content\Entity\MenuLinkContent
* A menu link entity.

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\menu_ui\Tests\MenuUninstallTest.
*/
namespace Drupal\menu_ui\Tests;
use Drupal\simpletest\WebTestBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\menu_ui\Tests\MenuWebTestBase.
*/
namespace Drupal\menu_ui\Tests;
use Drupal\simpletest\WebTestBase;

View file

@ -1,13 +1,8 @@
<?php
/**
* @file
* Contains \Drupal\menu_ui\Tests\Migrate\MigrateMenuSettingsTest.
*/
namespace Drupal\Tests\menu_ui\Kernel\Migrate;
namespace Drupal\menu_ui\Tests\Migrate;
use Drupal\migrate_drupal\Tests\d7\MigrateDrupal7TestBase;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
/**
* Tests migration of menu_ui settings.