Same name and namespace in other branches
- 8.x-1.x easy_breadcrumb.install \easy_breadcrumb_update_8002() 1 comment
Implements hook_update().
Update home_segment_keep config from integer to boolean.
File
-
./
easy_breadcrumb.install, line 25
Code
function easy_breadcrumb_update_8002() {
$config = \Drupal::configFactory()->getEditable(EasyBreadcrumbConstants::MODULE_SETTINGS);
$home_segment_keep = $config->get(EasyBreadcrumbConstants::HOME_SEGMENT_KEEP);
// If the setting is enabled, store it as TRUE.
if ($home_segment_keep === 1) {
$config->set(EasyBreadcrumbConstants::HOME_SEGMENT_KEEP, TRUE);
}
else {
$config->set(EasyBreadcrumbConstants::HOME_SEGMENT_KEEP, FALSE);
}
$config->save();
}