function action_post_update_move_plugins

Same name in other branches
  1. 9 core/modules/action/action.post_update.php \action_post_update_move_plugins()

Moves action plugins to core.

File

core/modules/action/action.post_update.php, line 14

Code

function action_post_update_move_plugins(&$sandbox = NULL) {
    $resave_ids = [
        'action_goto_action',
        'action_message_action',
        'action_send_email_action',
    ];
    \Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'action', function (ActionConfigEntityInterface $action) use ($resave_ids) {
        // Save entity to recalculate dependencies.
        return $action->isConfigurable() && in_array($action->getPlugin()
            ->getPluginId(), $resave_ids, TRUE);
    });
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.