Public Member Functions | |
__construct () |
Definition at line 26 of file Userroles.php.
__construct | ( | ) |
Constructor
By default is looking for first argument as array and assignes it as object attributes This behaviour may change in child classes
Reimplemented from Varien_Object.
Definition at line 29 of file Userroles.php.
00030 { 00031 parent::__construct(); 00032 00033 $uid = $this->getRequest()->getParam('id', false); 00034 $uid = !empty($uid) ? $uid : 0; 00035 $roles = Mage::getModel("api/roles") 00036 ->getCollection() 00037 ->load(); 00038 00039 $user_roles = Mage::getModel("api/roles") 00040 ->getUsersCollection() 00041 ->setUserFilter($uid) 00042 ->load(); 00043 00044 $this->setTemplate('api/userroles.phtml') 00045 ->assign('roles', $roles) 00046 ->assign('user_roles', $user_roles); 00047 }