miniorange_2faController.php in Google Authenticator / 2 Factor Authentication - 2FA 8
File
src/Controller/miniorange_2faController.php
View source
<?php
namespace Drupal\miniorange_2fa\Controller;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Ajax\AjaxResponse;
use Drupal\Core\Ajax\OpenModalDialogCommand;
use Drupal\Core\Form\formBuilder;
use Drupal\Core\Controller\ControllerBase;
class miniorange_2faController extends ControllerBase {
public function saml_login() {
}
public function saml_logout() {
}
protected $formBuilder;
public function __construct(FormBuilder $formBuilder) {
$this->formBuilder = $formBuilder;
}
public static function create(ContainerInterface $container) {
return new static($container
->get("form_builder"));
}
public function openModalForm() {
$response = new AjaxResponse();
$modal_form = $this->formBuilder
->getForm('\\Drupal\\miniorange_2fa\\Form\\miniorange_2fa_RemoveLicense');
$response
->addCommand(new OpenModalDialogCommand('Remove Account', $modal_form, [
'width' => '800',
]));
return $response;
}
}