protected function RangeFieldUiTest::getStorageEdit in Range 8
Returns storage edit array for a given field type.
Parameters
string $field_type: Range field type. Could be one of the following values: range_integer, range_float or range_decimal.
Return value
array Range field storage edit array.
1 call to RangeFieldUiTest::getStorageEdit()
- RangeFieldUiTest::rangeTestAddNewField in tests/
src/ Functional/ RangeFieldUiTest.php - Test creating range field via field UI.
File
- tests/
src/ Functional/ RangeFieldUiTest.php, line 120
Class
- RangeFieldUiTest
- Tests adding range fields and their settings via field UI.
Namespace
Drupal\Tests\range\FunctionalCode
protected function getStorageEdit($field_type = 'range_integer') {
$test_settings = $this
->getTestFieldStorageSettings($field_type);
switch ($field_type) {
case 'range_integer':
case 'range_float':
return [];
case 'range_decimal':
return [
'settings[precision]' => $test_settings['precision'],
'settings[scale]' => $test_settings['scale'],
];
}
}