You are here

public function LearningPathContentController::getModuleActivities in Opigno Learning path 3.x

Same name and namespace in other branches
  1. 8 src/Controller/LearningPathContentController.php \Drupal\opigno_learning_path\Controller\LearningPathContentController::getModuleActivities()

This method is called on learning path load.

It returns all the activities with the module.

1 string reference to 'LearningPathContentController::getModuleActivities'
opigno_learning_path.routing.yml in ./opigno_learning_path.routing.yml
opigno_learning_path.routing.yml

File

src/Controller/LearningPathContentController.php, line 353

Class

LearningPathContentController
Controller for all the actions of the Learning Path content.

Namespace

Drupal\opigno_learning_path\Controller

Code

public function getModuleActivities(OpignoModule $opigno_module) {
  $activities = $this
    ->getModuleActivitiesEntities($opigno_module);

  // Return all the contents in JSON format.
  return new JsonResponse($activities, Response::HTTP_OK);
}