public function MegaMenuConfig::getBlockConfig in The Better Mega Menu 2.x
Same name and namespace in other branches
- 8 src/Entity/MegaMenuConfig.php \Drupal\tb_megamenu\Entity\MegaMenuConfig::getBlockConfig()
Overrides MegaMenuConfigInterface::getBlockConfig
See also
\Drupal\tb_megamenu\MegaMenuConfigInterface::getBlockConfig()
File
- src/
Entity/ MegaMenuConfig.php, line 118
Class
- MegaMenuConfig
- Defines the Mega Menu Configuration entity.
Namespace
Drupal\tb_megamenu\EntityCode
public function getBlockConfig() {
if (is_array($this->block_config)) {
$this
->setBlockConfig($this->block_config);
\Drupal::logger('tb_megamenu')
->info("Converted block config array to json string.");
}
$config = isset($this->block_config) ? Json::decode($this->block_config) : [];
if ($config === NULL) {
\Drupal::logger('tb_megamenu')
->warning("Could not decode block config json string for @id", [
'@id' => $this->id,
]);
$config = [];
}
return $config;
}