content_translation.post_update.php
Same filename and directory in other branches
Post update functions for Content Translation.
File
-
core/
modules/ content_translation/ content_translation.post_update.php
View source
<?php
/**
* @file
* Post update functions for Content Translation.
*/
use Drupal\Core\Config\Entity\ConfigEntityUpdater;
use Drupal\Core\Field\FieldConfigInterface;
/**
* Update content_translated configuration for base_field_override entities.
*/
function content_translation_post_update_resave_base_field_overrides(array &$sandbox) : void {
/** @var \Drupal\Core\Config\Entity\ConfigEntityUpdater $config_updater */
$config_updater = \Drupal::classResolver(ConfigEntityUpdater::class);
$config_updater->update($sandbox, 'base_field_override', function (FieldConfigInterface $field) {
// Resave base field overrides that have content translation enabled.
return (bool) $field->getThirdPartySettings('content_translation');
}, TRUE);
}
Functions
| Title | Deprecated | Summary |
|---|---|---|
| content_translation_post_update_resave_base_field_overrides | Update content_translated configuration for base_field_override entities. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.