Super-trivial :)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir’s picture

Title: Incorrect $entity @param on hook_field_attach_create_bundle() » Incorrect @param $entity on hook_field_attach_create_bundle()
swentel’s picture

Title: Incorrect @param $entity on hook_field_attach_create_bundle() » Incorrect $entity @param on hook_field_attach_create_bundle()
+++ b/core/modules/field/field.api.phpundefined
@@ -1203,7 +1203,7 @@ function hook_field_available_languages_alter(&$langcodes, $context) {
  *   the entity with fields to process.

Should be something like 'The name of the bundle' :)

swentel’s picture

Title: Incorrect $entity @param on hook_field_attach_create_bundle() » Incorrect @param $entity on hook_field_attach_create_bundle()

Cross post

swentel’s picture

FileSize
617 bytes

Updated

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

Oh, right :) Looks good.

webchick’s picture

Component: entity system » documentation
Status: Reviewed & tested by the community » Needs work

Moving to the docs component, and these days we need a datatype on @params and @returns.

swentel’s picture

Status: Needs work » Needs review
FileSize
738 bytes
Berdir’s picture

Status: Needs review » Reviewed & tested by the community

Good :)

jhodgdon’s picture

Assigned: Unassigned » jhodgdon

Thanks! I'll get that committed shortly.

jhodgdon’s picture

Version: 8.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed to 8.x. Does this need a port to 7.x? If not, please change back to 8.x/fixed. Thanks!

lyricnz’s picture

Status: Patch (to be ported) » Closed (fixed)

In D7 field.api.php hook_field_attach_create_bundle() actually says "See field_attach_create_bundle() for details and arguments.". In field_attach_create_bundle() it is correctly referred to as "$bundle" in the comments:

/**
 *...
 * @param $entity_type
 *   The entity type to which the bundle is bound.
 * @param $bundle
 *   The name of the newly created bundle.
 */
function field_attach_create_bundle($entity_type, $bundle) {