function panopoly_update_8001 in Panopoly 8.2
Enables Panopoly Search.
File
- ./
panopoly.install, line 75 - Install, update and uninstall hooks.
Code
function panopoly_update_8001() {
if (!\Drupal::moduleHandler()
->moduleExists('panopoly_search')) {
/** @var \Drupal\Core\Extension\ModuleInstallerInterface $module_installer */
$module_installer = \Drupal::service("module_installer");
$module_installer
->install([
'panopoly_search',
]);
}
$role = Role::load(Role::ANONYMOUS_ID);
$role
->grantPermission('use panopoly_search');
$role
->save();
}