| Conditions | 4 |
| Paths | 4 |
| Total Lines | 23 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace Anomaly\UsersModule\User; |
||
| 53 | public function statusLabel($size = 'sm') |
||
| 54 | { |
||
| 55 | $color = 'default'; |
||
| 56 | $status = $this->status(); |
||
| 57 | |||
| 58 | switch ($status) { |
||
| 59 | case 'active': |
||
| 60 | $color = 'success'; |
||
| 61 | break; |
||
| 62 | |||
| 63 | case 'inactive': |
||
| 64 | $color = 'default'; |
||
| 65 | break; |
||
| 66 | |||
| 67 | case 'disabled': |
||
| 68 | $color = 'danger'; |
||
| 69 | break; |
||
| 70 | } |
||
| 71 | |||
| 72 | return '<span class="label label-' . $size . ' label-' . $color . '">' . trans( |
||
| 73 | 'anomaly.module.users::field.status.option.' . $status |
||
| 74 | ) . '</span>'; |
||
| 75 | } |
||
| 76 | |||
| 99 |