You are here

public static function RangeDecimalItem::getColumnSpecification in Range 8

Helper function. Returns Schema API column specification.

Parameters

\Drupal\Core\Field\FieldStorageDefinitionInterface $field_definition: The field definition.

Return value

array Schema API column specification.

Overrides RangeItemInterface::getColumnSpecification

File

src/Plugin/Field/FieldType/RangeDecimalItem.php, line 90

Class

RangeDecimalItem
Plugin implementation of the 'range_decimal' field type.

Namespace

Drupal\range\Plugin\Field\FieldType

Code

public static function getColumnSpecification(FieldStorageDefinitionInterface $field_definition) {
  return [
    'type' => 'numeric',
    'precision' => $field_definition
      ->getSetting('precision'),
    'scale' => $field_definition
      ->getSetting('scale'),
  ];
}