public function ConfigurableFieldManagerInterface::createField in Commerce Core 8.2
Creates a configurable field from the given field definition.
Parameters
\Drupal\entity\BundleFieldDefinition $field_definition: The field definition.
bool $lock: Whether the created field should be locked.
Throws
\InvalidArgumentException Thrown when given an incomplete field definition (missing name, target entity type ID, or target bundle).
\RuntimeException Thrown when a field with the same name already exists.
1 method overrides ConfigurableFieldManagerInterface::createField()
- ConfigurableFieldManager::createField in src/
ConfigurableFieldManager.php - Creates a configurable field from the given field definition.
File
- src/
ConfigurableFieldManagerInterface.php, line 28
Class
- ConfigurableFieldManagerInterface
- Manages configurable fields based on field definitions.
Namespace
Drupal\commerceCode
public function createField(EntityBundleFieldDefinition $field_definition, $lock = TRUE);