function ds_update_8001 in Display Suite 8.3
Same name and namespace in other branches
- 8.4 ds.install \ds_update_8001()
- 8.2 ds.install \ds_update_8001()
Disable adding entity, bundle, view mode classes per display.
File
- ./
ds.install, line 20 - Display Suite install file.
Code
function ds_update_8001() {
/** @var \Drupal\Core\Entity\Display\EntityDisplayInterface $display */
foreach (EntityViewDisplay::loadMultiple() as $display) {
$ds = $display
->getThirdPartySetting('ds', 'layout');
if (!empty($ds)) {
$ds['entity_classes'] = 'old_view_mode';
$display
->setThirdPartySetting('ds', 'layout', $ds)
->save();
}
}
}