interface DesignTokenValueInterface

Interface for design tokens value plugins.

Hierarchy

Expanded class hierarchy of DesignTokenValueInterface

All classes that implement DesignTokenValueInterface

2 files declare their use of DesignTokenValueInterface
DesignTokenTest.php in core/tests/Drupal/Tests/Core/Theme/DesignToken/DesignTokenTest.php
DesignTokenValuePluginManagerKernelTest.php in core/tests/Drupal/KernelTests/Core/Theme/DesignToken/DesignTokenValuePluginManagerKernelTest.php
1 string reference to 'DesignTokenValueInterface'
core.entity.schema.yml in core/config/schema/core.entity.schema.yml
core/config/schema/core.entity.schema.yml

File

core/lib/Drupal/Core/Theme/DesignToken/DesignTokenValueInterface.php, line 10

Namespace

Drupal\Core\Theme\DesignToken
View source
interface DesignTokenValueInterface {
  
  /**
   * Exports as DTCG.
   *
   * @return mixed
   *   DTCG data of the value key.
   */
  public function toDtcg() : mixed;
  
  /**
   * Exports as CSS value.
   *
   * @return string
   *   The CSS variable.
   */
  public function toCss() : string;
  
  /**
   * Prepares configuration for plugin creation.
   *
   * Ensures that the configuration is an associative array.
   *
   * @param mixed $configuration
   *   The configuration to prepare.
   *
   * @return array
   *   The prepared configuration.
   */
  public static function prepareConfiguration(mixed $configuration) : array;

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.