You are here

public static function FontFamilyDataDefinition::createFromDataType in SCSS Compiler 1.0.x

Creates a new data definition object.

This method is typically used by \Drupal\Core\TypedData\TypedDataManager::createDataDefinition() to build a definition object for an arbitrary data type. When the definition class is known, it is recommended to directly use the static create() method on that class instead; e.g.:

$map_definition = \Drupal\Core\TypedData\MapDataDefinition::create();

Parameters

string $data_type: The data type, for which a data definition should be created.

Return value

static

Throws

\InvalidArgumentException If an unsupported data type gets passed to the class; e.g., 'string' to a definition class handling 'entity:* data types.

Overrides ListDataDefinition::createFromDataType

File

src/Config/Schema/FontFamilyDataDefinition.php, line 32

Class

FontFamilyDataDefinition
A data definition that describes the items in a font family sequence.

Namespace

Drupal\compiler_scss\Config\Schema

Code

public static function createFromDataType($type) {
  return self::create($type);
}