You are here

function group_pathauto_update_alias_multiple in Group 7

Update the URL aliases for multiple groups.

Parameters

array $gids: An array of group IDs.

string $op: Operation being performed on the nodes ('insert', 'update' or 'bulkupdate').

array $options: (optional) An array of additional options.

1 call to group_pathauto_update_alias_multiple()
group_pathauto_bulk_update_batch_process in ./group.pathauto.inc
Batch processing callback; Generate aliases for groups.
1 string reference to 'group_pathauto_update_alias_multiple'
group_group_operations in ./group.group.inc
Implements hook_group_operations().

File

./group.pathauto.inc, line 114
Hook implementations for the Pathauto module.

Code

function group_pathauto_update_alias_multiple(array $gids, $op, array $options = array()) {
  $options += array(
    'message' => FALSE,
  );
  $groups = group_load_multiple($gids);
  foreach ($groups as $group) {
    group_pathauto_update_alias($group, $op);
  }
  if (!empty($options['message'])) {
    drupal_set_message(format_plural(count($gids), 'Updated URL alias for 1 group.', 'Updated URL aliases for @count groups.'));
  }
}