You are here

public function LearningPathMembershipController::createMembersFormModal in Opigno Learning path 8

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

Callback for opening the create members modal form.

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

File

src/Controller/LearningPathMembershipController.php, line 63

Class

LearningPathMembershipController
Controller for the actions related to LP membership.

Namespace

Drupal\opigno_learning_path\Controller

Code

public function createMembersFormModal() {
  $form = $this->formBuilder
    ->getForm('Drupal\\opigno_learning_path\\Form\\LearningPathCreateMemberForm');
  $command = new OpenModalDialogCommand($this
    ->t('Create new members'), $form);
  $response = new AjaxResponse();
  $response
    ->addCommand($command);
  return $response;
}