You are here

public function WorkbenchContentController::getSettings in Workbench 8

Gets the content settings and prepares views information.

3 calls to WorkbenchContentController::getSettings()
WorkbenchContentController::allContent in src/Controller/WorkbenchContentController.php
Page callback for the workbench content page.
WorkbenchContentController::content in src/Controller/WorkbenchContentController.php
Page callback for the workbench content page.
WorkbenchContentController::editedContent in src/Controller/WorkbenchContentController.php
Page callback for the workbench content page.

File

src/Controller/WorkbenchContentController.php, line 173

Class

WorkbenchContentController
Generates the pages defined by Workbench.

Namespace

Drupal\workbench\Controller

Code

public function getSettings() {
  $config = $this
    ->config('workbench.settings');
  $items = [
    'overview_left' => $this
      ->t('Overview block left'),
    'overview_right' => $this
      ->t('Overview block right'),
    'overview_main' => $this
      ->t('Overview block main'),
    'edits_main' => $this
      ->t('My edits main'),
    'all_main' => $this
      ->t('All content main'),
  ];
  foreach ($items as $key => $item) {
    $setting = $config
      ->get($key);
    $data = explode(':', $setting);
    $settings[$key]['view_id'] = $data[0];
    $settings[$key]['display_id'] = $data[1];
  }
  return $settings;
}