function Dimension::toDtcg

File

core/lib/Drupal/Core/Theme/Plugin/DesignTokenValue/Dimension.php, line 57

Class

Dimension
Dimension design token value.

Namespace

Drupal\Core\Theme\Plugin\DesignTokenValue

Code

public function toDtcg() : mixed {
  return [
    'value' => $this->value,
    'unit' => $this->unit->value,
  ];
}

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