function field_attach_create_bundle

Notify field.module that a new bundle was created.

The default SQL-based storage doesn't need to do anything about it, but others might.


$entity_type: The entity type to which the bundle is bound.

$bundle: The name of the newly created bundle.

Related topics

4 calls to field_attach_create_bundle()
field_test_create_bundle in drupal/modules/field/tests/
Creates a new bundle for test_entity entities.
node_type_save in drupal/modules/node/node.module
Saves a node type to the database.
taxonomy_vocabulary_save in drupal/modules/taxonomy/taxonomy.module
Saves a vocabulary.
_comment_body_field_create in drupal/modules/comment/comment.module
Creates a comment_body field instance for a given node type.


drupal/modules/field/, line 1342
Field attach API, allowing entities (nodes, users, ...) to be 'fieldable'.


function field_attach_create_bundle($entity_type, $bundle) {

  // Clear the cache.

  // Let other modules act on creating the bundle.
  module_invoke_all('field_attach_create_bundle', $entity_type, $bundle);