/** * Implements hook_post_update_NAME(). */ function {{ machine_name }}_post_update_NAME(&$sandbox) { // Example of updating some content. $node = \Drupal\node\Entity\Node::load(123); $node->setTitle('foo'); $node->save(); $result = t('Node %nid saved', ['%nid' => $node->id()]); // Example of updating some config. if (\Drupal::moduleHandler()->moduleExists('taxonomy')) { // Update the dependencies of all Vocabulary configuration entities. \Drupal::classResolver(\Drupal\Core\Config\Entity\ConfigEntityUpdater::class)->update($sandbox, 'taxonomy_vocabulary'); } return $result; }