mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-26 01:07:29 +02:00
Copie du site du TFJM² à adapter aux Correspondances
This commit is contained in:
41
server_files/classes/ValidationStatus.php
Normal file
41
server_files/classes/ValidationStatus.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
class ValidationStatus
|
||||
{
|
||||
const NOT_READY = 0;
|
||||
const WAITING = 1;
|
||||
const VALIDATED = 2;
|
||||
|
||||
public static function getTranslatedName($status) {
|
||||
switch ($status) {
|
||||
case self::WAITING:
|
||||
return "En attente de validation";
|
||||
case self::VALIDATED:
|
||||
return "Inscription validée";
|
||||
default:
|
||||
return "Inscription non terminée";
|
||||
}
|
||||
}
|
||||
|
||||
public static function getName($status) {
|
||||
switch ($status) {
|
||||
case self::WAITING:
|
||||
return "WAITING";
|
||||
case self::VALIDATED:
|
||||
return "VALIDATED";
|
||||
default:
|
||||
return "NOT_READY";
|
||||
}
|
||||
}
|
||||
|
||||
public static function fromName($name) {
|
||||
switch ($name) {
|
||||
case "WAITING":
|
||||
return self::WAITING;
|
||||
case "VALIDATED":
|
||||
return self::VALIDATED;
|
||||
default:
|
||||
return self::NOT_READY;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user