| 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; |
||
| 41 | public function statusLabel($size = 'sm') |
||
| 42 | { |
||
| 43 | $color = 'default'; |
||
| 44 | $status = $this->status(); |
||
| 45 | |||
| 46 | switch ($status) { |
||
| 47 | case 'active': |
||
| 48 | $color = 'success'; |
||
| 49 | break; |
||
| 50 | |||
| 51 | case 'inactive': |
||
| 52 | $color = 'default'; |
||
| 53 | break; |
||
| 54 | |||
| 55 | case 'disabled': |
||
| 56 | $color = 'danger'; |
||
| 57 | break; |
||
| 58 | } |
||
| 59 | |||
| 60 | return '<span class="label label-' . $size . ' label-' . $color . '">' . trans( |
||
| 61 | 'anomaly.module.users::field.status.option.' . $status |
||
| 62 | ) . '</span>'; |
||
| 63 | } |
||
| 64 | |||
| 87 |