@@ 10-24 (lines=15) @@ | ||
7 | * @return array |
|
8 | * @author Cristian Quiroz <[email protected]> |
|
9 | */ |
|
10 | public function toOptionArray() |
|
11 | { |
|
12 | $rolesCollection = $this->getAdminRolesCollection(); |
|
13 | $rolesArray = array(); |
|
14 | ||
15 | foreach ($rolesCollection as $role) { |
|
16 | /** @var Mage_Admin_Model_Role $role */ |
|
17 | $rolesArray[] = array( |
|
18 | 'value' => $role->getRoleName(), |
|
19 | 'label' => $role->getRoleName(), |
|
20 | ); |
|
21 | } |
|
22 | ||
23 | return $rolesArray; |
|
24 | } |
|
25 | ||
26 | /** |
|
27 | * Get options in "key => value" format |
|
@@ 31-44 (lines=14) @@ | ||
28 | * @return array |
|
29 | * @author Cristian Quiroz <[email protected]> |
|
30 | */ |
|
31 | public function toArray() |
|
32 | { |
|
33 | $rolesCollection = $this->getAdminRolesCollection(); |
|
34 | $rolesArray = array(); |
|
35 | ||
36 | foreach ($rolesCollection as $role) { |
|
37 | /** @var Mage_Admin_Model_Role $role */ |
|
38 | $rolesArray[] = array( |
|
39 | $role->getRoleName() => $role->getRoleName(), |
|
40 | ); |
|
41 | } |
|
42 | ||
43 | return $rolesArray; |
|
44 | } |
|
45 | ||
46 | /** |
|
47 | * @return Mage_Admin_Model_Resource_Roles_Collection |