Mercurial > hg > isophonics-drupal-site
comparison core/modules/system/system.post_update.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
79 * @see https://www.drupal.org/node/2403703 | 79 * @see https://www.drupal.org/node/2403703 |
80 */ | 80 */ |
81 function system_post_update_field_type_plugins() { | 81 function system_post_update_field_type_plugins() { |
82 // Empty post-update hook. | 82 // Empty post-update hook. |
83 } | 83 } |
84 | |
85 /** | |
86 * Clear caches due to schema changes in core.entity.schema.yml. | |
87 */ | |
88 function system_post_update_field_formatter_entity_schema() { | |
89 // Empty post-update hook. | |
90 } | |
91 | |
92 /** | |
93 * Change plugin IDs of actions. | |
94 */ | |
95 function system_post_update_change_action_plugins() { | |
96 $old_new_action_id_map = [ | |
97 'comment_publish_action' => 'entity:publish_action:comment', | |
98 'comment_unpublish_action' => 'entity:unpublish_action:comment', | |
99 'comment_save_action' => 'entity:save_action:comment', | |
100 'node_publish_action' => 'entity:publish_action:node', | |
101 'node_unpublish_action' => 'entity:unpublish_action:node', | |
102 'node_save_action' => 'entity:save_action:node', | |
103 ]; | |
104 | |
105 /** @var \Drupal\system\Entity\Action[] $actions */ | |
106 $actions = \Drupal::entityTypeManager()->getStorage('action')->loadMultiple(); | |
107 foreach ($actions as $action) { | |
108 if (isset($old_new_action_id_map[$action->getPlugin()->getPluginId()])) { | |
109 $action->setPlugin($old_new_action_id_map[$action->getPlugin()->getPluginId()]); | |
110 $action->save(); | |
111 } | |
112 } | |
113 } |