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\Core\Menu\ContextualLinkDefault.
*/
namespace Drupal\Core\Menu;
use Drupal\Component\Plugin\PluginBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\ContextualLinkInterface.
*/
namespace Drupal\Core\Menu;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\ContextualLinkManager.
*/
namespace Drupal\Core\Menu;
use Drupal\Component\Plugin\Exception\PluginException;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\ContextualLinkManagerInterface.
*/
namespace Drupal\Core\Menu;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\DefaultMenuLinkTreeManipulators.
*/
namespace Drupal\Core\Menu;
use Drupal\Core\Access\AccessManagerInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\Form\MenuLinkDefaultForm.
*/
namespace Drupal\Core\Menu\Form;
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;

View file

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

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\InaccessibleMenuLink.
*/
namespace Drupal\Core\Menu;
use Drupal\Component\Plugin\Exception\PluginException;

View file

@ -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'];
}
}

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\LocalActionInterface.
*/
namespace Drupal\Core\Menu;
use Drupal\Core\Routing\RouteMatchInterface;

View file

@ -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';

View file

@ -1,9 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\LocalActionManagerInterface.
*/
namespace Drupal\Core\Menu;
use Drupal\Component\Plugin\PluginManagerInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\LocalTaskDefault.
*/
namespace Drupal\Core\Menu;
use Drupal\Component\Plugin\PluginBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\LocalTaskInterface.
*/
namespace Drupal\Core\Menu;
use Drupal\Core\Routing\RouteMatchInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\LocalTaskManager.
*/
namespace Drupal\Core\Menu;
use Drupal\Component\Plugin\Exception\PluginException;

View file

@ -1,9 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\LocalTaskManagerInterface.
*/
namespace Drupal\Core\Menu;
use Drupal\Component\Plugin\PluginManagerInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\MenuActiveTrail.
*/
namespace Drupal\Core\Menu;
use Drupal\Core\Cache\CacheBackendInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\MenuActiveTrailInterface.
*/
namespace Drupal\Core\Menu;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\MenuLinkBase.
*/
namespace Drupal\Core\Menu;
use Drupal\Component\Plugin\Exception\PluginException;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\MenuLinkDefault.
*/
namespace Drupal\Core\Menu;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;

View file

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

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\MenuLinkManager.
*/
namespace Drupal\Core\Menu;
use Drupal\Component\Plugin\Exception\PluginException;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\MenuLinkManagerInterface.
*/
namespace Drupal\Core\Menu;
use Drupal\Component\Plugin\PluginManagerInterface;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\MenuLinkTree.
*/
namespace Drupal\Core\Menu;
use Drupal\Component\Utility\NestedArray;

View file

@ -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.
*/

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\MenuLinkTreeInterface.
*/
namespace Drupal\Core\Menu;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\MenuParentFormSelector.
*/
namespace Drupal\Core\Menu;
use Drupal\Core\Cache\CacheableMetadata;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\MenuParentFormSelectorInterface.
*/
namespace Drupal\Core\Menu;
use Drupal\Core\Cache\CacheableMetadata;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\MenuTreeParameters.
*/
namespace Drupal\Core\Menu;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\MenuTreeStorage.
*/
namespace Drupal\Core\Menu;
use Drupal\Component\Plugin\Exception\PluginException;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\MenuTreeStorageInterface.
*/
namespace Drupal\Core\Menu;
/**

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\Plugin\Block\LocalActionsBlock.
*/
namespace Drupal\Core\Menu\Plugin\Block;
use Drupal\Core\Block\BlockBase;

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\Plugin\Block\LocalTasksBlock.
*/
namespace Drupal\Core\Menu\Plugin\Block;
use Drupal\Core\Block\BlockBase;

View file

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

View file

@ -1,10 +1,5 @@
<?php
/**
* @file
* Contains \Drupal\Core\Menu\StaticMenuLinkOverridesInterface.
*/
namespace Drupal\Core\Menu;
/**