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

@ -64,6 +64,6 @@ function shortcut_uninstall() {
// Theme settings are not configuration entities and cannot depend on modules
// so to unset a module-specific setting, we need to unset it with logic.
if (\Drupal::service('theme_handler')->themeExists('seven')) {
\Drupal::configFactory()->getEditable('seven.settings')->clear('third_party_settings.shortcut.module_link')->save(TRUE);
\Drupal::configFactory()->getEditable('seven.settings')->clear('third_party_settings.shortcut')->save(TRUE);
}
}

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Controller\ShortcutController.
*/
namespace Drupal\shortcut\Controller;
use Drupal\Core\Controller\ControllerBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Controller\ShortcutSetController.
*/
namespace Drupal\shortcut\Controller;
use Drupal\Core\Controller\ControllerBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Entity\Shortcut.
*/
namespace Drupal\shortcut\Entity;
use Drupal\Core\Cache\Cache;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Entity\ShortcutSet.
*/
namespace Drupal\shortcut\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBundleBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Form\SetCustomize.
*/
namespace Drupal\shortcut\Form;
use Drupal\Core\Entity\EntityForm;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Form\ShortcutDeleteForm.
*/
namespace Drupal\shortcut\Form;
use Drupal\Core\Entity\ContentEntityDeleteForm;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Form\ShortcutSetDeleteForm.
*/
namespace Drupal\shortcut\Form;
use Drupal\Core\Entity\EntityDeleteForm;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Form\SwitchShortcutSet.
*/
namespace Drupal\shortcut\Form;
use Drupal\Core\Form\FormBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Plugin\Block\ShortcutsBlock.
*/
namespace Drupal\shortcut\Plugin\Block;
use Drupal\Core\Access\AccessResult;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Plugin\migrate\destination\EntityShortcutSet.
*/
namespace Drupal\shortcut\Plugin\migrate\destination;
use Drupal\migrate\Row;

View file

@ -1,15 +1,10 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Plugin\migrate\destination\ShortcutSetUsers.
*/
namespace Drupal\shortcut\Plugin\migrate\destination;
use Drupal\shortcut\ShortcutSetStorageInterface;
use Drupal\user\Entity\User;
use Drupal\migrate\Entity\MigrationInterface;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate\Row;
use Drupal\migrate\Plugin\migrate\destination\DestinationBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
@ -38,7 +33,7 @@ class ShortcutSetUsers extends DestinationBase implements ContainerFactoryPlugin
* The plugin_id for the plugin instance.
* @param mixed $plugin_definition
* The plugin implementation definition.
* @param MigrationInterface $migration
* @param \Drupal\migrate\Plugin\MigrationInterface $migration
* The migration.
* @param \Drupal\shortcut\ShortcutSetStorageInterface $shortcut_set_storage
* The shortcut_set entity storage handler.

View file

@ -1,8 +1,4 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Plugin\migrate\source\d7\Shortcut.
*/
namespace Drupal\shortcut\Plugin\migrate\source\d7;

View file

@ -1,8 +1,4 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Plugin\migrate\source\d7\ShortcutSet.
*/
namespace Drupal\shortcut\Plugin\migrate\source\d7;

View file

@ -1,8 +1,4 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Plugin\migrate\source\d7\ShortcutSetUsers.
*/
namespace Drupal\shortcut\Plugin\migrate\source\d7;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\ShortcutAccessControlHandler.
*/
namespace Drupal\shortcut;
use Drupal\Core\Access\AccessResult;
@ -61,7 +56,7 @@ class ShortcutAccessControlHandler extends EntityAccessControlHandler implements
}
// @todo Fix this bizarre code: how can a shortcut exist without a shortcut
// set? The above if-test is unnecessary. See https://www.drupal.org/node/2339903.
return AccessResult::neutral()->cacheUntilEntityChanges($entity);
return AccessResult::neutral()->addCacheableDependency($entity);
}
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\ShortcutForm.
*/
namespace Drupal\shortcut;
use Drupal\Core\Entity\ContentEntityForm;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\ShortcutInterface.
*/
namespace Drupal\shortcut;
use Drupal\Core\Entity\ContentEntityInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\ShortcutSetAccessControlHandler.
*/
namespace Drupal\shortcut;
use Drupal\Core\Access\AccessResult;
@ -31,7 +26,7 @@ class ShortcutSetAccessControlHandler extends EntityAccessControlHandler {
if (!$account->hasPermission('access shortcuts')) {
return AccessResult::neutral()->cachePerPermissions();
}
return AccessResult::allowedIf($account->hasPermission('customize shortcut links') && $entity == shortcut_current_displayed_set($account))->cachePerPermissions()->cacheUntilEntityChanges($entity);
return AccessResult::allowedIf($account->hasPermission('customize shortcut links') && $entity == shortcut_current_displayed_set($account))->cachePerPermissions()->addCacheableDependency($entity);
case 'delete':
return AccessResult::allowedIf($account->hasPermission('administer shortcuts') && $entity->id() != 'default')->cachePerPermissions();

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\ShortcutSetForm.
*/
namespace Drupal\shortcut;
use Drupal\Core\Entity\BundleEntityFormBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\ShortcutSetInterface.
*/
namespace Drupal\shortcut;
use Drupal\Core\Config\Entity\ConfigEntityInterface;

View file

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

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\ShortcutSetStorage.
*/
namespace Drupal\shortcut;
use Drupal\Component\Uuid\UuidInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\ShortcutSetStorageInterface.
*/
namespace Drupal\shortcut;
use Drupal\Core\Config\Entity\ConfigEntityStorageInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Tests\ShortcutCacheTagsTest.
*/
namespace Drupal\shortcut\Tests;
use Drupal\shortcut\Entity\Shortcut;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Tests\ShortcutLinksTest.
*/
namespace Drupal\shortcut\Tests;
use Drupal\Component\Utility\SafeMarkup;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Tests\ShortcutSetsTest.
*/
namespace Drupal\shortcut\Tests;
use Drupal\shortcut\Entity\ShortcutSet;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Tests\ShortcutTestBase.
*/
namespace Drupal\shortcut\Tests;
use Drupal\shortcut\Entity\Shortcut;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Tests\ShortcutTranslationUITest.
*/
namespace Drupal\shortcut\Tests;
use Drupal\content_translation\Tests\ContentTranslationUITestBase;

View file

@ -1,13 +1,8 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Tests\Migrate\MigrateShortcutStubTest.
*/
namespace Drupal\Tests\shortcut\Kernel\Migrate;
namespace Drupal\shortcut\Tests\Migrate;
use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;
use Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase;
use Drupal\migrate_drupal\Tests\StubTestTrait;
/**

View file

@ -1,15 +1,10 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Tests\Migrate\d7\MigrateShortcutSetTest.
*/
namespace Drupal\shortcut\Tests\Migrate\d7;
namespace Drupal\Tests\shortcut\Kernel\Migrate\d7;
use Drupal\shortcut\Entity\ShortcutSet;
use Drupal\shortcut\ShortcutSetInterface;
use Drupal\migrate_drupal\Tests\d7\MigrateDrupal7TestBase;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
/**
* Test shortcut_set migration to ShortcutSet entities.
@ -35,7 +30,6 @@ class MigrateShortcutSetTest extends MigrateDrupal7TestBase {
*/
protected function setUp() {
parent::setUp();
$this->installSchema('system', array('router'));
$this->installEntitySchema('shortcut');
$this->installEntitySchema('menu_link_content');
\Drupal::service('router.builder')->rebuild();

View file

@ -1,14 +1,9 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Tests\Migrate\d7\MigrateShortcutSetUsersTest.
*/
namespace Drupal\shortcut\Tests\Migrate\d7;
namespace Drupal\Tests\shortcut\Kernel\Migrate\d7;
use Drupal\user\Entity\User;
use Drupal\migrate_drupal\Tests\d7\MigrateDrupal7TestBase;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
/**
* Test shortcut_set_users migration.
@ -34,7 +29,6 @@ class MigrateShortcutSetUsersTest extends MigrateDrupal7TestBase {
*/
protected function setUp() {
parent::setUp();
$this->installSchema('system', array('router'));
$this->installEntitySchema('shortcut');
$this->installEntitySchema('menu_link_content');
$this->installSchema('shortcut', ['shortcut_set_users']);

View file

@ -1,15 +1,10 @@
<?php
/**
* @file
* Contains \Drupal\shortcut\Tests\Migrate\d7\MigrateShortcutTest.
*/
namespace Drupal\shortcut\Tests\Migrate\d7;
namespace Drupal\Tests\shortcut\Kernel\Migrate\d7;
use Drupal\shortcut\Entity\Shortcut;
use Drupal\shortcut\ShortcutInterface;
use Drupal\migrate_drupal\Tests\d7\MigrateDrupal7TestBase;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
/**
* Test shortcut menu links migration to Shortcut entities.
@ -35,7 +30,6 @@ class MigrateShortcutTest extends MigrateDrupal7TestBase {
*/
protected function setUp() {
parent::setUp();
$this->installSchema('system', array('router'));
$this->installEntitySchema('shortcut');
$this->installEntitySchema('menu_link_content');
\Drupal::service('router.builder')->rebuild();

View file

@ -0,0 +1,31 @@
<?php
namespace Drupal\Tests\shortcut\Kernel;
use Drupal\KernelTests\KernelTestBase;
/**
* Tests shortcut_install() and shortcut_uninstall().
*
* @group shortcut
*/
class ShortcutSevenIntegrationTest extends KernelTestBase {
public static $modules = ['system'];
/**
* Tests shortcut_install() and shortcut_uninstall().
*/
public function testInstallUninstall() {
// Install seven.
\Drupal::service('theme_installer')->install(['seven']);
$this->assertNull($this->config('seven.settings')->get('third_party_settings.shortcut'), 'There are no shortcut settings in seven.settings.');
\Drupal::service('module_installer')->install(['shortcut']);
$this->assertTrue($this->config('seven.settings')->get('third_party_settings.shortcut.module_link'), 'The shortcut module_link setting is in seven.settings.');
\Drupal::service('module_installer')->uninstall(['shortcut']);
$this->assertNull($this->config('seven.settings')->get('third_party_settings.shortcut'), 'There are no shortcut settings in seven.settings.');
}
}

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Tests\shortcut\Unit\Menu\ShortcutLocalTasksTest.
*/
namespace Drupal\Tests\shortcut\Unit\Menu;
use Drupal\Tests\Core\Menu\LocalTaskIntegrationTestBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Tests\shortcut\Unit\Plugin\migrate\source\d7\ShortcutSetTest.
*/
namespace Drupal\Tests\shortcut\Unit\Plugin\migrate\source\d7;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Tests\shortcut\Unit\Plugin\migrate\source\d7\ShortcutSetUsersTest.
*/
namespace Drupal\Tests\shortcut\Unit\Plugin\migrate\source\d7;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Tests\shortcut\Unit\Plugin\migrate\source\d7\ShortcutTest.
*/
namespace Drupal\Tests\shortcut\Unit\Plugin\migrate\source\d7;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;