Public Member Functions | |
| ilPaymentTrustees (&$user_obj) | |
| Constructor public. | |
| getTrustees () | |
| getTrustee ($a_usr_id) | |
| isTrustee ($a_usr_id) | |
| toggleStatisticPermission ($a_on) | |
| toggleObjectPermission ($a_on) | |
| toggleCouponsPermission ($a_on) | |
| setTrusteeId ($a_id) | |
| add () | |
| modify () | |
| delete () | |
| deleteAll () | |
| __getTrusteeId () | |
| __getStatisticPermissionStatus () | |
| __getObjectPermissisonStatus () | |
| __getCouponsPermissisonStatus () | |
| __read () | |
| _deleteTrusteesOfVendor ($a_vendor_id) | |
| _hasStatisticPermission ($a_trustee) | |
| _hasObjectPermission ($a_trustee) | |
| _hasCouponsPermission ($a_trustee) | |
| _hasStatisticPermissionByVendor ($a_trustee, $a_vendor) | |
| _hasObjectPermissionByVendor ($a_trustee, $a_vendor) | |
| _hasCouponsPermissionByVendor ($a_trustee, $a_vendor) | |
| _hasAccess ($a_usr_id) | |
| _getVendorsForObjects ($a_usr_id) | |
| _getVendorsForCouponsByTrusteeId ($a_usr_id) | |
| _getTrusteesForCouponsByVendorId ($a_usr_id) | |
Data Fields | |
| $db = null | |
| $user_obj | |
| $trustees = array() | |
Definition at line 34 of file class.ilPaymentTrustees.php.
| ilPaymentTrustees::__getCouponsPermissisonStatus | ( | ) |
Definition at line 165 of file class.ilPaymentTrustees.php.
{
return (int) $this->perm_coupons;
}
| ilPaymentTrustees::__getObjectPermissisonStatus | ( | ) |
Definition at line 161 of file class.ilPaymentTrustees.php.
{
return (int) $this->perm_obj;
}
| ilPaymentTrustees::__getStatisticPermissionStatus | ( | ) |
Definition at line 157 of file class.ilPaymentTrustees.php.
{
return (int) $this->perm_stat;
}
| ilPaymentTrustees::__getTrusteeId | ( | ) |
Definition at line 153 of file class.ilPaymentTrustees.php.
Referenced by delete(), and modify().
{
return $this->trustee_id;
}
Here is the caller graph for this function:| ilPaymentTrustees::__read | ( | ) |
Definition at line 169 of file class.ilPaymentTrustees.php.
References $res.
Referenced by add(), delete(), deleteAll(), ilPaymentTrustees(), and modify().
{
$this->trustees = array();
$query = "SELECT * FROM payment_trustees ".
"WHERE vendor_id = '".$this->user_obj->getId()."'";
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->trustees[$row->trustee_id]['trustee_id'] = $row->trustee_id;
$this->trustees[$row->trustee_id]['perm_stat'] = $row->perm_stat;
$this->trustees[$row->trustee_id]['perm_obj'] = $row->perm_obj;
$this->trustees[$row->trustee_id]['perm_coupons'] = $row->perm_coupons;
}
}
Here is the caller graph for this function:| ilPaymentTrustees::_deleteTrusteesOfVendor | ( | $ | a_vendor_id | ) |
Definition at line 187 of file class.ilPaymentTrustees.php.
Referenced by ilObjPaymentSettingsGUI::performDeleteVendorsObject().
{
global $ilDB;
$query = "DELETE FROM payment_trustees ".
"WHERE vendor_id = '".$a_vendor_id."'";
$ilDB->query($query);
return true;
}
Here is the caller graph for this function:| ilPaymentTrustees::_getTrusteesForCouponsByVendorId | ( | $ | a_usr_id | ) |
Definition at line 333 of file class.ilPaymentTrustees.php.
References $res, and $trustees.
Referenced by ilPaymentCoupons::getVendorIds().
{
global $ilDB;
$query = "SELECT trustee_id FROM payment_trustees ".
"WHERE perm_coupons = '1' ".
"AND vendor_id = '".$a_usr_id."'";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$trustees[] = $row->trustee_id;
}
return $trustees ? $trustees : array();
}
Here is the caller graph for this function:| ilPaymentTrustees::_getVendorsForCouponsByTrusteeId | ( | $ | a_usr_id | ) |
Definition at line 316 of file class.ilPaymentTrustees.php.
References $res.
Referenced by ilPaymentCoupons::getVendorIds().
{
global $ilDB;
$query = "SELECT vendor_id FROM payment_trustees ".
"WHERE perm_coupons = '1' ".
"AND trustee_id = '".$a_usr_id."'";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$vendors[] = $row->vendor_id;
}
return $vendors ? $vendors : array();
}
Here is the caller graph for this function:| ilPaymentTrustees::_getVendorsForObjects | ( | $ | a_usr_id | ) |
Definition at line 299 of file class.ilPaymentTrustees.php.
References $res.
Referenced by ilPaymentBookings::__getVendorIds(), ilPaymentObjectGUI::__showVendorSelector(), and ilPaymentObject::_getObjectsData().
{
global $ilDB;
$query = "SELECT vendor_id FROM payment_trustees ".
"WHERE perm_obj = '1' ".
"AND trustee_id = '".$a_usr_id."'";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$vendors[] = $row->vendor_id;
}
return $vendors ? $vendors : array();
}
Here is the caller graph for this function:| ilPaymentTrustees::_hasAccess | ( | $ | a_usr_id | ) |
Definition at line 292 of file class.ilPaymentTrustees.php.
References _hasCouponsPermission(), _hasObjectPermission(), and _hasStatisticPermission().
Referenced by ilPersonalDesktopGUI::setTabs().
{
return ilPaymentTrustees::_hasStatisticPermission($a_usr_id) or
ilPaymentTrustees::_hasObjectPermission($a_usr_id) or
ilPaymentTrustees::_hasCouponsPermission($a_usr_id);
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilPaymentTrustees::_hasCouponsPermission | ( | $ | a_trustee | ) |
Definition at line 233 of file class.ilPaymentTrustees.php.
References $res.
Referenced by ilPaymentBaseGUI::__buildButtons(), and _hasAccess().
{
global $ilDB;
$query = "SELECT * FROM payment_trustees ".
"WHERE trustee_id = '".$a_trustee."'";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
if((bool) $row->perm_coupons)
{
return true;
}
}
return false;
}
Here is the caller graph for this function:| ilPaymentTrustees::_hasCouponsPermissionByVendor | ( | $ | a_trustee, | |
| $ | a_vendor | |||
| ) |
Definition at line 278 of file class.ilPaymentTrustees.php.
References $res.
| ilPaymentTrustees::_hasObjectPermission | ( | $ | a_trustee | ) |
Definition at line 216 of file class.ilPaymentTrustees.php.
References $res.
Referenced by ilPaymentBaseGUI::__buildButtons(), ilPaymentAdminGUI::__forwardToDefault(), and _hasAccess().
{
global $ilDB;
$query = "SELECT * FROM payment_trustees ".
"WHERE trustee_id = '".$a_trustee."'";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
if((bool) $row->perm_obj)
{
return true;
}
}
return false;
}
Here is the caller graph for this function:| ilPaymentTrustees::_hasObjectPermissionByVendor | ( | $ | a_trustee, | |
| $ | a_vendor | |||
| ) |
Definition at line 264 of file class.ilPaymentTrustees.php.
References $res.
| ilPaymentTrustees::_hasStatisticPermission | ( | $ | a_trustee | ) |
Definition at line 199 of file class.ilPaymentTrustees.php.
References $res.
Referenced by ilPaymentBaseGUI::__buildButtons(), ilPaymentAdminGUI::__forwardToDefault(), and _hasAccess().
{
global $ilDB;
$query = "SELECT * FROM payment_trustees ".
"WHERE trustee_id = '".$a_trustee."'";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
if((bool) $row->perm_stat)
{
return true;
}
}
return false;
}
Here is the caller graph for this function:| ilPaymentTrustees::_hasStatisticPermissionByVendor | ( | $ | a_trustee, | |
| $ | a_vendor | |||
| ) |
Definition at line 250 of file class.ilPaymentTrustees.php.
References $res.
Referenced by ilPaymentBookings::__getVendorIds().
{
global $ilDB;
$query = "SELECT * FROM payment_trustees ".
"WHERE trustee_id = '".$a_trustee."' ".
"AND vendor_id = '".$a_vendor."' ".
"AND perm_stat = '1'";
$res = $ilDB->query($query);
return $res->numRows() ? true : false;
}
Here is the caller graph for this function:| ilPaymentTrustees::add | ( | ) |
Definition at line 90 of file class.ilPaymentTrustees.php.
References __read().
{
$query = "INSERT INTO payment_trustees ".
"SET vendor_id = '".$this->user_obj->getId()."', ".
"trustee_id = '".$this->__getTrusteeId()."', ".
"perm_stat = '".$this->__getStatisticPermissionStatus()."', ".
"perm_coupons = '".$this->__getCouponsPermissisonStatus()."', ".
"perm_obj = '".$this->__getObjectPermissisonStatus()."'";
$this->db->query($query);
$this->__read();
return true;
}
Here is the call graph for this function:| ilPaymentTrustees::delete | ( | ) |
Definition at line 124 of file class.ilPaymentTrustees.php.
References __getTrusteeId(), and __read().
{
if(!$this->__getTrusteeId())
{
die("ilPaymentTrustees::delete() no id given");
}
$query = "DELETE FROM payment_trustees ".
"WHERE vendor_id = '".$this->user_obj->getId()."' ".
"AND trustee_id = '".$this->__getTrusteeId()."'";
$this->db->query($query);
$this->__read();
return true;
}
Here is the call graph for this function:| ilPaymentTrustees::deleteAll | ( | ) |
Definition at line 140 of file class.ilPaymentTrustees.php.
References __read().
{
$query = "DELETE FROM payment_trustees ".
"WHERE vendor_id = '".$this->user_obj->getId()."'";
$this->db->query($query);
$this->__read();
return true;
}
Here is the call graph for this function:| ilPaymentTrustees::getTrustee | ( | $ | a_usr_id | ) |
Definition at line 62 of file class.ilPaymentTrustees.php.
{
return isset($this->trustees[$a_usr_id]) ? $this->trustees[$a_usr_id] : array();
}
| ilPaymentTrustees::getTrustees | ( | ) |
Definition at line 58 of file class.ilPaymentTrustees.php.
{
return $this->trustees ? $this->trustees : array();
}
| ilPaymentTrustees::ilPaymentTrustees | ( | &$ | user_obj | ) |
| ilPaymentTrustees::isTrustee | ( | $ | a_usr_id | ) |
Definition at line 66 of file class.ilPaymentTrustees.php.
{
return isset($this->trustees[$a_usr_id]);
}
| ilPaymentTrustees::modify | ( | ) |
Definition at line 104 of file class.ilPaymentTrustees.php.
References __getTrusteeId(), and __read().
{
if(!$this->__getTrusteeId())
{
die("ilPaymentTrustees::modify() no id given");
}
$query = "UPDATE payment_trustees SET ".
"trustee_id = '".$this->__getTrusteeId()."', ".
"perm_stat = '".$this->__getStatisticPermissionStatus()."', ".
"perm_obj = '".$this->__getObjectPermissisonStatus()."', ".
"perm_coupons = '".$this->__getCouponsPermissisonStatus()."' ".
"WHERE vendor_id = '".$this->user_obj->getId()."' ".
"AND trustee_id = '".$this->__getTrusteeId()."'";
$this->db->query($query);
$this->__read();
return true;
}
Here is the call graph for this function:| ilPaymentTrustees::setTrusteeId | ( | $ | a_id | ) |
Definition at line 85 of file class.ilPaymentTrustees.php.
{
$this->trustee_id = $a_id;
}
| ilPaymentTrustees::toggleCouponsPermission | ( | $ | a_on | ) |
Definition at line 81 of file class.ilPaymentTrustees.php.
{
$this->perm_coupons = (bool) $a_on;
}
| ilPaymentTrustees::toggleObjectPermission | ( | $ | a_on | ) |
Definition at line 77 of file class.ilPaymentTrustees.php.
{
$this->perm_obj = (bool) $a_on;
}
| ilPaymentTrustees::toggleStatisticPermission | ( | $ | a_on | ) |
Definition at line 73 of file class.ilPaymentTrustees.php.
{
$this->perm_stat = (bool) $a_on;
}
| ilPaymentTrustees::$db = null |
Definition at line 36 of file class.ilPaymentTrustees.php.
| ilPaymentTrustees::$trustees = array() |
Definition at line 39 of file class.ilPaymentTrustees.php.
Referenced by _getTrusteesForCouponsByVendorId().
| ilPaymentTrustees::$user_obj |
Definition at line 38 of file class.ilPaymentTrustees.php.
Referenced by ilPaymentTrustees().
1.7.1