You are here

public function LearningPathMembershipController::addUserToTrainingAutocomplete in Opigno Learning path 3.x

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

Returns response for the autocompletion.

Return value

\Symfony\Component\HttpFoundation\JsonResponse

1 string reference to 'LearningPathMembershipController::addUserToTrainingAutocomplete'
opigno_learning_path.routing.yml in ./opigno_learning_path.routing.yml
opigno_learning_path.routing.yml

File

src/Controller/LearningPathMembershipController.php, line 207

Class

LearningPathMembershipController
Controller for the actions related to LP membership.

Namespace

Drupal\opigno_learning_path\Controller

Code

public function addUserToTrainingAutocomplete(Group $group) {
  [
    $matches,
    $default,
  ] = $this
    ->addUserToTrainingAutocompleteSelect($group);
  return new JsonResponse($matches);
}