Mercurial > hg > isophonics-drupal-site
annotate core/modules/action/action.post_udate.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | af1871eacc83 |
children |
rev | line source |
---|---|
Chris@18 | 1 <?php |
Chris@18 | 2 |
Chris@18 | 3 /** |
Chris@18 | 4 * @file |
Chris@18 | 5 * Post update functions for Action module. |
Chris@18 | 6 */ |
Chris@18 | 7 |
Chris@18 | 8 use Drupal\Core\Config\Entity\ConfigEntityUpdater; |
Chris@18 | 9 use Drupal\system\ActionConfigEntityInterface; |
Chris@18 | 10 |
Chris@18 | 11 /** |
Chris@18 | 12 * Moves action plugins to core. |
Chris@18 | 13 */ |
Chris@18 | 14 function action_post_update_move_plugins(&$sandbox = NULL) { |
Chris@18 | 15 $resave_ids = [ |
Chris@18 | 16 'action_goto_action', |
Chris@18 | 17 'action_message_action', |
Chris@18 | 18 'action_send_email_action', |
Chris@18 | 19 ]; |
Chris@18 | 20 \Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'action', function (ActionConfigEntityInterface $action) use ($resave_ids) { |
Chris@18 | 21 // Save entity to recalculate dependencies. |
Chris@18 | 22 return $action->isConfigurable() && in_array($action->getPlugin()->getPluginId(), $resave_ids, TRUE); |
Chris@18 | 23 }); |
Chris@18 | 24 } |