You are here

function entity_block_target_bundle_form_callback in Entity Blocks 7

AJAX callback to render the target_bundle, target_view_mode and target_entity_id fields.

Return value

array A renderable array representing the target_bundle, target_view_mode and target_entity_id fields.

1 string reference to 'entity_block_target_bundle_form_callback'
entity_block_form in ./entity_block.module
Returns the form for adding an entity block.

File

./entity_block.module, line 363
Display entities (via view modes) as fieldable blocks.

Code

function entity_block_target_bundle_form_callback($form, &$form_state) {
  return array(
    '#type' => 'ajax',
    '#commands' => array(
      ajax_command_replace("#entity-block-target-bundle", render($form['target_bundle'])),
      ajax_command_replace("#entity-block-target-view-mode", render($form['target_view_mode'])),
      ajax_command_replace("#entity-block-target-entity-id", render($form['target_entity_id'])),
    ),
  );
}