You are here

public function AssetInlineEntityFormController::entityForm in Asset 7

Returns the entity form to be shown through the IEF widget.

When adding data to $form_state it should be noted that there can be several IEF widgets on one master form, each with several form rows, leading to possible key collisions if the keys are not prefixed with $entity_form['#parents'].

Parameters

$entity_form: The entity form.

$form_state: The form state of the parent form.

Overrides EntityInlineEntityFormController::entityForm

File

includes/asset.inline_entity_form.inc, line 25
Defines the asset inline entity form controller.

Class

AssetInlineEntityFormController
@file Defines the asset inline entity form controller.

Code

public function entityForm($entity_form, &$form_state) {
  $asset = $entity_form['#entity'];
  module_load_include('inc', 'asset', 'includes/asset.admin');
  return asset_base_form($entity_form, $form_state, $asset);
}