You are here

function entity_translation_unified_form_module_implements_alter in Entity Translation Unified Form 8

Place our form_alter at the end (after content_translation) to prevent bad interaction with this module (title problems)

File

./entity_translation_unified_form.module, line 26

Code

function entity_translation_unified_form_module_implements_alter(&$implementations, $hook) {
  if ($hook == 'form_alter' && isset($implementations['entity_translation_unified_form'])) {

    // Move this module's implementation of form_alter to the end of the list.
    // We are doing this so that the form_node_page_form_alter
    // function is called AFTER ContentTranslationHandler::entityFormAlter
    // which contains the code we are trying to alter.
    $hookInit = $implementations['entity_translation_unified_form'];
    unset($implementations['entity_translation_unified_form']);
    $implementations['entity_translation_unified_form'] = $hookInit;
  }
}