interface DesignTokenInterface
Interface for design token config entity.
@internal This API is experimental.
Hierarchy
- interface \Drupal\Core\Config\Entity\ThirdPartySettingsInterface; interface \Drupal\Core\Entity\EntityInterface extends \Drupal\Core\Access\AccessibleInterface, \Drupal\Core\Cache\CacheableDependencyInterface, \Drupal\Core\Cache\RefinableCacheableDependencyInterface; interface \Drupal\Core\Entity\SynchronizableInterface extends \Drupal\Core\Entity\EntityInterface
- interface \Drupal\Core\Config\Entity\ConfigEntityInterface extends \Drupal\Core\Entity\EntityInterface, \Drupal\Core\Config\Entity\ThirdPartySettingsInterface, \Drupal\Core\Entity\SynchronizableInterface
- interface \Drupal\Core\Theme\Entity\DesignTokenInterface extends \Drupal\Core\Config\Entity\ConfigEntityInterface
- interface \Drupal\Core\Config\Entity\ConfigEntityInterface extends \Drupal\Core\Entity\EntityInterface, \Drupal\Core\Config\Entity\ThirdPartySettingsInterface, \Drupal\Core\Entity\SynchronizableInterface
Expanded class hierarchy of DesignTokenInterface
All classes that implement DesignTokenInterface
2 files declare their use of DesignTokenInterface
- CssSelectorConstraintValidator.php in core/
lib/ Drupal/ Core/ Theme/ Plugin/ Validation/ Constraint/ CssSelectorConstraintValidator.php - DesignTokenConfigEntityKernelTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Theme/ DesignToken/ DesignTokenConfigEntityKernelTest.php
File
-
core/
lib/ Drupal/ Core/ Theme/ Entity/ DesignTokenInterface.php, line 16
Namespace
Drupal\Core\Theme\EntityView source
interface DesignTokenInterface extends ConfigEntityInterface {
/**
* The character used has placeholder for the dot character.
*
* Keyed lists in config cannot accept dot. So this character is used when
* saving are reading the scopes in config.
*/
public const DOT_CONVERSION_CHARACTER = '%';
/**
* Gets CSS variable name.
*
* @return string
* The CSS variable name.
*/
public function getCssVariableName() : string;
/**
* Gets scopes with design token plugin values according to the type.
*
* @return \Drupal\Core\Theme\DesignToken\DesignTokenValuePluginCollection
* The prepared scope collection.
*/
public function getScopes() : DesignTokenValuePluginCollection;
/**
* Exports the given tokens into CSS variables.
*
* @param \Drupal\Core\Theme\Entity\DesignTokenInterface[] $tokens
* The token entities.
*
* @return string
* The inline CSS.
*/
public static function toCss(array $tokens) : string;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.