|
const | TABLE = 'transactions' |
|
const | PK = 'trans_id' |
|
|
array | $errors |
|
array | $forbidden_fields = [] |
|
◆ __construct()
Galette\Entity\Transaction::__construct |
( |
Db |
$zdb, |
|
|
Login |
$login, |
|
|
ArrayObject|int|null |
$args = null |
|
) |
| |
Default constructor
- Parameters
-
Db | $zdb | Database instance |
Login | $login | Login instance |
| null|int|ArrayObject<string,int|string> | $args Either a ResultSet row or its id for to load a specific transaction, or null to just instantiate object |
◆ __get()
Galette\Entity\Transaction::__get |
( |
string |
$name | ) |
|
Global getter method
- Parameters
-
string | $name | name of the property we want to retrieve |
- Returns
- mixed the called property
◆ canShow()
Galette\Entity\Transaction::canShow |
( |
Login |
$login | ) |
|
Can current logged-in user display transaction
- Parameters
-
Login | $login | Login instance |
- Returns
- boolean
◆ check()
Galette\Entity\Transaction::check |
( |
array |
$values, |
|
|
array |
$required, |
|
|
array |
$disabled |
|
) |
| |
Check posted values validity
- Parameters
-
array<string,mixed> | $values All values to check, basically the $_POST array after sending the form |
array<string,int> | $required Array of required fields |
array<string> | $disabled Array of disabled fields |
- Returns
- true|array<string>
TODO: retrieve field length from database and check that
◆ getDbFields()
Galette\Entity\Transaction::getDbFields |
( |
Db |
$zdb | ) |
|
Retrieve fields from database
- Parameters
-
- Returns
- array<string>
◆ getDispatchedAmount()
Galette\Entity\Transaction::getDispatchedAmount |
( |
| ) |
|
Retrieve amount that has already been dispatched into contributions
- Returns
- double
◆ getMissingAmount()
Galette\Entity\Transaction::getMissingAmount |
( |
| ) |
|
Retrieve amount that has not yet been dispatched into contributions
- Returns
- double
◆ getPaymentType()
Galette\Entity\Transaction::getPaymentType |
( |
| ) |
|
Get payment type label
- Returns
- string
◆ getRowClass()
Galette\Entity\Transaction::getRowClass |
( |
| ) |
|
Get the relevant CSS class for current transaction
- Returns
- string current transaction row class
◆ handleFiles()
Galette\Entity\Transaction::handleFiles |
( |
array |
$files | ) |
|
Handle files (dynamics files)
- Parameters
-
array<string,mixed> | $files Files sent |
- Returns
- array<string>|true
◆ remove()
Galette\Entity\Transaction::remove |
( |
History |
$hist, |
|
|
bool |
$transaction = true |
|
) |
| |
Remove transaction (and all associated contributions) from database
- Parameters
-
History | $hist | History |
boolean | $transaction | Activate transaction mode (defaults to true) |
- Returns
- boolean
◆ setFields()
Galette\Entity\Transaction::setFields |
( |
| ) |
|
|
protected |
Set fields, must populate $this->fields
- Returns
- self
◆ store()
Galette\Entity\Transaction::store |
( |
History |
$hist | ) |
|
Store the transaction
- Parameters
-
- Returns
- boolean
FIXME: quote?
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/galette-apidoc/checkouts/develop/galette/lib/Galette/Entity/Transaction.php