You are here

function entity_embed_dependent_entity_type_bundles_callback in Entity Embed 7.3

Same name and namespace in other branches
  1. 7 plugins/export_ui/entity_embed_ctools_export_ui_form.inc \entity_embed_dependent_entity_type_bundles_callback()
  2. 7.2 plugins/export_ui/entity_embed_ctools_export_ui_form.inc \entity_embed_dependent_entity_type_bundles_callback()

Replaces the entity_type_bundles and submit button form elements.

Return value

array An array of ajax commands which replace the entity_type_bundles and submit button form elemenets.

1 string reference to 'entity_embed_dependent_entity_type_bundles_callback'
entity_embed_ctools_export_ui_form in plugins/export_ui/entity_embed_ctools_export_ui_form.inc
Define the preset add/edit form.

File

plugins/export_ui/entity_embed_ctools_export_ui_form.inc, line 202
Builds the ctools export UI page for configuring embed buttons.

Code

function entity_embed_dependent_entity_type_bundles_callback($form, $form_state) {
  $commands = array();

  // Update options for entity type bundles.
  $commands[] = ajax_command_replace("#bundle-entity-type-wrapper", render($form['entity_type_bundles']));

  // Update options for display plugins.
  $commands[] = ajax_command_replace("#display-plugins-wrapper", render($form['display_plugins']));

  // Update submit button.
  $commands[] = ajax_command_replace("#save-button", render($form['buttons']['submit']));
  return array(
    '#type' => 'ajax',
    '#commands' => $commands,
  );
}