public function DashboardSettingsService::saveBlockConfiguration in Content Planner 8
Save configuration of a specific block.
Parameters
string $block_id: The block id to save the config for.
array $configuration: The config to save.
Return value
bool TRUE if config was found and saved, FALSE otherwise.
File
- src/
DashboardSettingsService.php, line 93
Class
- DashboardSettingsService
- Class DashboardSettingsService.
Namespace
Drupal\content_plannerCode
public function saveBlockConfiguration($block_id, array $configuration) {
if ($block_configurations = $this
->getBlockConfigurations()) {
if (array_key_exists($block_id, $block_configurations)) {
$block_configurations[$block_id] = $configuration;
$this
->saveBlockConfigurations($block_configurations);
return TRUE;
}
}
return FALSE;
}