| @@ 90-101 (lines=12) @@ | ||
| 87 | * @param string $type type |
|
| 88 | * @return mixed |
|
| 89 | */ |
|
| 90 | public function type($type) |
|
| 91 | { |
|
| 92 | // write out all __() strings for l10n |
|
| 93 | switch ($type) { |
|
| 94 | case 'user': |
|
| 95 | return __('user.type.user'); |
|
| 96 | case 'mod': |
|
| 97 | return __('user.type.mod'); |
|
| 98 | case 'admin': |
|
| 99 | return __('user.type.admin'); |
|
| 100 | } |
|
| 101 | } |
|
| 102 | ||
| 103 | /** |
|
| 104 | * Creates link to user's external (non-Saito) homepage |
|
| @@ 187-199 (lines=13) @@ | ||
| 184 | * @param int $accession accession |
|
| 185 | * @return string |
|
| 186 | */ |
|
| 187 | public function accessionToRoles($accession) |
|
| 188 | { |
|
| 189 | switch ($accession) { |
|
| 190 | case (0): |
|
| 191 | return __('user.type.anon'); |
|
| 192 | case (1): |
|
| 193 | return __('user.type.user'); |
|
| 194 | case (2): |
|
| 195 | return __('user.type.mod'); |
|
| 196 | case (3): |
|
| 197 | return __('user.type.admin'); |
|
| 198 | } |
|
| 199 | } |
|
| 200 | } |
|
| 201 | ||