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

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Annotation\SearchPlugin.
*/
namespace Drupal\search\Annotation;
use Drupal\Component\Annotation\Plugin;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Controller\SearchController.
*/
namespace Drupal\search\Controller;
use Drupal\Core\Cache\CacheableDependencyInterface;
@ -12,7 +7,6 @@ use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Render\RendererInterface;
use Drupal\search\SearchPageInterface;
use Drupal\search\SearchPageRepositoryInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Request;
@ -47,14 +41,12 @@ class SearchController extends ControllerBase {
*
* @param \Drupal\search\SearchPageRepositoryInterface $search_page_repository
* The search page repository.
* @param \Psr\Log\LoggerInterface $logger
* A logger instance.
* @param \Drupal\Core\Render\RendererInterface $renderer
* The renderer.
*/
public function __construct(SearchPageRepositoryInterface $search_page_repository, LoggerInterface $logger, RendererInterface $renderer) {
public function __construct(SearchPageRepositoryInterface $search_page_repository, RendererInterface $renderer) {
$this->searchPageRepository = $search_page_repository;
$this->logger = $logger;
$this->logger = $this->getLogger('search');
$this->renderer = $renderer;
}
@ -64,7 +56,6 @@ class SearchController extends ControllerBase {
public static function create(ContainerInterface $container) {
return new static(
$container->get('search.search_page_repository'),
$container->get('logger.factory')->get('search'),
$container->get('renderer')
);
}

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Entity\SearchPage.
*/
namespace Drupal\search\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Form\ReindexConfirm.
*/
namespace Drupal\search\Form;
use Drupal\Core\Form\ConfirmFormBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Form\SearchBlockForm.
*/
namespace Drupal\search\Form;
use Drupal\Core\Config\ConfigFactoryInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Form\SearchPageAddForm.
*/
namespace Drupal\search\Form;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Form\SearchPageEditForm.
*/
namespace Drupal\search\Form;
use Drupal\Core\Form\FormStateInterface;

View file

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

View file

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

View file

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

View file

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

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Plugin\ConfigurableSearchPluginInterface.
*/
namespace Drupal\search\Plugin;
use Drupal\Component\Plugin\ConfigurablePluginInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Plugin\Derivative\SearchLocalTask.
*/
namespace Drupal\search\Plugin\Derivative;
use Drupal\Component\Plugin\Derivative\DeriverBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Plugin\SearchIndexingInterface.
*/
namespace Drupal\search\Plugin;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Plugin\SearchInterface.
*/
namespace Drupal\search\Plugin;
use Drupal\Component\Plugin\PluginInspectionInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Plugin\SearchPluginBase.
*/
namespace Drupal\search\Plugin;
use Drupal\Core\Cache\RefinableCacheableDependencyInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Plugin\SearchPluginCollection.
*/
namespace Drupal\search\Plugin;
use Drupal\Core\Plugin\DefaultSingleLazyPluginCollection;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Plugin\migrate\destination\EntitySearchPage.
*/
namespace Drupal\search\Plugin\migrate\destination;
use Drupal\Core\Entity\EntityInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Plugin\migrate\process\SearchConfigurationRankings.
*/
namespace Drupal\search\Plugin\migrate\process;
use Drupal\migrate\ProcessPluginBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Plugin\migrate\process\d6\SearchConfigurationRankings.
*/
namespace Drupal\search\Plugin\migrate\process\d6;
use Drupal\migrate\ProcessPluginBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Plugin\views\argument\Search.
*/
namespace Drupal\search\Plugin\views\argument;
use Drupal\views\Plugin\views\argument\ArgumentPluginBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Plugin\views\field\Score.
*/
namespace Drupal\search\Plugin\views\field;
use Drupal\views\Plugin\views\field\NumericField;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Plugin\views\filter\Search.
*/
namespace Drupal\search\Plugin\views\filter;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Plugin\views\row\SearchRow.
*/
namespace Drupal\search\Plugin\views\row;
use Drupal\Core\Form\FormStateInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Plugin\views\sort\Score.
*/
namespace Drupal\search\Plugin\views\sort;
use Drupal\views\Plugin\views\sort\SortPluginBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Routing\SearchPageRoutes.
*/
namespace Drupal\search\Routing;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\SearchPageAccessControlHandler.
*/
namespace Drupal\search;
use Drupal\Core\Access\AccessResult;
@ -27,21 +22,21 @@ class SearchPageAccessControlHandler extends EntityAccessControlHandler {
/** @var $entity \Drupal\search\SearchPageInterface */
if (in_array($operation, array('delete', 'disable'))) {
if ($entity->isDefaultSearch()) {
return AccessResult::forbidden()->cacheUntilEntityChanges($entity);
return AccessResult::forbidden()->addCacheableDependency($entity);
}
else {
return parent::checkAccess($entity, $operation, $account)->cacheUntilEntityChanges($entity);
return parent::checkAccess($entity, $operation, $account)->addCacheableDependency($entity);
}
}
if ($operation == 'view') {
if (!$entity->status()) {
return AccessResult::forbidden()->cacheUntilEntityChanges($entity);
return AccessResult::forbidden()->addCacheableDependency($entity);
}
$plugin = $entity->getPlugin();
if ($plugin instanceof AccessibleInterface) {
return $plugin->access($operation, $account, TRUE)->cacheUntilEntityChanges($entity);
return $plugin->access($operation, $account, TRUE)->addCacheableDependency($entity);
}
return AccessResult::allowed()->cacheUntilEntityChanges($entity);
return AccessResult::allowed()->addCacheableDependency($entity);
}
return parent::checkAccess($entity, $operation, $account);
}

View file

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

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\SearchPageListBuilder.
*/
namespace Drupal\search;
use Drupal\Core\Config\ConfigFactoryInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\SearchPageRepository.
*/
namespace Drupal\search;
use Drupal\Core\Config\ConfigFactoryInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\SearchPageRepositoryInterface.
*/
namespace Drupal\search;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\SearchPluginManager.
*/
namespace Drupal\search;
use Drupal\Core\Extension\ModuleHandlerInterface;

View file

@ -1,12 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\SearchQuery.
*
* Search query extender and helper functions.
*/
namespace Drupal\search;
use Drupal\Component\Utility\Unicode;
@ -14,6 +7,8 @@ use Drupal\Core\Database\Query\SelectExtender;
use Drupal\Core\Database\Query\SelectInterface;
/**
* Search query extender and helper functions.
*
* Performs a query on the full-text search index for a word or words.
*
* This query is used by search plugins that use the search index (not all

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchAdvancedSearchFormTest.
*/
namespace Drupal\search\Tests;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchBlockTest.
*/
namespace Drupal\search\Tests;
/**
@ -78,7 +73,7 @@ class SearchBlockTest extends SearchTestBase {
$this->assertEqual(
$this->getUrl(),
\Drupal::url('search.view_' . $entity_id, array(), array('query' => array('keys' => $terms['keys']), 'absolute' => TRUE)),
'Submitted to correct url.'
'Submitted to correct URL.'
);
// Test an empty search via the block form, from the front page.
@ -92,7 +87,7 @@ class SearchBlockTest extends SearchTestBase {
$this->assertEqual(
$this->getUrl(),
\Drupal::url('search.view_' . $entity_id, array(), array('query' => array('keys' => ''), 'absolute' => TRUE)),
'Redirected to correct url.'
'Redirected to correct URL.'
);
// Test that after entering a too-short keyword in the form, you can then

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchCommentCountToggleTest.
*/
namespace Drupal\search\Tests;
use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface;

View file

@ -1,16 +1,12 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchCommentTest.
*/
namespace Drupal\search\Tests;
use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface;
use Drupal\comment\Tests\CommentTestTrait;
use Drupal\field\Entity\FieldConfig;
use Drupal\user\RoleInterface;
use Drupal\filter\Entity\FilterFormat;
/**
* Tests integration searching comments.
@ -59,7 +55,7 @@ class SearchCommentTest extends SearchTestBase {
protected function setUp() {
parent::setUp();
$full_html_format = entity_create('filter_format', array(
$full_html_format = FilterFormat::create(array(
'format' => 'full_html',
'name' => 'Full HTML',
'weight' => 1,
@ -90,7 +86,7 @@ class SearchCommentTest extends SearchTestBase {
function testSearchResultsComment() {
$node_storage = $this->container->get('entity.manager')->getStorage('node');
// Create basic_html format that escapes all HTML.
$basic_html_format = entity_create('filter_format', array(
$basic_html_format = FilterFormat::create(array(
'format' => 'basic_html',
'name' => 'Basic HTML',
'weight' => 1,

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchConfigSettingsFormTest.
*/
namespace Drupal\search\Tests;
use Drupal\Core\Url;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchDateIntervalTest.
*/
namespace Drupal\search\Tests;
use Drupal\language\Entity\ConfigurableLanguage;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchEmbedFormTest.
*/
namespace Drupal\search\Tests;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchExactTest.
*/
namespace Drupal\search\Tests;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchExcerptTest.
*/
namespace Drupal\search\Tests;
use Drupal\simpletest\KernelTestBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchKeywordsConditionsTest.
*/
namespace Drupal\search\Tests;
use Drupal\Component\Utility\Html;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchLanguageTest.
*/
namespace Drupal\search\Tests;
use Drupal\field\Entity\FieldStorageConfig;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchMatchTest.
*/
namespace Drupal\search\Tests;
use Drupal\Core\Language\LanguageInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchMultilingualEntityTest.
*/
namespace Drupal\search\Tests;
use Drupal\field\Entity\FieldStorageConfig;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchNodeDiacriticsTest.
*/
namespace Drupal\search\Tests;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchNodePunctuationTest.
*/
namespace Drupal\search\Tests;
/**

View file

@ -1,8 +1,4 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchNodeUpdateAndDeletionTest.
*/
namespace Drupal\search\Tests;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchNumberMatchingTest.
*/
namespace Drupal\search\Tests;
use Drupal\Core\Language\LanguageInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchNumbersTest.
*/
namespace Drupal\search\Tests;
use Drupal\Core\Language\LanguageInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchPageCacheTagsTest.
*/
namespace Drupal\search\Tests;
use Drupal\Core\Cache\Cache;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchPageOverrideTest.
*/
namespace Drupal\search\Tests;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchPageTextTest.
*/
namespace Drupal\search\Tests;
use Drupal\Component\Utility\Html;

View file

@ -1,8 +1,4 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchPreprocessLangcodeTest.
*/
namespace Drupal\search\Tests;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchQueryAlterTest.
*/
namespace Drupal\search\Tests;
/**

View file

@ -1,15 +1,11 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchRankingTest.
*/
namespace Drupal\search\Tests;
use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface;
use Drupal\comment\Tests\CommentTestTrait;
use Drupal\Core\Url;
use Drupal\filter\Entity\FilterFormat;
/**
* Indexes content and tests ranking factors.
@ -203,7 +199,7 @@ class SearchRankingTest extends SearchTestBase {
* Test rankings of HTML tags.
*/
public function testHTMLRankings() {
$full_html_format = entity_create('filter_format', array(
$full_html_format = FilterFormat::create(array(
'format' => 'full_html',
'name' => 'Full HTML',
));

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchSetLocaleTest.
*/
namespace Drupal\search\Tests;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchSimplifyTest.
*/
namespace Drupal\search\Tests;
use Drupal\Component\Utility\Unicode;

View file

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

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\SearchTokenizerTest.
*/
namespace Drupal\search\Tests;
use Drupal\Component\Utility\Unicode;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search\ViewsSearchQuery.
*/
namespace Drupal\search;
use Drupal\Core\Database\Query\Condition;

View file

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

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\search_extra_type\Plugin\Search\SearchExtraTypeSearch.
*/
namespace Drupal\search_extra_type\Plugin\Search;
use Drupal\Component\Utility\SafeMarkup;

View file

@ -1,12 +1,12 @@
<?php
use Drupal\Core\Database\Query\AlterableInterface;
/**
* @file
* Test module that alters search queries.
*/
use Drupal\Core\Database\Query\AlterableInterface;
/**
* Implements hook_query_TAG_alter(): tag search_$type with $type node_search.
*/

View file

@ -1,14 +1,9 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\Migrate\d6\MigrateSearchPageTest.
*/
namespace Drupal\search\Tests\Migrate\d6;
namespace Drupal\Tests\search\Kernel\Migrate\d6;
use Drupal\Core\Database\Database;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
use Drupal\search\Entity\SearchPage;
/**
@ -57,10 +52,8 @@ class MigrateSearchPageTest extends MigrateDrupal6TestBase {
->condition('name', 'node_rank_comments')
->execute();
/** @var \Drupal\migrate\Entity\MigrationInterface $migration */
$migration = \Drupal::entityManager()
->getStorage('migration')
->loadUnchanged('search_page');
/** @var \Drupal\migrate\Plugin\MigrationInterface $migration */
$migration = $this->getMigration('search_page');
// Indicate we're rerunning a migration that's already run.
$migration->getIdMap()->prepareUpdate();
$this->executeMigration($migration);

View file

@ -1,14 +1,9 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\Migrate\d6\MigrateSearchSettingsTest.
*/
namespace Drupal\search\Tests\Migrate\d6;
namespace Drupal\Tests\search\Kernel\Migrate\d6;
use Drupal\config\Tests\SchemaCheckTestTrait;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
/**
* Upgrade variables to search.settings.yml.

View file

@ -1,14 +1,9 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\Migrate\d7\MigrateSearchPageTest.
*/
namespace Drupal\search\Tests\Migrate\d7;
namespace Drupal\Tests\search\Kernel\Migrate\d7;
use Drupal\Core\Database\Database;
use Drupal\migrate_drupal\Tests\d7\MigrateDrupal7TestBase;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
use Drupal\search\Entity\SearchPage;
/**
@ -59,10 +54,8 @@ class MigrateSearchPageTest extends MigrateDrupal7TestBase {
->condition('name', 'node_rank_comments')
->execute();
/** @var \Drupal\migrate\Entity\MigrationInterface $migration */
$migration = \Drupal::entityManager()
->getStorage('migration')
->loadUnchanged('search_page');
/** @var \Drupal\migrate\Plugin\MigrationInterface $migration */
$migration = $this->getMigration('search_page');
// Indicate we're rerunning a migration that's already run.
$migration->getIdMap()->prepareUpdate();
$this->executeMigration($migration);

View file

@ -1,13 +1,8 @@
<?php
/**
* @file
* Contains \Drupal\search\Tests\Migrate\d7\MigrateSearchSettingsTest.
*/
namespace Drupal\Tests\search\Kernel\Migrate\d7;
namespace Drupal\search\Tests\Migrate\d7;
use Drupal\migrate_drupal\Tests\d7\MigrateDrupal7TestBase;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
/**
* Tests migration of Search variables to configuration.

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Tests\search\Unit\SearchPluginCollectionTest.
*/
namespace Drupal\Tests\search\Unit;
use Drupal\search\Plugin\SearchPluginCollection;