function lightning_workflow_update_8004 in Lightning Workflow 8
Same name and namespace in other branches
- 8.3 lightning_workflow.install \lightning_workflow_update_8004()
- 8.2 lightning_workflow.install \lightning_workflow_update_8004()
Removes the latest_revision__node relationship from the content view.
File
- ./
lightning_workflow.install, line 84 - Contains installation and update routines for Lightning Workflow.
Code
function lightning_workflow_update_8004() {
$config = \Drupal::configFactory()
->getEditable('views.view.content');
if ($config
->isNew()) {
return;
}
foreach (array_keys($config
->get('display')) as $display_id) {
$config
->clear("display.{$display_id}.display_options.relationships.latest_revision__node");
$config
->clear("display.{$display_id}.display_options.fields.forward_revision_exists");
}
$config
->save();
}