FEATURE #1359: add status changing (user management)

This commit is contained in:
Michal Kváček
2016-01-24 23:38:34 +01:00
parent f872475752
commit 6af60248e6
5 changed files with 103 additions and 22 deletions
+42
View File
@@ -0,0 +1,42 @@
<?php
/**
* Created by PhpStorm.
* User: michal
* Date: 24.1.16
* Time: 23:20
*/
namespace App\Enumerations;
use App\Models\User;
class UserStates
{
/**
* Getter for states
*
* This method returns only list of roles as inserted into database
*
* @return array
*/
public static function getSimple()
{
return array_values(self::getWithTranslations());
}
/**
* Getter for states with translations
*
* This method returns all user states as keys. Values are strings used for translations.
*
* @return array
*/
public static function getWithTranslations()
{
return [
User::STATE_DELETED => 'admin/userManagement.status_' . User::STATE_DELETED,
User::STATE_BLOCKED => 'admin/userManagement.status_' . User::STATE_BLOCKED,
User::STATE_ACTIVE => 'admin/userManagement.status_' . User::STATE_ACTIVE
];
}
}