Mercurial > hg > cmmr2012-drupal-site
annotate 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 |
rev | line source |
---|---|
Chris@5 | 1 <?php |
Chris@5 | 2 |
Chris@5 | 3 /** |
Chris@5 | 4 * @file |
Chris@5 | 5 * Post update functions for Action module. |
Chris@5 | 6 */ |
Chris@5 | 7 |
Chris@5 | 8 use Drupal\Core\Config\Entity\ConfigEntityUpdater; |
Chris@5 | 9 use Drupal\system\ActionConfigEntityInterface; |
Chris@5 | 10 |
Chris@5 | 11 /** |
Chris@5 | 12 * Moves action plugins to core. |
Chris@5 | 13 */ |
Chris@5 | 14 function action_post_update_move_plugins(&$sandbox = NULL) { |
Chris@5 | 15 $resave_ids = [ |
Chris@5 | 16 'action_goto_action', |
Chris@5 | 17 'action_message_action', |
Chris@5 | 18 'action_send_email_action', |
Chris@5 | 19 ]; |
Chris@5 | 20 \Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'action', function (ActionConfigEntityInterface $action) use ($resave_ids) { |
Chris@5 | 21 // Save entity to recalculate dependencies. |
Chris@5 | 22 return $action->isConfigurable() && in_array($action->getPlugin()->getPluginId(), $resave_ids, TRUE); |
Chris@5 | 23 }); |
Chris@5 | 24 } |