You are here

readonlymode.post_update.php in Read only mode 2.0.x

Same filename and directory in other branches
  1. 8 readonlymode.post_update.php

Post update functions for Readonly mode.

File

readonlymode.post_update.php
View source
<?php

/**
 * @file
 * Post update functions for Readonly mode.
 */

/**
 * Update config after form alter implementation is removed.
 */
function readonlymode_post_update_no_form_alter() {
  $config = \Drupal::configFactory()
    ->getEditable('readonlymode.settings');
  $data = array_filter($config
    ->get(), function ($key) {
    return $key === 'messages' || strpos($key, '_core') === 0;
  }, ARRAY_FILTER_USE_KEY);
  $config
    ->setData($data);
  $config
    ->save();
}

Functions

Namesort descending Description
readonlymode_post_update_no_form_alter Update config after form alter implementation is removed.