public function LearningPathAchievementController::training_steps_ajax in Opigno Learning path 3.x
Same name and namespace in other branches
- 8 src/Controller/LearningPathAchievementController.php \Drupal\opigno_learning_path\Controller\LearningPathAchievementController::training_steps_ajax()
Loads steps for a training with a AJAX.
Parameters
\Drupal\group\Entity\Group $group: Group.
Return value
\Drupal\Core\Ajax\AjaxResponse Response.
1 string reference to 'LearningPathAchievementController::training_steps_ajax'
File
- src/
Controller/ LearningPathAchievementController.php, line 1008
Class
- LearningPathAchievementController
- Class LearningPathAchievementController.
Namespace
Drupal\opigno_learning_path\ControllerCode
public function training_steps_ajax(Group $group) {
$selector = '#training_steps_' . $group
->id();
$content = $this
->build_lp_steps($group);
$content['#attributes']['data-ajax-loaded'] = TRUE;
$response = new AjaxResponse();
$response
->addCommand(new ReplaceCommand($selector, $content));
return $response;
}