BankCateg
class BankCateg (View source)
Class to manage bank categories
Properties
| string | $picto | ||
| int | $id | ||
| string | $label | ||
| protected DoliDB | $db | ||
| string | $error | ||
| string[] | $errors | ||
| array<string, string> | $context |
Methods
int
fetch(int $id)
Load object in memory from database
int
update(User $user = null, int<0, 1> $notrigger = 0)
Update database
int
createFromClone(User $user, int $fromid)
Load an object from its id and create a new one in database
int
initAsSpecimen()
Initialise an instance with random values.
Details
__construct(DoliDB $db)
Constructor
int
create(User $user, int $notrigger = 0)
Create in database
int
fetch(int $id)
Load object in memory from database
int
update(User $user = null, int<0, 1> $notrigger = 0)
Update database
int
delete(User $user, int $notrigger = 0)
Delete object in database
int
createFromClone(User $user, int $fromid)
Load an object from its id and create a new one in database
BankCateg[]
fetchAll()
Returns all bank categories
int
initAsSpecimen()
Initialise an instance with random values.
Used to build previews or test instances. id must be 0 if object instance is a specimen.