function FieldStorageAddController::resetField
Deletes stored field data and builds the field selection links.
Parameters
string $entity_type_id: The name of the entity type.
string $bundle: The entity bundle.
string $field_name: The field name.
Return value
array The field selection links.
File
-
core/
modules/ field_ui/ src/ Controller/ FieldStorageAddController.php, line 75
Class
- FieldStorageAddController
- Controller for building the field type links.
Namespace
Drupal\field_ui\ControllerCode
public function resetField(string $entity_type_id, string $bundle, string $field_name) {
// Delete stored field data in case user changes field type.
$this->tempStore
->delete("{$entity_type_id}:{$field_name}");
return $this->getFieldSelectionLinks($entity_type_id, $bundle);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.