You are here

public function FarmFieldFactory::bundleFieldDefinition in farmOS 2.x

Generates a bundle field definition.

Parameters

array $options: An array of options.

Return value

\Drupal\entity\BundleFieldDefinition Returns a bundle field definition.

Overrides FarmFieldFactoryInterface::bundleFieldDefinition

File

modules/core/field/src/FarmFieldFactory.php, line 39

Class

FarmFieldFactory
Factory for generating farmOS field definitions.

Namespace

Drupal\farm_field

Code

public function bundleFieldDefinition(array $options = []) : BundleFieldDefinition {
  $field = BundleFieldDefinition::create($options['type']);
  $this
    ->buildFieldDefinition($field, $options);
  return $field;
}