function facets_update_8006 in Facets 8
Update facet blocks configuration with a block id used for AJAX support.
File
- ./
facets.install, line 176 - Update hooks for the facets module.
Code
function facets_update_8006() {
$query = \Drupal::entityQuery('block')
->condition('plugin', 'facet_block', 'STARTS_WITH')
->execute();
foreach ($query as $block_id) {
$block = Block::load($block_id);
$configuration = $block
->get('settings');
$configuration['block_id'] = $block_id;
$block
->set('settings', $configuration);
$block
->save();
}
}