VariantBase::calculateDependencies

public VariantBase::calculateDependencies() Calculates dependencies for the configured plugin. Dependencies are saved in the plugin's configuration entity and are used to determine configuration synchronization order. For example, if the plugin integrates with specific user roles, this method should return an array of dependencies listing the specified roles. Return value array An array of dependencies grouped by type (config, content, module, theme). For example: array( 'config' => a

VariantBase::buildConfigurationForm

public VariantBase::buildConfigurationForm(array $form, FormStateInterface $form_state) Form constructor. Plugin forms are embedded in other forms. In order to know where the plugin form is located in the parent form, #parents and #array_parents must be known, but these are not available during the initial build phase. In order to have these properties available when building the plugin form's elements, let this method return a form element that has a #process callback and build the rest of the

VariantBase::defaultConfiguration

public VariantBase::defaultConfiguration() Gets default configuration for this plugin. Return value array An associative array with the default configuration. Overrides ConfigurablePluginInterface::defaultConfiguration File core/lib/Drupal/Core/Display/VariantBase.php, line 88 Class VariantBase Provides a base class for DisplayVariant plugins. Namespace Drupal\Core\Display Code public function defaultConfiguration() { return array( 'label' => '', 'uuid' => '', 'wei

VariantBase

Provides a base class for DisplayVariant plugins. Hierarchy class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterfaceclass \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Display\VariantBase implements VariantInterface uses RefinableCacheableDependencyTrait, PluginDependencyTrait See also \Drupal\Core\Display\Annotation\DisplayVariant \Drupal\Core\Display\VariantInterface \Drupal

VariantBase::access

public VariantBase::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. Overrides VariantInterface::access File core/lib/Drupal/Core/Display/VariantBase.php, line 133 Class VariantBase Provides a base cla

Value

Provides a form element for storage of internal information. Unlike \Drupal\Core\Render\Element\Hidden, this information is not sent to the browser in a hidden form field, but only stored in the form array for use in validation and submit processing. Properties: #value: The value of the form element that cannot be edited by the user. Usage Example: $form['entity_id'] = array('#type' => 'value', '#value' => $entity_id); Plugin annotation @FormElement("value") Hierarchy class \Drupal\C

Value::getInfo

public Value::getInfo() Returns the element properties for this element. Return value array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format. Overrides ElementInterface::getInfo File core/lib/Drupal/Core/Render/Element/Value.php, line 27 Class Value Provides a form element for storage of internal information. Namespace Drupal\Core\Render\Element Code

Variable

Provides helpers for dealing with variables. Hierarchy class \Drupal\Component\Utility\Variable Related topics Utility classes and functions Overview of utility classes and functions for developers. File core/lib/Drupal/Component/Utility/Variable.php, line 10 Namespace Drupal\Component\Utility Members Name Modifiers Type Description Variable::export public static function Drupal-friendly var_export().

Variable::export

public static Variable::export($var, $prefix = '') Drupal-friendly var_export(). Parameters mixed $var: The variable to export. string $prefix: A prefix that will be added at the beginning of every lines of the output. Return value string The variable exported in a way compatible to Drupal's coding standards. File core/lib/Drupal/Component/Utility/Variable.php, line 23 Class Variable Provides helpers for dealing with variables. Namespace Drupal\Component\Utility Code public static fu

UuidInterface::generate

public UuidInterface::generate() Generates a Universally Unique IDentifier (UUID). Return value A 16 byte integer represented as a hex string formatted with 4 hyphens. File core/lib/Drupal/Component/Uuid/UuidInterface.php, line 16 Class UuidInterface Interface for generating UUIDs. Namespace Drupal\Component\Uuid Code public function generate();