protected static function Dimension::_propertyDefinitions in Dimension 2.0.x
Same name and namespace in other branches
- 8 src/Plugin/Field/FieldType/Dimension.php \Drupal\dimension\Plugin\Field\FieldType\Dimension::_propertyDefinitions()
- 2.1.x src/Plugin/Field/FieldType/Dimension.php \Drupal\dimension\Plugin\Field\FieldType\Dimension::_propertyDefinitions()
Parameters
$fields:
Return value
array
3 calls to Dimension::_propertyDefinitions()
- Area::propertyDefinitions in src/
Plugin/ Field/ FieldType/ Area.php - Defines field item properties.
- Length::propertyDefinitions in src/
Plugin/ Field/ FieldType/ Length.php - Defines field item properties.
- Volume::propertyDefinitions in src/
Plugin/ Field/ FieldType/ Volume.php - Defines field item properties.
File
- src/
Plugin/ Field/ FieldType/ Dimension.php, line 63
Class
Namespace
Drupal\dimension\Plugin\Field\FieldTypeCode
protected static function _propertyDefinitions($fields) : array {
$properties = [];
$properties['value'] = DataDefinition::create('string')
->setLabel(t('Value'))
->setRequired(TRUE);
foreach ($fields as $key => $label) {
$properties[$key] = DataDefinition::create('string')
->setLabel($label)
->setRequired(TRUE);
}
return $properties;
}