Пример #1
0
 public function populateRole($data)
 {
     if (is_array($data)) {
         if ($this->_role == null) {
             $this->_role = new User_Model_Role();
         }
         Agana_Data_BeanUtil::populate($this->_role, $data);
     } else {
         $this->setRole($data);
     }
     $ad = new App_Domain_Account();
     if (!is_null($this->_role->appaccount_id)) {
         $app = $ad->getById($this->_role->appaccount_id);
     } else {
         $app = $ad->getById(Zend_Auth::getInstance()->getIdentity()->appaccount_id);
     }
     $this->_role->setAppAccount($app);
     return $this->_role;
 }