public function FarmFieldFactory::baseFieldDefinition in farmOS 2.x
Generate a base field definition.
Parameters
array $options: An array of options.
Return value
\Drupal\Core\Field\BaseFieldDefinition Returns a base field definition.
Overrides FarmFieldFactoryInterface::baseFieldDefinition
File
- modules/
core/ field/ src/ FarmFieldFactory.php, line 24
Class
- FarmFieldFactory
- Factory for generating farmOS field definitions.
Namespace
Drupal\farm_fieldCode
public function baseFieldDefinition(array $options = []) : BaseFieldDefinition {
$field = BaseFieldDefinition::create($options['type']);
$this
->buildFieldDefinition($field, $options);
return $field;
}