function actions_synchronize

cis7 actions_synchronize($delete_orphans = FALSE)
cle7 actions_synchronize($delete_orphans = FALSE)
elmsmedia7 actions_synchronize($delete_orphans = FALSE)
icor7 actions_synchronize($delete_orphans = FALSE)
meedjum_blog7 actions_synchronize($delete_orphans = FALSE)
mooc7 actions_synchronize($delete_orphans = FALSE)

Synchronizes actions that are provided by modules in hook_action_info().

Actions provided by modules in hook_action_info() implementations are synchronized with actions that are stored in the actions database table. This is necessary so that actions that do not require configuration can receive action IDs.


$delete_orphans: If TRUE, any actions that exist in the database but are no longer found in the code (for example, because the module that provides them has been disabled) will be deleted.

7 calls to actions_synchronize()
admin_menu_toggle_modules in sites/all/modules/ulmus/admin_menu/
Menu callback; Enable/disable developer modules.
drupal_flush_all_caches in includes/
Flushes all cached data on the site.
job_scheduler_trigger_edit_form_submit in sites/all/modules/ulmus/job_scheduler/modules/job_scheduler_trigger/
Submit trigger
system_actions_manage in modules/system/
Menu callback; Displays an overview of available and configured actions.
system_actions_remove_orphans in modules/system/
Remove actions that are in the database but not supported by any enabled module.

... See full list


includes/, line 274
This is the actions engine for executing stored actions.


function actions_synchronize($delete_orphans = FALSE) {
  $actions_in_code = actions_list(TRUE);
  $actions_in_db = db_query("SELECT aid, callback, label FROM {actions} WHERE parameters = ''")->fetchAllAssoc('callback', PDO::FETCH_ASSOC);

  // Go through all the actions provided by modules.
  foreach ($actions_in_code as $callback => $array) {
    // Ignore configurable actions since their instances get put in when the
    // user adds the action.
    if (!$array['configurable']) {
      // If we already have an action ID for this action, no need to assign aid.
      if (isset($actions_in_db[$callback])) {
      else {
        // This is a new singleton that we don't have an aid for; assign one.
          'aid' => $callback,
          'type' => $array['type'],
          'callback' => $callback,
          'parameters' => '',
          'label' => $array['label'],
        watchdog('actions', "Action '%action' added.", array('%action' => $array['label']));

  // Any actions that we have left in $actions_in_db are orphaned.
  if ($actions_in_db) {
    $orphaned = array_keys($actions_in_db);

    if ($delete_orphans) {
      $actions = db_query('SELECT aid, label FROM {actions} WHERE callback IN (:orphaned)', array(':orphaned' => $orphaned))->fetchAll();
      foreach ($actions as $action) {
        watchdog('actions', "Removed orphaned action '%action' from database.", array('%action' => $action->label));
    else {
      $link = l(t('Remove orphaned actions'), 'admin/config/system/actions/orphan');
      $count = count($actions_in_db);
      $orphans = implode(', ', $orphaned);
      watchdog('actions', '@count orphaned actions (%orphans) exist in the actions table. !link', array('@count' => $count, '%orphans' => $orphans, '!link' => $link), WATCHDOG_INFO);



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.