You are here

function profile_post_update_change_delete_action_plugin in Profile 8

Change the plugin ID of the delete action.

File

./profile.post_update.php, line 18
Post update functions for Profile.

Code

function profile_post_update_change_delete_action_plugin() {
  $action_storage = \Drupal::entityTypeManager()
    ->getStorage('action');
  $action = $action_storage
    ->load('profile_delete_action');
  if ($action instanceof Action) {
    $action
      ->setPlugin('entity:delete_action:profile');
    $action
      ->save();
  }
}