You are here

activity_logger.post_update.php in Open Social 10.1.x

Post update hooks for this module.

File

modules/custom/activity_logger/activity_logger.post_update.php
View source
<?php

/**
 * @file
 * Post update hooks for this module.
 */

/**
 * Update message template settings based on configuration schema metadata.
 */
function activity_logger_post_update_apply_schema_changes() {

  /** @var \Drupal\message\MessageTemplateInterface[] $message_templates */
  $message_templates = \Drupal::entityTypeManager()
    ->getStorage('message_template')
    ->loadMultiple();

  // Resaving all the messages should be enough, the schema was built to fit
  // the messages.
  foreach ($message_templates as $message_template) {
    $message_template
      ->save();
  }
}

Functions

Namesort descending Description
activity_logger_post_update_apply_schema_changes Update message template settings based on configuration schema metadata.