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\Menu\ContextualLinkDefault.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Component\Plugin\PluginBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\ContextualLinkInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\ContextualLinkManager.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Component\Plugin\Exception\PluginException;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\ContextualLinkManagerInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\DefaultMenuLinkTreeManipulators.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Core\Access\AccessManagerInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\Form\MenuLinkDefaultForm.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu\Form;
|
||||
|
||||
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\Form\MenuLinkFormInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu\Form;
|
||||
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\InaccessibleMenuLink.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Component\Plugin\Exception\PluginException;
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\LocalActionDefault.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Component\Plugin\PluginBase;
|
||||
use Drupal\Core\Cache\Cache;
|
||||
use Drupal\Core\Cache\CacheableDependencyInterface;
|
||||
use Drupal\Core\DependencyInjection\DependencySerializationTrait;
|
||||
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
|
@ -18,7 +15,7 @@ use Symfony\Component\HttpFoundation\Request;
|
|||
/**
|
||||
* Provides a default implementation for local action plugins.
|
||||
*/
|
||||
class LocalActionDefault extends PluginBase implements LocalActionInterface, ContainerFactoryPluginInterface {
|
||||
class LocalActionDefault extends PluginBase implements LocalActionInterface, ContainerFactoryPluginInterface, CacheableDependencyInterface {
|
||||
|
||||
use DependencySerializationTrait;
|
||||
|
||||
|
@ -122,4 +119,34 @@ class LocalActionDefault extends PluginBase implements LocalActionInterface, Con
|
|||
return (array) $this->pluginDefinition['options'];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getCacheTags() {
|
||||
if (!isset($this->pluginDefinition['cache_tags'])) {
|
||||
return [];
|
||||
}
|
||||
return $this->pluginDefinition['cache_tags'];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getCacheContexts() {
|
||||
if (!isset($this->pluginDefinition['cache_contexts'])) {
|
||||
return [];
|
||||
}
|
||||
return $this->pluginDefinition['cache_contexts'];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getCacheMaxAge() {
|
||||
if (!isset($this->pluginDefinition['cache_max_age'])) {
|
||||
return Cache::PERMANENT;
|
||||
}
|
||||
return $this->pluginDefinition['cache_max_age'];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\LocalActionInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\LocalActionManager.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Core\Access\AccessManagerInterface;
|
||||
use Drupal\Core\Cache\Cache;
|
||||
use Drupal\Core\Cache\CacheableDependencyInterface;
|
||||
use Drupal\Core\Cache\CacheableMetadata;
|
||||
use Drupal\Core\Cache\CacheBackendInterface;
|
||||
use Drupal\Core\Extension\ModuleHandlerInterface;
|
||||
|
@ -199,16 +192,7 @@ class LocalActionManager extends DefaultPluginManager implements LocalActionMana
|
|||
'#access' => $access,
|
||||
'#weight' => $plugin->getWeight(),
|
||||
);
|
||||
$cacheability->addCacheableDependency($access);
|
||||
// For backward compatibility in 8.0.x, plugins that do not implement
|
||||
// the \Drupal\Core\Cache\CacheableDependencyInterface are assumed
|
||||
// to be cacheable forever.
|
||||
if ($plugin instanceof CacheableDependencyInterface) {
|
||||
$cacheability->addCacheableDependency($plugin);
|
||||
}
|
||||
else {
|
||||
$cacheability->setCacheMaxAge(Cache::PERMANENT);
|
||||
}
|
||||
$cacheability->addCacheableDependency($access)->addCacheableDependency($plugin);
|
||||
$cacheability->applyTo($links[$plugin_id]);
|
||||
}
|
||||
$links['#cache']['contexts'][] = 'route';
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\LocalActionManagerInterface.
|
||||
*/
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Component\Plugin\PluginManagerInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\LocalTaskDefault.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Component\Plugin\PluginBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\LocalTaskInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\LocalTaskManager.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Component\Plugin\Exception\PluginException;
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\LocalTaskManagerInterface.
|
||||
*/
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Component\Plugin\PluginManagerInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\MenuActiveTrail.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Core\Cache\CacheBackendInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\MenuActiveTrailInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\MenuLinkBase.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Component\Plugin\Exception\PluginException;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\MenuLinkDefault.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\MenuLinkInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Component\Plugin\PluginInspectionInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\MenuLinkManager.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Component\Plugin\Exception\PluginException;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\MenuLinkManagerInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Component\Plugin\PluginManagerInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\MenuLinkTree.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Component\Utility\NestedArray;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\MenuLinkTreeElement.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
/**
|
||||
|
@ -98,7 +93,7 @@ class MenuLinkTreeElement {
|
|||
* The depth of this element relative to the tree root.
|
||||
* @param bool $in_active_trail
|
||||
* A flag as to whether this link was included in the list of active trail
|
||||
* IDs used to build the tree.
|
||||
* IDs used to build the tree.
|
||||
* @param \Drupal\Core\Menu\MenuLinkTreeElement[] $subtree
|
||||
* The children of this element in the menu link tree.
|
||||
*/
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\MenuLinkTreeInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\MenuParentFormSelector.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Core\Cache\CacheableMetadata;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\MenuParentFormSelectorInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Core\Cache\CacheableMetadata;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\MenuTreeParameters.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\MenuTreeStorage.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Component\Plugin\Exception\PluginException;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\MenuTreeStorageInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\Plugin\Block\LocalActionsBlock.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu\Plugin\Block;
|
||||
|
||||
use Drupal\Core\Block\BlockBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\Plugin\Block\LocalTasksBlock.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu\Plugin\Block;
|
||||
|
||||
use Drupal\Core\Block\BlockBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\StaticMenuLinkOverrides.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
use Drupal\Core\Config\ConfigFactoryInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Menu\StaticMenuLinkOverridesInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Menu;
|
||||
|
||||
/**
|
||||
|
|
Reference in a new issue