function modal_page_update_40006 in Modal 4.1.x
Same name and namespace in other branches
- 4.0.x modal_page.install \modal_page_update_40006()
Insert Modal Display Title enabled by default and button X enabled as well.
File
- ./
modal_page.install, line 461 - Install, update and uninstall functions for the Modal Page.
Code
function modal_page_update_40006() {
// Load all Modals.
$modals = \Drupal::entityTypeManager()
->getStorage('modal')
->loadMultiple();
foreach ($modals as $modal) {
// Set Display Title as TRUE by default.
$modal
->setDisplayTitle(TRUE);
// Set Display Button X as TRUE by default.
$modal
->setDisplayButtonXclose(TRUE);
// Modal Save.
$modal
->save();
}
}