API page: http://api.drupal.org/api/drupal/modules%21field%21field.api.php/functio...

Enter a descriptive title (above) relating to hook_field_attach_delete_bundle, then describe the problem you have found:

> $bundle: The bundle that was just deleted.

Is that a bundle machine name or an array? It's ambiguous.

Looking at the invoker, it seems to be a string:

// Clear bundle display settings.
  variable_del('field_bundle_settings_' . $entity_type . '__' . $bundle);

  // Let other modules act on deleting the bundle.
  module_invoke_all('field_attach_delete_bundle', $entity_type, $bundle, $instances);

TBH the parameter could possibly do to be renamed $bundle_name, as that's used elsewhere in core when a bundle string is meant.

Comments

swentel’s picture

Status: Active » Closed (fixed)

This hook is gone now, see https://drupal.org/node/1964766

joachim’s picture

Version: 8.x-dev » 7.x-dev
Status: Closed (fixed) » Active
Issue tags: -Needs backport to D7

Presumably still on D7 though?

jhodgdon’s picture

Issue tags: +Novice

Yes, still in 7, and I agree it's a string as it's being used as an array key. I think we should just change the docs to say "The name of the bundle...".

sandykadam’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new553 bytes

Fixed the documentation.

jhodgdon’s picture

Status: Needs review » Needs work
- *   The bundle that was just deleted.
+ *   The name of the bundle.

Sorry! I didn't mean that we should get rid of the "... that was just deleted" part of the documentation. Can you put that back in please?

sandykadam’s picture

Status: Needs work » Needs review
StatusFileSize
new575 bytes

@jhodgdon Fixed the text in new patch

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Thanks! Looks good.

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks again -- committed to 7.x.

sandykadam’s picture

Thanks @jhodgdon

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.