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:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Controller\ShortcutController.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Controller;
|
||||
|
||||
use Drupal\Core\Controller\ControllerBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Controller\ShortcutSetController.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Controller;
|
||||
|
||||
use Drupal\Core\Controller\ControllerBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Entity\Shortcut.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Entity;
|
||||
|
||||
use Drupal\Core\Cache\Cache;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Entity\ShortcutSet.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Entity;
|
||||
|
||||
use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Form\SetCustomize.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Form;
|
||||
|
||||
use Drupal\Core\Entity\EntityForm;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Form\ShortcutDeleteForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Form;
|
||||
|
||||
use Drupal\Core\Entity\ContentEntityDeleteForm;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Form\ShortcutSetDeleteForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Form;
|
||||
|
||||
use Drupal\Core\Entity\EntityDeleteForm;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Form\SwitchShortcutSet.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Form;
|
||||
|
||||
use Drupal\Core\Form\FormBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Plugin\Block\ShortcutsBlock.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Plugin\Block;
|
||||
|
||||
use Drupal\Core\Access\AccessResult;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Plugin\migrate\destination\EntityShortcutSet.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Plugin\migrate\destination;
|
||||
|
||||
use Drupal\migrate\Row;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Plugin\migrate\source\d7\Shortcut.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Plugin\migrate\source\d7;
|
||||
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Plugin\migrate\source\d7\ShortcutSet.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Plugin\migrate\source\d7;
|
||||
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Plugin\migrate\source\d7\ShortcutSetUsers.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Plugin\migrate\source\d7;
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\ShortcutForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut;
|
||||
|
||||
use Drupal\Core\Entity\ContentEntityForm;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\ShortcutInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut;
|
||||
|
||||
use Drupal\Core\Entity\ContentEntityInterface;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\ShortcutSetForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut;
|
||||
|
||||
use Drupal\Core\Entity\BundleEntityFormBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\ShortcutSetInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut;
|
||||
|
||||
use Drupal\Core\Config\Entity\ConfigEntityInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\ShortcutSetListBuilder.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut;
|
||||
|
||||
use Drupal\Core\Config\Entity\ConfigEntityListBuilder;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\ShortcutSetStorage.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut;
|
||||
|
||||
use Drupal\Component\Uuid\UuidInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\ShortcutSetStorageInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut;
|
||||
|
||||
use Drupal\Core\Config\Entity\ConfigEntityStorageInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Tests\ShortcutCacheTagsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Tests;
|
||||
|
||||
use Drupal\shortcut\Entity\Shortcut;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Tests\ShortcutLinksTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Tests;
|
||||
|
||||
use Drupal\Component\Utility\SafeMarkup;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Tests\ShortcutSetsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Tests;
|
||||
|
||||
use Drupal\shortcut\Entity\ShortcutSet;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Tests\ShortcutTestBase.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Tests;
|
||||
|
||||
use Drupal\shortcut\Entity\Shortcut;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\shortcut\Tests\ShortcutTranslationUITest.
|
||||
*/
|
||||
|
||||
namespace Drupal\shortcut\Tests;
|
||||
|
||||
use Drupal\content_translation\Tests\ContentTranslationUITestBase;
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
|
@ -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();
|
|
@ -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']);
|
|
@ -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();
|
|
@ -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.');
|
||||
}
|
||||
|
||||
}
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Reference in a new issue