public function __construct($options = null) { $this->_oAuth = AppCms2_Controller_Plugin_ModuleAuth::getInstance(); if ($this->_oAuth->hasIdentity()) { $this->_nUserId = $this->_oAuth->getStorage()->read()->user_id; } $oModelUser = new Admin_Model_User(); $oAllUser = $oModelUser->findUsers(array(3, 4)); if (isset($oAllUser)) { $this->_aAllUser[0] = "-"; foreach ($oAllUser as $oValue) { $this->_aAllUser[$oValue->id] = trim($oValue->first_name . " " . $oValue->last_name); } } $oModelNotificationPriority = new Admin_Model_NotificationPriority(); $oAllNotificationPriority = $oModelNotificationPriority->getAll(); if (isset($oAllNotificationPriority)) { foreach ($oAllNotificationPriority as $oValue) { $this->_aAllNotificationPriority[$oValue->id] = stripcslashes($oValue->name); } } $oModelNotificationStatus = new Admin_Model_NotificationStatus(); $oAllNotificationStatus = $oModelNotificationStatus->getAll(); if (isset($oAllNotificationStatus)) { foreach ($oAllNotificationStatus as $oValue) { $this->_aAllNotificationStatus[$oValue->id] = stripcslashes($oValue->name); } } $oModelNotificationCategory = new Admin_Model_NotificationCategory(); $oAllNotificationCategory = $oModelNotificationCategory->getAll(); if (isset($oAllNotificationCategory)) { foreach ($oAllNotificationCategory as $oValue) { $this->_aAllNotificationCategory[0] = "-"; $this->_aAllNotificationCategory[$oValue->id] = stripcslashes($oValue->name); } } $oModelUserCategory = new Admin_Model_UserCategory(); $aAllUserCategory = $oModelUserCategory->getAll(); if (isset($aAllUserCategory)) { foreach ($aAllUserCategory as $oValue) { $this->_aAllUserCategory[$oValue->id] = stripcslashes($oValue->name); } } parent::__construct($options); }
public function __construct($options = null) { $oModelUserRole = new Admin_Model_UserRole(); $oModelUserCategory = new Admin_Model_UserCategory(); $aAllUserRole = $oModelUserRole->getAll()->toArray(); if (count($aAllUserRole)) { foreach ($aAllUserRole as $aValue) { $this->_aAllUserRole[$aValue["id"]] = $aValue["role_name"]; } } $oAllCategory = $oModelUserCategory->getAll(); if (isset($oAllCategory)) { foreach ($oAllCategory as $oRow) { $this->_aCategory[$oRow->id] = trim($oRow->name); } } parent::__construct($options); }
public function __construct($options = null) { $this->_oAuth = AppCms2_Controller_Plugin_ModuleAuth::getInstance(); $oModelUser = new Admin_Model_User(); $oModelUserCategory = new Admin_Model_UserCategory(); if ($this->_oAuth->hasIdentity()) { $this->_aUser = $oModelUser->findUser($this->_oAuth->getStorage()->read()->user_id); } $oChatUserRecipients = $oModelUser->findAskOnline(); if (isset($oChatUserRecipients)) { foreach ($oChatUserRecipients as $oRow) { $aUserParam = $oModelUser->findUser($oRow->id); $this->_aChatUserRecipients[$oRow->id] = trim($aUserParam["first_name"] . " " . $aUserParam["last_name"]); } } $oAllCategory = $oModelUserCategory->getAll(); if (isset($oAllCategory)) { foreach ($oAllCategory as $oRow) { $this->_aCategory[$oRow->id] = trim($oRow->name); } } parent::__construct($options); }