protected static function Dimension::_schema in Dimension 8
Same name and namespace in other branches
- 2.1.x src/Plugin/Field/FieldType/Dimension.php \Drupal\dimension\Plugin\Field\FieldType\Dimension::_schema()
- 2.0.x src/Plugin/Field/FieldType/Dimension.php \Drupal\dimension\Plugin\Field\FieldType\Dimension::_schema()
3 calls to Dimension::_schema()
- Area::schema in src/
Plugin/ Field/ FieldType/ Area.php - Returns the schema for the field.
- Length::schema in src/
Plugin/ Field/ FieldType/ Length.php - Returns the schema for the field.
- Volume::schema in src/
Plugin/ Field/ FieldType/ Volume.php - Returns the schema for the field.
File
- src/
Plugin/ Field/ FieldType/ Dimension.php, line 87
Class
Namespace
Drupal\dimension\Plugin\Field\FieldTypeCode
protected static function _schema(FieldStorageDefinitionInterface $field_definition, $fields) {
$settings = $field_definition
->getSetting('storage_value');
$schema = array(
'columns' => array(
'value' => array(
'type' => 'numeric',
'precision' => $settings['precision'],
'scale' => $settings['scale'],
),
),
);
foreach ($fields as $key => $label) {
$settings = $field_definition
->getSetting('storage_' . $key);
$schema['columns'][$key] = array(
'type' => 'numeric',
'precision' => $settings['precision'],
'scale' => $settings['scale'],
);
}
return $schema;
}