Public Member Functions | |
| ilPaymentTrustees (&$user_obj) | |
| Constructor public. | |
| getTrustees () | |
| getTrustee ($a_usr_id) | |
| isTrustee ($a_usr_id) | |
| toggleStatisticPermission ($a_on) | |
| toggleObjectPermission ($a_on) | |
| setTrusteeId ($a_id) | |
| add () | |
| modify () | |
| delete () | |
| deleteAll () | |
| __getTrusteeId () | |
| __getStatisticPermissionStatus () | |
| __getObjectPermissisonStatus () | |
| __read () | |
| _deleteTrusteesOfVendor ($a_vendor_id) | |
| _hasStatisticPermission ($a_trustee) | |
| _hasObjectPermission ($a_trustee) | |
| _hasStatisticPermissionByVendor ($a_trustee, $a_vendor) | |
| _hasObjectPermissionByVendor ($a_trustee, $a_vendor) | |
| _hasAccess ($a_usr_id) | |
| _getVendorsForObjects ($a_usr_id) | |
Data Fields | |
| $db = null | |
| $user_obj | |
| $trustees = array() | |
Definition at line 34 of file class.ilPaymentTrustees.php.
| ilPaymentTrustees::__getObjectPermissisonStatus | ( | ) |
Definition at line 155 of file class.ilPaymentTrustees.php.
{
return (int) $this->perm_obj;
}
| ilPaymentTrustees::__getStatisticPermissionStatus | ( | ) |
Definition at line 151 of file class.ilPaymentTrustees.php.
{
return (int) $this->perm_stat;
}
| ilPaymentTrustees::__getTrusteeId | ( | ) |
Definition at line 147 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 159 of file class.ilPaymentTrustees.php.
References $query, $res, and $row.
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;
}
}
Here is the caller graph for this function:| ilPaymentTrustees::_deleteTrusteesOfVendor | ( | $ | a_vendor_id | ) |
Definition at line 176 of file class.ilPaymentTrustees.php.
References $query.
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::_getVendorsForObjects | ( | $ | a_usr_id | ) |
Definition at line 256 of file class.ilPaymentTrustees.php.
References $query, $res, and $row.
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 250 of file class.ilPaymentTrustees.php.
References _hasObjectPermission(), and _hasStatisticPermission().
{
return ilPaymentTrustees::_hasStatisticPermission($a_usr_id) or
ilPaymentTrustees::_hasObjectPermission($a_usr_id);
}
Here is the call graph for this function:| ilPaymentTrustees::_hasObjectPermission | ( | $ | a_trustee | ) |
Definition at line 205 of file class.ilPaymentTrustees.php.
References $query, $res, and $row.
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 236 of file class.ilPaymentTrustees.php.
| ilPaymentTrustees::_hasStatisticPermission | ( | $ | a_trustee | ) |
Definition at line 188 of file class.ilPaymentTrustees.php.
References $query, $res, and $row.
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 222 of file class.ilPaymentTrustees.php.
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 86 of file class.ilPaymentTrustees.php.
References $query, and __read().
{
$query = "INSERT INTO payment_trustees ".
"SET vendor_id = '".$this->user_obj->getId()."', ".
"trustee_id = '".$this->__getTrusteeId()."', ".
"perm_stat = '".$this->__getStatisticPermissionStatus()."', ".
"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 118 of file class.ilPaymentTrustees.php.
References $query, __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 | ( | ) |
| 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 99 of file class.ilPaymentTrustees.php.
References $query, __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()."' ".
"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 81 of file class.ilPaymentTrustees.php.
{
$this->trustee_id = $a_id;
}
| 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.
| ilPaymentTrustees::$user_obj |
Definition at line 38 of file class.ilPaymentTrustees.php.
Referenced by ilPaymentTrustees().
1.7.1