function modal_page_update_40005 in Modal 4.1.x
Same name and namespace in other branches
- 4.0.x modal_page.install \modal_page_update_40005()
Insert Modal Header and Modal footer enabled by default.
File
- ./
modal_page.install, line 440 - Install, update and uninstall functions for the Modal Page.
Code
function modal_page_update_40005() {
// Load all Modals.
$modals = \Drupal::entityTypeManager()
->getStorage('modal')
->loadMultiple();
foreach ($modals as $modal) {
// Set Enable Modal Header as TRUE by default.
$modal
->setEnableModalHeader(TRUE);
// Set Enable Modal footer as TRUE by default.
$modal
->setEnableModalFooter(TRUE);
// Modal Safe.
$modal
->save();
}
}