You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
837 B
43 lines
837 B
<?php
|
|
|
|
namespace Controller;
|
|
|
|
use Model\ModelCandidate;
|
|
|
|
/**
|
|
* Permet de controller les réponses à fournir en fonction des actions passer dans l'URL
|
|
* par l'utilisateur
|
|
*/
|
|
class ControllerCandidate
|
|
{
|
|
/**
|
|
* Permet de naviguer jusqu'au formulaire.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function goToForm(): void
|
|
{
|
|
global $rep, $views;
|
|
$html = (new ModelCandidate())->getForm();
|
|
|
|
require_once($rep.$views['form']);
|
|
}
|
|
|
|
/**
|
|
* Permet de finaliser la saisie du formulaire et de le soumettre.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function submitForm(): void
|
|
{
|
|
(new ModelCandidate())->submitForm();
|
|
$this->goToThanks();
|
|
}
|
|
|
|
public function goToThanks(): void
|
|
{
|
|
global $rep, $views;
|
|
require_once($rep.$views['thanks']);
|
|
}
|
|
}
|