You are here

protected function DashboardBlockBase::getCustomConfigByKey in Content Planner 8

Get custom config.

Parameters

array $block_configuration: The block plugin configuration.

string $key: The config key.

mixed $default_value: The default value to return if key does not exist in the specific configuration.

Return value

mixed|null The config value or NULL.

8 calls to DashboardBlockBase::getCustomConfigByKey()
ContentStateStatistic::build in modules/content_kanban/src/Plugin/DashboardBlock/ContentStateStatistic.php
Build the block and return a renderable array.
ContentStateStatistic::getConfigSpecificFormFields in modules/content_kanban/src/Plugin/DashboardBlock/ContentStateStatistic.php
Add additonal form elements specific to the Plugin.
RecentCalendarPublicationsBlock::build in modules/content_calendar/src/Plugin/DashboardBlock/RecentCalendarPublicationsBlock.php
Build the block and return a renderable array.
RecentCalendarPublicationsBlock::getConfigSpecificFormFields in modules/content_calendar/src/Plugin/DashboardBlock/RecentCalendarPublicationsBlock.php
Add additonal form elements specific to the Plugin.
RecentKanbanActivities::build in modules/content_kanban/src/Plugin/DashboardBlock/RecentKanbanActivities.php
Build the block and return a renderable array.

... See full list

File

src/DashboardBlockBase.php, line 127

Class

DashboardBlockBase
Implements DashboardBlockBase.

Namespace

Drupal\content_planner

Code

protected function getCustomConfigByKey(array $block_configuration, $key, $default_value = NULL) {

  // If a given key exists in the plugin specific configuration, then return
  // it.
  if (array_key_exists($key, $block_configuration['plugin_specific_config'])) {
    return $block_configuration['plugin_specific_config'][$key];
  }
  return $default_value;
}