function field_test_field_storage_create_field

Implements hook_field_storage_create_field().

File

modules/field/tests/field_test.storage.inc, line 265

Code

function field_test_field_storage_create_field($field) {
    if ($field['storage']['type'] == 'field_test_storage_failure') {
        throw new Exception('field_test_storage_failure engine always fails to create fields');
    }
    $data = _field_test_storage_data();
    $data[$field['id']] = array(
        'current' => array(),
        'revisions' => array(),
    );
    _field_test_storage_data($data);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.