Conditions | 5 |
Paths | 5 |
Total Lines | 26 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | public function render_cell($record) |
||
28 | { |
||
29 | if ($record->uid == 1) |
||
30 | { |
||
31 | return '<em>Admin</em>'; |
||
32 | } |
||
33 | |||
34 | if (!$record->roles) |
||
35 | { |
||
36 | return null; |
||
37 | } |
||
38 | |||
39 | $label = ''; |
||
40 | |||
41 | foreach ($record->roles as $role) |
||
42 | { |
||
43 | if ($role->rid == 2) |
||
44 | { |
||
45 | continue; |
||
46 | } |
||
47 | |||
48 | $label .= ', ' . $role->name; |
||
49 | } |
||
50 | |||
51 | return substr($label, 2); |
||
52 | } |
||
53 | } |
||
54 |