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