You are here

public function DashboardController::getBlocksContents in Opigno dashboard 8

Same name and namespace in other branches
  1. 3.x src/Controller/DashboardController.php \Drupal\opigno_dashboard\Controller\DashboardController::getBlocksContents()

Returns blocks contents.

1 string reference to 'DashboardController::getBlocksContents'
opigno_dashboard.routing.yml in ./opigno_dashboard.routing.yml
opigno_dashboard.routing.yml

File

src/Controller/DashboardController.php, line 192

Class

DashboardController
Controller for all the actions of the Learning Path manager app.

Namespace

Drupal\opigno_dashboard\Controller

Code

public function getBlocksContents() {
  $blocks = \Drupal::service('opigno_dashboard.block')
    ->getDashboardBlocksContents();
  return new JsonResponse([
    'blocks' => $blocks,
  ], Response::HTTP_OK);
}