You are here

function workbench_access_process_inline_entity_form in Workbench Access 8

Process callback for inline entity form.

1 string reference to 'workbench_access_process_inline_entity_form'
workbench_access_element_info_alter in ./workbench_access.module
Implements hook_element_info_alter().

File

./workbench_access.module, line 199
Contains workbench_access.module.

Code

function workbench_access_process_inline_entity_form(array &$element, FormStateInterface $form_state, &$complete_form) {
  $entity = $element['#entity'];
  if (!$entity instanceof ContentEntityInterface) {
    return $element;
  }
  return \Drupal::classResolver()
    ->getInstanceFromDefinition(FormAlterHelper::class)
    ->alterForm($element, $complete_form, $form_state, $entity);
}