function background_image_inline_entity_form_entity_form_alter in Background Image 2.0.x
Same name and namespace in other branches
- 8 background_image.module \background_image_inline_entity_form_entity_form_alter()
- 2.x background_image.module \background_image_inline_entity_form_entity_form_alter()
Implements hook_inline_entity_form_entity_form_alter().
File
- ./
background_image.module, line 72 - Background Image module's procedural hooks and functions.
Code
function background_image_inline_entity_form_entity_form_alter(&$entity_form, FormStateInterface $form_state) {
$entity = $entity_form['#entity'];
if ($entity instanceof BackgroundImageInterface) {
BackgroundImageForm::create($entity, $form_state
->getCompleteForm(), $form_state, $entity_form)
->build();
}
}