agreement.post_update.php in Agreement 8.2
Same filename and directory in other branches
Agreement module post-updates.
File
agreement.post_update.phpView source
<?php
/**
* @file
* Agreement module post-updates.
*/
use Drupal\Core\Config\Entity\ConfigEntityUpdater;
/**
* Fixes translatable schema types from "string" to "label".
*/
function agreement_post_update_fix_translatable_schema(&$sandbox = NULL) {
if (\Drupal::moduleHandler()
->moduleExists('agreement')) {
// Saving each agreement should be enough.
\Drupal::classResolver(ConfigEntityUpdater::class)
->update($sandbox, 'agreement');
return t('Updated all agreements.');
}
return NULL;
}
Functions
Name![]() |
Description |
---|---|
agreement_post_update_fix_translatable_schema | Fixes translatable schema types from "string" to "label". |