Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663
This commit is contained in:
parent
eb34d130a8
commit
f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Display\ContextAwareVariantInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Display;
|
||||
|
||||
/**
|
||||
* Provides an interface for variant plugins that are context-aware.
|
||||
*/
|
||||
interface ContextAwareVariantInterface extends VariantInterface {
|
||||
|
||||
/**
|
||||
* Gets the values for all defined contexts.
|
||||
*
|
||||
* @return \Drupal\Component\Plugin\Context\ContextInterface[]
|
||||
* An array of set contexts, keyed by context name.
|
||||
*/
|
||||
public function getContexts();
|
||||
|
||||
/**
|
||||
* Sets the context values for this display variant.
|
||||
*
|
||||
* @param \Drupal\Component\Plugin\Context\ContextInterface[] $contexts
|
||||
* An array of contexts, keyed by context name.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setContexts(array $contexts);
|
||||
|
||||
}
|
|
@ -36,4 +36,15 @@ interface PageVariantInterface extends VariantInterface {
|
|||
*/
|
||||
public function setMainContent(array $main_content);
|
||||
|
||||
/**
|
||||
* Sets the title for the page being rendered.
|
||||
*
|
||||
* @param string|array $title
|
||||
* The page title: either a string for plain titles or a render array for
|
||||
* formatted titles.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTitle($title);
|
||||
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
namespace Drupal\Core\Display;
|
||||
|
||||
use Drupal\Core\Cache\RefinableCacheableDependencyTrait;
|
||||
use Drupal\Core\Form\FormStateInterface;
|
||||
use Drupal\Core\Plugin\PluginBase;
|
||||
use Drupal\Core\Plugin\PluginDependencyTrait;
|
||||
|
@ -23,6 +24,7 @@ use Drupal\Core\Session\AccountInterface;
|
|||
abstract class VariantBase extends PluginBase implements VariantInterface {
|
||||
|
||||
use PluginDependencyTrait;
|
||||
use RefinableCacheableDependencyTrait;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
|
|
@ -9,6 +9,7 @@ namespace Drupal\Core\Display;
|
|||
|
||||
use Drupal\Component\Plugin\ConfigurablePluginInterface;
|
||||
use Drupal\Component\Plugin\PluginInspectionInterface;
|
||||
use Drupal\Core\Cache\RefinableCacheableDependencyInterface;
|
||||
use Drupal\Core\Plugin\PluginFormInterface;
|
||||
use Drupal\Core\Session\AccountInterface;
|
||||
|
||||
|
@ -20,7 +21,7 @@ use Drupal\Core\Session\AccountInterface;
|
|||
* @see \Drupal\Core\Display\VariantManager
|
||||
* @see plugin_api
|
||||
*/
|
||||
interface VariantInterface extends PluginInspectionInterface, ConfigurablePluginInterface, PluginFormInterface {
|
||||
interface VariantInterface extends PluginInspectionInterface, ConfigurablePluginInterface, PluginFormInterface, RefinableCacheableDependencyInterface {
|
||||
|
||||
/**
|
||||
* Returns the user-facing display variant label.
|
||||
|
@ -79,6 +80,10 @@ interface VariantInterface extends PluginInspectionInterface, ConfigurablePlugin
|
|||
/**
|
||||
* Builds and returns the renderable array for the display variant.
|
||||
*
|
||||
* The variant can contain cacheability metadata for the configuration that
|
||||
* was passed in setConfiguration(). In the build() method, this should be
|
||||
* added to the render array that is returned.
|
||||
*
|
||||
* @return array
|
||||
* A render array for the display variant.
|
||||
*/
|
||||
|
|
Reference in a new issue