You are here

public function BlockService::getDefaultDashboardConfig in Opigno dashboard 3.x

Get the default dashboard configuration.

Return value

string The default dashboard configuration.

Overrides BlockServiceInterface::getDefaultDashboardConfig

1 call to BlockService::getDefaultDashboardConfig()
BlockService::getPositioning in src/BlockService.php
Returns positioning.

File

src/BlockService.php, line 277

Class

BlockService
The dashboard block manager service definition.

Namespace

Drupal\opigno_dashboard

Code

public function getDefaultDashboardConfig() : string {

  // Return the default dashboard layout depending on whether Opigno Social
  // module is enabled or not.
  return $this
    ->isSocialFeatureEnabled() ? '{"1":[{"admin_label":"User statistics","context_definitions":[],"id":"opigno_user_stats_block"},{"admin_label":"User connections","context_definitions":[],"id":"opigno_user_connections_block"},{"admin_label":"Latest active trainings","id":"views_block:latest_active_trainings-block","mandatory":false},{"admin_label":"Who is new","context_definitions":[],"id":"views_block:who_s_new-block_1"}],"2":[{"admin_label":"Social wall","context_definitions":[],"id":"opigno_social_wall_block"}],"3":[{"admin_label":"Opigno calendar block","id":"views_block:opigno_calendar-month_block","mandatory":false},{"admin_label":"Who is online","context_definitions":[],"id":"views_block:who_s_online-who_s_online_block"}]}' : '{"1":[{"admin_label":"Latest active trainings","id":"views_block:latest_active_trainings-block"}, {"admin_label":"Private Message: Dashboard - Last Threads","id":"views_block:private_message-block_dashboard"}],"2":[{"admin_label":"Opigno calendar block","id":"views_block:opigno_calendar-month_block"},{"admin_label":"Opigno Notifications: Dashboard - Unread Notifications","id":"views_block:opigno_notifications-block_unread_dashboard"},{"admin_label":"Recent comments","id":"views_block:comments_recent-block_1"}],"3":[]}';
}