function field_info_storage_types

Returns information about field storage from hook_field_storage_info().

Parameters

$storage_type: (optional) A storage type name. If omitted, all storage types will be returned.

Return value

Either a storage type description, as provided by hook_field_storage_info(), or an array of all existing storage types, keyed by storage type name.

Related topics

9 calls to field_info_storage_types()
FieldInfoTest::testFieldInfo in drupal/core/modules/field/lib/Drupal/field/Tests/FieldInfoTest.php
Test that field types and field definitions are correcly cached.
field_attach_delete in drupal/core/modules/field/field.attach.inc
Deletes field data for an existing entity. This deletes all revisions of field data for the entity.
field_attach_delete_revision in drupal/core/modules/field/field.attach.inc
Delete field data for a single revision of an existing entity. The passed entity must have a revision ID attribute.
field_attach_insert in drupal/core/modules/field/field.attach.inc
Save field data for a new entity.
field_attach_load in drupal/core/modules/field/field.attach.inc
Loads fields for the current revisions of a group of entities.

... See full list

File

drupal/core/modules/field/field.info.inc, line 265
Field Info API, providing information about available fields and field types.

Code

function field_info_storage_types($storage_type = NULL) {
  $info = _field_info_collate_types();
  $storage_types = $info['storage types'];
  if ($storage_type) {
    if (isset($storage_types[$storage_type])) {
      return $storage_types[$storage_type];
    }
  }
  else {
    return $storage_types;
  }
}