Field CRUD API

Creates, updates, and deletes Field API fields, bundles, and instances.

Modules use this API, often in hook_install(), to create custom data structures. UI modules will use it to create a user interface.

The Field CRUD API uses Field API data structures.

See Field API for information about the other parts of the Field API.

File

drupal/core/modules/field/field.crud.inc, line 13
Field CRUD API, handling field and field instance creation and deletion.

Functions

Namesort descending Location Description
Field::__construct drupal/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php Constructs a Field object.
FieldInstance::__construct drupal/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php Constructs a FieldInstance object.
field_create_field Deprecated drupal/core/modules/field/field.crud.inc Creates a field.
field_create_instance Deprecated drupal/core/modules/field/field.crud.inc Creates an instance of a field, binding it to a bundle.
field_delete_field Deprecated drupal/core/modules/field/field.crud.inc Marks a field and its instances and data for deletion.
field_delete_instance Deprecated drupal/core/modules/field/field.crud.inc Marks a field instance and its data for deletion.
field_read_field drupal/core/modules/field/field.crud.inc Reads a single field record directly from the database.
field_read_fields drupal/core/modules/field/field.crud.inc Reads in fields that match an array of conditions.
field_read_instance drupal/core/modules/field/field.crud.inc Reads a single instance record from the database.
field_read_instances drupal/core/modules/field/field.crud.inc Reads in field instances that match an array of conditions.
field_update_field Deprecated drupal/core/modules/field/field.crud.inc Updates a field.
field_update_instance Deprecated drupal/core/modules/field/field.crud.inc Updates an instance of a field.
hook_field_create_field drupal/core/modules/field/field.api.php Act on a field being created.
hook_field_create_instance drupal/core/modules/field/field.api.php Act on a field instance being created.
hook_field_delete_field drupal/core/modules/field/field.api.php Act on a field being deleted.
hook_field_delete_instance drupal/core/modules/field/field.api.php Act on a field instance being deleted.
hook_field_purge_field drupal/core/modules/field/field.api.php Acts when a field record is being purged.
hook_field_purge_instance drupal/core/modules/field/field.api.php Acts when a field instance is being purged.
hook_field_read_field drupal/core/modules/field/field.api.php Act on field records being read from the database.
hook_field_read_instance drupal/core/modules/field/field.api.php Act on a field record being read from the database.
hook_field_storage_purge drupal/core/modules/field/field.api.php Remove field storage information when field data is purged.
hook_field_storage_purge_field drupal/core/modules/field/field.api.php Remove field storage information when a field record is purged.
hook_field_storage_purge_field_instance drupal/core/modules/field/field.api.php Remove field storage information when a field instance is purged.
hook_field_update_field drupal/core/modules/field/field.api.php Act on a field being updated.
hook_field_update_forbid drupal/core/modules/field/field.api.php Forbid a field update from occurring.
hook_field_update_instance drupal/core/modules/field/field.api.php Act on a field instance being updated.