field_attach_create_bundle

Versions
7
field_attach_create_bundle($obj_type, $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.

Parameters

$obj_type The object type to which the bundle is bound.

$bundle The name of the newly created bundle.

Related topics

▾ 6 functions call field_attach_create_bundle()

comment_node_type_insert in modules/comment/comment.module
Implement hook_node_type_insert().
comment_update_7005 in modules/comment/comment.install
Create comment Field API bundles.
field_test_create_bundle in modules/field/tests/field_test.entity.inc
Creates a new bundle for test_entity objects.
node_type_save in modules/node/node.module
Saves a node type to the database.
taxonomy_update_7002 in modules/taxonomy/taxonomy.install
Add vocabulary machine_name column.
taxonomy_vocabulary_save in modules/taxonomy/taxonomy.module
Save a vocabulary given a vocabulary object.

Code

modules/field/field.attach.inc, line 1296

<?php
function field_attach_create_bundle($obj_type, $bundle) {
  // Clear the cache.
  field_cache_clear();

  // Let other modules act on creating the bundle.
  module_invoke_all('field_attach_create_bundle', $obj_type, $bundle);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.