ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPayMethods Class Reference

Class ilObjPaymentSettingsGUI. More...

+ Collaboration diagram for ilPayMethods:

Public Member Functions

 ilPaymethods ($a_pm_id=0)
 setPmId ($a_pm_id)
 getPmId ()
 setPmTitle ($a_pm_title)
 getPmTitle ()
 setPmEnabled ($a_pm_enabled)
 getPmEnabled ()
 setSaveUserAddress ($a_save_usr_adr)
 getSaveUserAddress ()
 read ()
 readAll ()

Static Public Member Functions

static countPM ()
static _PMEnabled ($a_id)
static _PMdisable ($a_id)
static _PMenable ($a_id)
static _PMdisableAll ()
static _disableSaveUserAddress ($a_id)
static _enableSaveUserAddress ($a_id)
static _EnabledSaveUserAddress ($a_id)
static _getIdByTitle ($a_pm_title)
static _getTitleById ($a_pm_id)
static getStringByPaymethod ($a_type)
static getPayMethodsOptions ($type=0)
static _getActivePaymethods ()

Data Fields

 $pm_id
 $pm_title
 $pm_enabled
 $save_usr_adr

Detailed Description

Class ilObjPaymentSettingsGUI.

Author
Nadia Ahmad nahma.nosp@m.d@da.nosp@m.tabay.nosp@m..de
Version
$Id:

Definition at line 13 of file class.ilPayMethods.php.

Member Function Documentation

static ilPayMethods::_disableSaveUserAddress (   $a_id)
static

Definition at line 152 of file class.ilPayMethods.php.

References $ilDB, and $res.

Referenced by ilObjPaymentSettingsGUI\deleteAddressesForPaymethodsObject().

{
global $ilDB;
$res = $ilDB->manipulateF('UPDATE payment_paymethods SET save_usr_adr = 0
WHERE pm_id = %s',
array('integer'), array($a_id));
}

+ Here is the caller graph for this function:

static ilPayMethods::_EnabledSaveUserAddress (   $a_id)
static

Definition at line 170 of file class.ilPayMethods.php.

References $ilDB, $res, and $row.

Referenced by ilPaymentBookings\add(), ilPaymentStatisticGUI\saveCustomer(), ilObjPaymentSettingsGUI\saveCustomerObject(), and ilObjPaymentSettingsGUI\savePayMethodsObject().

{
global $ilDB;
$res = $ilDB->queryF('SELECT save_usr_adr FROM payment_paymethods WHERE pm_id = %s',
array('integer'), array($a_id));
$row = $ilDB->fetchAssoc($res);
return (int)$row['save_usr_adr'];
}

+ Here is the caller graph for this function:

static ilPayMethods::_enableSaveUserAddress (   $a_id)
static

Definition at line 161 of file class.ilPayMethods.php.

References $ilDB, and $res.

Referenced by ilObjPaymentSettingsGUI\savePayMethodsObject().

{
global $ilDB;
$res = $ilDB->manipulateF('UPDATE payment_paymethods SET save_usr_adr = 1
WHERE pm_id = %s',
array('integer'), array($a_id));
}

+ Here is the caller graph for this function:

static ilPayMethods::_getActivePaymethods ( )
static

Definition at line 271 of file class.ilPayMethods.php.

References $ilDB, $res, and $row.

{
global $ilDB;
$pm = array();
$res = $ilDB->queryf('SELECT * FROM payment_paymethods WHERE pm_enabled = %s',
array('integer'), array(1));
while($row = $ilDB->fetchAssoc($res))
{
$pm[] = $row;
}
return $pm;
}
static ilPayMethods::_getIdByTitle (   $a_pm_title)
static

Definition at line 182 of file class.ilPayMethods.php.

References $ilDB, $res, and $row.

Referenced by ilShopShoppingCartGUI\finishEPay(), ilPurchaseBillGUI\ilPurchaseBillGUI(), ilPurchaseBMFGUI\ilPurchaseBMFGUI(), ilPurchasePaypal\ilPurchasePaypal(), ilShopShoppingCartGUI\unlockBillObjectsInShoppingCart(), and ilShopShoppingCartGUI\unlockPAYPALObjectsInShoppingCart().

{
global $ilDB;
$res = $ilDB->queryF('SELECT pm_id FROM payment_paymethods WHERE pm_title = %s',
array('text'), array($a_pm_title));
$row = $ilDB->fetchAssoc($res);
return (int)$row['pm_id'];
}

+ Here is the caller graph for this function:

static ilPayMethods::_getTitleById (   $a_pm_id)
static

Definition at line 192 of file class.ilPayMethods.php.

References $ilDB, $res, and $row.

{
global $ilDB;
$res = $ilDB->queryF('SELECT pm_title FROM payment_paymethods WHERE pm_id = %s',
array('integer'), array($a_pm_id));
$row = $ilDB->fetchAssoc($res);
return $row['pm_title'];
}
static ilPayMethods::_PMdisable (   $a_id)
static

Definition at line 125 of file class.ilPayMethods.php.

References $ilDB, and $res.

Referenced by ilObjPaymentSettingsGUI\savePayMethodsObject().

{
global $ilDB;
$res = $ilDB->manipulateF('UPDATE payment_paymethods SET pm_enabled = 0
WHERE pm_id = %s',
array('integer'), array($a_id));
}

+ Here is the caller graph for this function:

static ilPayMethods::_PMdisableAll ( )
static

Definition at line 143 of file class.ilPayMethods.php.

References $ilDB, and $res.

{
global $ilDB;
$res = $ilDB->manipulateF('UPDATE payment_paymethods SET pm_enabled = %s',
array('integer'), array('0'));
}
static ilPayMethods::_PMenable (   $a_id)
static

Definition at line 134 of file class.ilPayMethods.php.

References $ilDB, and $res.

Referenced by ilObjPaymentSettingsGUI\savePayMethodsObject().

{
global $ilDB;
$res = $ilDB->manipulateF('UPDATE payment_paymethods SET pm_enabled = 1
WHERE pm_id = %s',
array('integer'), array($a_id));
}

+ Here is the caller graph for this function:

static ilPayMethods::_PMEnabled (   $a_id)
static

Definition at line 112 of file class.ilPayMethods.php.

References $ilDB, $res, and $row.

Referenced by ilObjPaymentSettingsGUI\editStatisticObject().

{
global $ilDB;
$res = $ilDB->queryF('SELECT pm_enabled FROM payment_paymethods WHERE pm_id = %s',
array('integer'), array($a_id));
$row = $ilDB->fetchAssoc($res);
return (int)$row['pm_enabled'];
}

+ Here is the caller graph for this function:

static ilPayMethods::countPM ( )
static

Definition at line 71 of file class.ilPayMethods.php.

References $ilDB, $res, and $row.

Referenced by ilObjPaymentSettingsGUI\savePayMethodsObject().

{
global $ilDB;
$res = $ilDB->query('SELECT count(pm_id) cnt FROM payment_paymethods');
$row = $ilDB->fetchAssoc($res);
return $row['cnt'];
}

+ Here is the caller graph for this function:

static ilPayMethods::getPayMethodsOptions (   $type = 0)
static

Definition at line 244 of file class.ilPayMethods.php.

References $ilDB, $lng, $res, $row, and getStringByPaymethod().

Referenced by ilPaymentStatisticGUI\addCustomer(), ilObjPaymentSettingsGUI\editDetailsObject(), and ilPaymentStatisticGUI\showStatistics().

{
global $ilDB, $lng;
$res = $ilDB->query('SELECT * FROM payment_paymethods WHERE pm_enabled = 1');
$options = array();
//this is only for additional entries in SelectInputGUIs
switch($type)
{
case 'all':
$options['all'] = $lng->txt('pay_all');
break;
case 'not_specified':
$options[0] = $lng->txt('paya_pay_method_not_specified');
break;
//default: break;
}
while($row = $ilDB->fetchAssoc($res))
{
$options[$row['pm_id']] = ilPayMethods::getStringByPaymethod($row['pm_title']);
}
return $options;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPayMethods::getPmEnabled ( )

Definition at line 57 of file class.ilPayMethods.php.

References $pm_enabled.

{
}
ilPayMethods::getPmId ( )

Definition at line 39 of file class.ilPayMethods.php.

References $pm_id.

Referenced by read().

{
return $this->pm_id;
}

+ Here is the caller graph for this function:

ilPayMethods::getPmTitle ( )

Definition at line 48 of file class.ilPayMethods.php.

References $pm_title.

{
}
ilPayMethods::getSaveUserAddress ( )

Definition at line 66 of file class.ilPayMethods.php.

References $save_usr_adr.

{
}
static ilPayMethods::getStringByPaymethod (   $a_type)
static

Definition at line 204 of file class.ilPayMethods.php.

References $lng.

Referenced by ilPurchaseBaseGUI\__sendBill(), ilPaymentStatisticGUI\addStatisticWorksheet(), ilObjPaymentSettingsGUI\addStatisticWorksheet(), ilShopBoughtObjectsGUI\createBill(), ilPaymentStatisticGUI\editStatistic(), ilObjPaymentSettingsGUI\editStatisticObject(), getPayMethodsOptions(), ilObjPaymentSettingsGUI\objectsObject(), ilObjPaymentSettingsGUI\payMethodsObject(), ilShopBoughtObjectsGUI\showItems(), ilShopShoppingCartGUI\showItemsTable(), ilPaymentObjectGUI\showObjects(), ilPaymentStatisticGUI\showStatistics(), and ilObjPaymentSettingsGUI\statisticObject().

{
global $lng;
switch($a_type)
{
case '1':
case 'pm_bill':
case 'bill':
case 'PAY_METHOD_BILL': return $lng->txt('pays_bill');
break;
case '2':
case 'pm_bmf':
case 'bmf':
case 'PAY_METHOD_BMF': return $lng->txt('pays_bmf');
break;
case '3':
case 'pm_paypal':
case 'paypal':
case 'PAY_METHOD_PAYPAL': return $lng->txt('pays_paypal');
break;
case '4':
case 'pm_epay':
case 'epay':
case 'PAY_METHOD_EPAY': return $lng->txt('pays_epay');
break;
case 'PAY_METHOD_NOT_SPECIFIED': return $lng->txt('paya_pay_method_not_specified');
break;
default:
return $lng->txt('paya_pay_method_not_specified');
break;
}
}

+ Here is the caller graph for this function:

ilPayMethods::ilPaymethods (   $a_pm_id = 0)

Definition at line 21 of file class.ilPayMethods.php.

References $ilDB, read(), and readAll().

{
global $ilDB;
$this->db = $ilDB;
if($a_pm_id != 0)
{
$this->pm_id = $a_pm_id;
$this->read();
}
else $this->readAll();
}

+ Here is the call graph for this function:

ilPayMethods::read ( )

Definition at line 81 of file class.ilPayMethods.php.

References $res, $row, getPmId(), setPmEnabled(), setPmTitle(), and setSaveUserAddress().

Referenced by ilPaymethods().

{
$res = $this->db->queryF('SELECT * FROM payment_paymethods WHERE pm_id = %s',
array('integer'), array($this->getPmId()));
while($row = $this->db->fetchAssoc($res))
{
$this->setPmTitle($row['pm_title']);
$this->setPmEnabled($row['pm_enabled']);
$this->setSaveUserAddress($row['save_usr_adr']);
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPayMethods::readAll ( )

Definition at line 96 of file class.ilPayMethods.php.

References $res, and $row.

Referenced by ilPaymethods().

{
$res = $this->db->query('SELECT * FROM payment_paymethods');
$paymethods = array();
$counter = 0;
while($row = $this->db->fetchAssoc($res))
{
$paymethods[$counter]['pm_id'] = $row['pm_id'];
$paymethods[$counter]['pm_title'] = $row['pm_title'];
$paymethods[$counter]['pm_enabled'] = $row['pm_enabled'];
$paymethods[$counter]['save_usr_adr'] = $row['save_usr_adr'];
$counter++;
}
return $paymethods;
}

+ Here is the caller graph for this function:

ilPayMethods::setPmEnabled (   $a_pm_enabled)

Definition at line 53 of file class.ilPayMethods.php.

Referenced by read().

{
$this->pm_enabled = $a_pm_enabled;
}

+ Here is the caller graph for this function:

ilPayMethods::setPmId (   $a_pm_id)

Definition at line 35 of file class.ilPayMethods.php.

{
$this->pm_id = $a_pm_id;
}
ilPayMethods::setPmTitle (   $a_pm_title)

Definition at line 44 of file class.ilPayMethods.php.

Referenced by read().

{
$this->pm_title = $a_pm_title;
}

+ Here is the caller graph for this function:

ilPayMethods::setSaveUserAddress (   $a_save_usr_adr)

Definition at line 62 of file class.ilPayMethods.php.

Referenced by read().

{
$this->save_usr_adr = $a_save_usr_adr;
}

+ Here is the caller graph for this function:

Field Documentation

ilPayMethods::$pm_enabled

Definition at line 17 of file class.ilPayMethods.php.

Referenced by getPmEnabled().

ilPayMethods::$pm_id

Definition at line 15 of file class.ilPayMethods.php.

Referenced by getPmId().

ilPayMethods::$pm_title

Definition at line 16 of file class.ilPayMethods.php.

Referenced by getPmTitle().

ilPayMethods::$save_usr_adr

Definition at line 18 of file class.ilPayMethods.php.

Referenced by getSaveUserAddress().


The documentation for this class was generated from the following file: