Mercurial > hg > cmmr2012-drupal-site
diff core/modules/action/action.post_udate.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/modules/action/action.post_udate.php Thu May 09 15:34:47 2019 +0100 @@ -0,0 +1,24 @@ +<?php + +/** + * @file + * Post update functions for Action module. + */ + +use Drupal\Core\Config\Entity\ConfigEntityUpdater; +use Drupal\system\ActionConfigEntityInterface; + +/** + * Moves action plugins to core. + */ +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); + }); +}