function DesignToken::getCssScopeName

Prepares a scope for CSS usage.

Transform DOT_CONVERSION_CHARACTER into dot.

Parameters

string $scope: The scope to convert.

Return value

string The converted scope.

1 call to DesignToken::getCssScopeName()
DesignTokenEntityTest::testGetCssScopeName in core/tests/Drupal/Tests/Core/Theme/DesignToken/DesignTokenEntityTest.php
Tests getCssScopeName.

File

core/lib/Drupal/Core/Theme/Entity/DesignToken.php, line 156

Class

DesignToken
Configuration entity.

Namespace

Drupal\Core\Theme\Entity

Code

public static function getCssScopeName(string $scope) : string {
  return \str_replace(self::DOT_CONVERSION_CHARACTER, '.', $scope);
}

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