function smart_date_update_8301 in Smart Date 3.0.x
Same name and namespace in other branches
- 3.1.x smart_date.install \smart_date_update_8301()
- 3.2.x smart_date.install \smart_date_update_8301()
- 3.3.x smart_date.install \smart_date_update_8301()
- 3.4.x smart_date.install \smart_date_update_8301()
Set site_time_toggle value on Smart Date Formats to match previous behaviour.
File
- ./
smart_date.install, line 99
Code
function smart_date_update_8301() {
$format_storage = \Drupal::entityTypeManager()
->getStorage('smart_date_format');
$formats = $format_storage
->loadMultiple(NULL);
foreach ($formats as $format) {
$format
->set('site_time_toggle', 1);
$format
->save();
}
}