public function NumberDataDefinition::getPropertyDefinitions in SCSS Compiler 1.0.x
Gets an array of property definitions of contained properties.
Return value
\Drupal\Core\TypedData\DataDefinitionInterface[] An array of property definitions of contained properties, keyed by property name.
Overrides ComplexDataDefinitionBase::getPropertyDefinitions
File
- src/
Config/ Schema/ NumberDataDefinition.php, line 33
Class
- NumberDataDefinition
- A data definition that describes the properties of a Sass number.
Namespace
Drupal\compiler_scss\Config\SchemaCode
public function getPropertyDefinitions() {
if (empty($this->propertyDefinitions)) {
$definitions['value'] = DataDefinition::create('float')
->setLabel($this
->t('Float'))
->setRequired(TRUE);
$definitions['unit'] = DataDefinition::create('compiler_scss_unit')
->setLabel($this
->t('Sass unit'));
$this->propertyDefinitions = $definitions;
}
return $this->propertyDefinitions;
}