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
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\CachedDiscoveryClearer.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin;
|
||||
|
||||
use Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\CachedDiscoveryClearerInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin;
|
||||
|
||||
use Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\CategorizingPluginManagerTrait.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin;
|
||||
|
||||
use Drupal\Core\StringTranslation\StringTranslationTrait;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\ContainerFactoryPluginInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin;
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Context\Context.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Context;
|
||||
|
||||
use Drupal\Component\Plugin\Context\Context as ComponentContext;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Context\ContextAwarePluginManagerInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Context;
|
||||
|
||||
use Drupal\Component\Plugin\PluginManagerInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Context\ContextAwarePluginManagerTrait.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Context;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Context\ContextDefinition.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Context;
|
||||
|
||||
use Drupal\Core\TypedData\TypedDataTrait;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Context\ContextDefinitionInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Context;
|
||||
|
||||
use Drupal\Component\Plugin\Context\ContextDefinitionInterface as ComponentContextDefinitionInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Context\ContextHandler.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Context;
|
||||
|
||||
use Drupal\Component\Plugin\Exception\ContextException;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Context\ContextHandlerInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Context;
|
||||
|
||||
use Drupal\Core\Plugin\ContextAwarePluginInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Context\ContextInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Context;
|
||||
|
||||
use Drupal\Component\Plugin\Context\ContextInterface as ComponentContextInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Context\ContextProviderInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Context;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Context\ContextRepositoryInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Context;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Context\LazyContextRepository.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Context;
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\ContextAwarePluginAssignmentTrait.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\ContextAwarePluginBase.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin;
|
||||
|
||||
use Drupal\Component\Plugin\ConfigurablePluginInterface;
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\ContextAwarePluginInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin;
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\DefaultLazyPluginCollection.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin;
|
||||
|
||||
use Drupal\Component\Plugin\Exception\PluginNotFoundException;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\DefaultPluginManager.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin;
|
||||
|
||||
use Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface;
|
||||
|
@ -42,7 +37,7 @@ class DefaultPluginManager extends PluginManagerBase implements PluginManagerInt
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $cacheTags = array();
|
||||
protected $cacheTags = [];
|
||||
|
||||
/**
|
||||
* Name of the alter hook if one should be invoked.
|
||||
|
@ -73,7 +68,7 @@ class DefaultPluginManager extends PluginManagerBase implements PluginManagerInt
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $defaults = array();
|
||||
protected $defaults = [];
|
||||
|
||||
/**
|
||||
* The name of the annotation that contains the plugin definition.
|
||||
|
@ -97,6 +92,14 @@ class DefaultPluginManager extends PluginManagerBase implements PluginManagerInt
|
|||
*/
|
||||
protected $namespaces;
|
||||
|
||||
/**
|
||||
* Additional namespaces the annotation discovery mechanism should scan for
|
||||
* annotation definitions.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $additionalAnnotationNamespaces = [];
|
||||
|
||||
/**
|
||||
* Creates the discovery object.
|
||||
*
|
||||
|
@ -112,13 +115,16 @@ class DefaultPluginManager extends PluginManagerBase implements PluginManagerInt
|
|||
* @param string $plugin_definition_annotation_name
|
||||
* (optional) The name of the annotation that contains the plugin definition.
|
||||
* Defaults to 'Drupal\Component\Annotation\Plugin'.
|
||||
* @param string[] $additional_annotation_namespaces
|
||||
* (optional) Additional namespaces to scan for annotation definitions.
|
||||
*/
|
||||
public function __construct($subdir, \Traversable $namespaces, ModuleHandlerInterface $module_handler, $plugin_interface = NULL, $plugin_definition_annotation_name = 'Drupal\Component\Annotation\Plugin') {
|
||||
public function __construct($subdir, \Traversable $namespaces, ModuleHandlerInterface $module_handler, $plugin_interface = NULL, $plugin_definition_annotation_name = 'Drupal\Component\Annotation\Plugin', array $additional_annotation_namespaces = []) {
|
||||
$this->subdir = $subdir;
|
||||
$this->namespaces = $namespaces;
|
||||
$this->pluginDefinitionAnnotationName = $plugin_definition_annotation_name;
|
||||
$this->pluginInterface = $plugin_interface;
|
||||
$this->moduleHandler = $module_handler;
|
||||
$this->additionalAnnotationNamespaces = $additional_annotation_namespaces;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -242,7 +248,7 @@ class DefaultPluginManager extends PluginManagerBase implements PluginManagerInt
|
|||
*/
|
||||
protected function getDiscovery() {
|
||||
if (!$this->discovery) {
|
||||
$discovery = new AnnotatedClassDiscovery($this->subdir, $this->namespaces, $this->pluginDefinitionAnnotationName);
|
||||
$discovery = new AnnotatedClassDiscovery($this->subdir, $this->namespaces, $this->pluginDefinitionAnnotationName, $this->additionalAnnotationNamespaces);
|
||||
$this->discovery = new ContainerDerivativeDiscoveryDecorator($discovery);
|
||||
}
|
||||
return $this->discovery;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\DefaultSingleLazyPluginCollection.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin;
|
||||
|
||||
use Drupal\Component\Plugin\PluginManagerInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Discovery;
|
||||
|
||||
use Drupal\Component\Annotation\AnnotationInterface;
|
||||
|
@ -52,8 +47,10 @@ class AnnotatedClassDiscovery extends ComponentAnnotatedClassDiscovery {
|
|||
* @param string $plugin_definition_annotation_name
|
||||
* (optional) The name of the annotation that contains the plugin definition.
|
||||
* Defaults to 'Drupal\Component\Annotation\Plugin'.
|
||||
* @param string[] $annotation_namespaces
|
||||
* (optional) Additional namespaces to scan for annotation definitions.
|
||||
*/
|
||||
function __construct($subdir, \Traversable $root_namespaces, $plugin_definition_annotation_name = 'Drupal\Component\Annotation\Plugin') {
|
||||
function __construct($subdir, \Traversable $root_namespaces, $plugin_definition_annotation_name = 'Drupal\Component\Annotation\Plugin', array $annotation_namespaces = []) {
|
||||
if ($subdir) {
|
||||
// Prepend a directory separator to $subdir,
|
||||
// if it does not already have one.
|
||||
|
@ -65,7 +62,7 @@ class AnnotatedClassDiscovery extends ComponentAnnotatedClassDiscovery {
|
|||
}
|
||||
$this->rootNamespacesIterator = $root_namespaces;
|
||||
$plugin_namespaces = array();
|
||||
parent::__construct($plugin_namespaces, $plugin_definition_annotation_name);
|
||||
parent::__construct($plugin_namespaces, $plugin_definition_annotation_name, $annotation_namespaces);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Discovery\ContainerDerivativeDiscoveryDecorator.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Discovery;
|
||||
|
||||
use Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Discovery\ContainerDeriverInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Discovery;
|
||||
|
||||
use Drupal\Component\Plugin\Derivative\DeriverInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Discovery\HookDiscovery.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Discovery;
|
||||
|
||||
use Drupal\Component\Plugin\Discovery\DiscoveryInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Discovery\InfoHookDecorator.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Discovery;
|
||||
|
||||
use Drupal\Component\Plugin\Discovery\DiscoveryInterface;
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Core\Plugin\Discovery;
|
||||
|
||||
use Drupal\Component\Discovery\YamlDirectoryDiscovery as ComponentYamlDirectoryDiscovery;
|
||||
|
||||
/**
|
||||
* Allows multiple YAML files per directory to define plugin definitions.
|
||||
*/
|
||||
class YamlDirectoryDiscovery extends YamlDiscovery {
|
||||
|
||||
/**
|
||||
* Constructs a YamlDirectoryDiscovery object.
|
||||
*
|
||||
* @param array $directories
|
||||
* An array of directories to scan, keyed by the provider. The value can
|
||||
* either be a string or an array of strings. The string values should be
|
||||
* the path of a directory to scan.
|
||||
* @param string $file_cache_key_suffix
|
||||
* The file cache key suffix. This should be unique for each type of
|
||||
* discovery.
|
||||
* @param string $key
|
||||
* (optional) The key contained in the discovered data that identifies it.
|
||||
* Defaults to 'id'.
|
||||
*/
|
||||
public function __construct(array $directories, $file_cache_key_suffix, $key = 'id') {
|
||||
// Intentionally does not call parent constructor as this class uses a
|
||||
// different YAML discovery.
|
||||
$this->discovery = new ComponentYamlDirectoryDiscovery($directories, $file_cache_key_suffix, $key);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Discovery\YamlDiscovery.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Discovery;
|
||||
|
||||
use Drupal\Component\Plugin\Discovery\DiscoveryInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Discovery\YamlDiscoveryDecorator.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Discovery;
|
||||
|
||||
use Drupal\Component\Plugin\Discovery\DiscoveryInterface;
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\Factory\ContainerFactory.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin\Factory;
|
||||
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Core\Plugin;
|
||||
|
||||
/**
|
||||
* Provides an interface for an object using a plugin collection.
|
||||
*
|
||||
* @see \Drupal\Component\Plugin\LazyPluginCollection
|
||||
*
|
||||
* @ingroup plugin_api
|
||||
*
|
||||
* Entities that need this interface should implement
|
||||
* \Drupal\Core\Entity\EntityWithPluginCollectionInterface, which extends this.
|
||||
*/
|
||||
interface ObjectWithPluginCollectionInterface {
|
||||
|
||||
/**
|
||||
* Gets the plugin collections used by this entity.
|
||||
*
|
||||
* @return \Drupal\Component\Plugin\LazyPluginCollection[]
|
||||
* An array of plugin collections, keyed by the property name they use to
|
||||
* store their configuration.
|
||||
*/
|
||||
public function getPluginCollections();
|
||||
|
||||
}
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\PluginBase.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin;
|
||||
|
||||
use Drupal\Component\Plugin\PluginBase as ComponentPluginBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\PluginDependencyTrait.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin;
|
||||
|
||||
use Drupal\Component\Plugin\DependentPluginInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\PluginFormInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin;
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Plugin\PluginManagerPass.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Plugin;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
|
|
Reference in a new issue