VariantBase::submitConfigurationForm

public VariantBase::submitConfigurationForm(array &$form, FormStateInterface $form_state) Form submission handler. Parameters array $form: An associative array containing the structure of the plugin form as built by static::buildConfigurationForm(). \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Calling code should pass on a subform state created through \Drupal\Core\Form\SubformState::createForSubform(). Overrides PluginFormInterface::submitConfigurationF

VariantBase::validateConfigurationForm

public VariantBase::validateConfigurationForm(array &$form, FormStateInterface $form_state) Form validation handler. Parameters array $form: An associative array containing the structure of the plugin form as built by static::buildConfigurationForm(). \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Calling code should pass on a subform state created through \Drupal\Core\Form\SubformState::createForSubform(). Overrides PluginFormInterface::validateConfigurat

VariantBase::__construct

public VariantBase::__construct(array $configuration, $plugin_id, $plugin_definition) Constructs a Drupal\Component\Plugin\PluginBase object. Parameters array $configuration: A configuration array containing information about the plugin instance. string $plugin_id: The plugin_id for the plugin instance. mixed $plugin_definition: The plugin implementation definition. Overrides PluginBase::__construct File core/lib/Drupal/Core/Display/VariantBase.php, line 27 Class VariantBase Provides a ba

VariantInterface

Provides an interface for DisplayVariant plugins. Hierarchy interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Component\Plugin\ConfigurablePluginInterface; interface \Drupal\Core\Plugin\PluginFormInterface; interface \Drupal\Core\Cache\RefinableCacheableDependencyInterfaceinterface \Drupal\Core\Display\VariantInterface See also \Drupal\Core\Display\Annotation\DisplayVariant \Drupal\Core\Display\VariantBase \Drupal\Core\Display\VariantManager Plugin API File co

VariantInterface::access

public VariantInterface::access(AccountInterface $account = NULL) Determines if this display variant is accessible. Parameters \Drupal\Core\Session\AccountInterface $account: (optional) The user for which to check access, or NULL to check access for the current user. Defaults to NULL. Return value bool TRUE if this display variant is accessible, FALSE otherwise. File core/lib/Drupal/Core/Display/VariantInterface.php, line 73 Class VariantInterface Provides an interface for DisplayVariant

VariantInterface::adminLabel

public VariantInterface::adminLabel() Returns the admin-facing display variant label. This is for the type of display variant, not the configured variant itself. Return value string The display variant administrative label. File core/lib/Drupal/Core/Display/VariantInterface.php, line 37 Class VariantInterface Provides an interface for DisplayVariant plugins. Namespace Drupal\Core\Display Code public function adminLabel();

VariantInterface::build

public VariantInterface::build() 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 value array A render array for the display variant. File core/lib/Drupal/Core/Display/VariantInterface.php, line 85 Class VariantInterface Provides an interface for DisplayVariant plugins. Namespac

VariantInterface::getWeight

public VariantInterface::getWeight() Returns the weight of the display variant. Return value int The display variant weight. File core/lib/Drupal/Core/Display/VariantInterface.php, line 53 Class VariantInterface Provides an interface for DisplayVariant plugins. Namespace Drupal\Core\Display Code public function getWeight();

VariantInterface::id

public VariantInterface::id() Returns the unique ID for the display variant. Return value string The display variant ID. File core/lib/Drupal/Core/Display/VariantInterface.php, line 45 Class VariantInterface Provides an interface for DisplayVariant plugins. Namespace Drupal\Core\Display Code public function id();

VariantInterface::label

public VariantInterface::label() Returns the user-facing display variant label. Return value string The display variant label. File core/lib/Drupal/Core/Display/VariantInterface.php, line 27 Class VariantInterface Provides an interface for DisplayVariant plugins. Namespace Drupal\Core\Display Code public function label();