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::adminLabel

public VariantBase::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. Overrides VariantInterface::adminLabel File core/lib/Drupal/Core/Display/VariantBase.php, line 43 Class VariantBase Provides a base class for DisplayVariant plugins. Namespace Drupal\Core\Display Code public function adminLabel() { return $this->pluginDefinition['a

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

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

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

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().

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

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

valid_email_address

valid_email_address($mail) Verifies the syntax of the given email address. Parameters string $mail: A string containing an email address. Return value bool TRUE if the address is in a valid format. Deprecated in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. Use \Drupal::service('email.validator')->isValid(). Related topics Input validation Functions to validate user input. File core/includes/common.inc, line 180 Common functions that many Drupal modules will need to reference