function paragraphs_update_8011 in Paragraphs 8
Make the behavior plugins field of Paragraphs revisionable.
File
- ./
paragraphs.install, line 198 - Installation hooks for Paragraphs module.
Code
function paragraphs_update_8011() {
\Drupal::database()
->update('paragraphs_item_field_data')
->fields([
'behavior_settings' => NULL,
])
->execute();
/** @var \Drupal\Core\Field\BaseFieldDefinition $storage_definition */
$storage_definition = \Drupal::entityDefinitionUpdateManager()
->getFieldStorageDefinition('behavior_settings', 'paragraph');
$storage_definition
->setRevisionable(TRUE);
\Drupal::entityDefinitionUpdateManager()
->updateFieldStorageDefinition($storage_definition);
}