You are here

function entityconnect_module_implements_alter in Entity connect 7

Same name and namespace in other branches
  1. 7.2 entityconnect.module \entityconnect_module_implements_alter()

Implements hook_module_implements_alter().

Ensure entityconnect gets called after workbench_moderation when altering the node form

Parameters

array $module_list:

string $context:

File

./entityconnect.module, line 380
Handles the main hooks used by entityconnect.

Code

function entityconnect_module_implements_alter(&$module_list, $context) {

  // Need to override both to get correct sort order.
  // @see: https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_module_implements_alter/7
  if ($context == 'form_node_form_alter' || $context == 'form_alter') {

    // Move entityconnect implementation to the end of the list to ensure it gets called last.
    $group = isset($module_list['entityconnect']) ? $module_list['entityconnect'] : FALSE;
    unset($module_list['entityconnect']);
    $module_list['entityconnect'] = $group;
  }
}