CrudObject deprecated
abstract class CrudObject extends CommonObject (View source)
deprecated
CrudObject class (Create/Read/Update/Delete)
Properties
string | $element | ||
string | $table_element | ||
array | $fetch_fields | ||
array | $date_fields | ||
string | $pk_name | ||
string | $ref_field_name | ||
array | $rows | ||
string | $triggers_prefix |
Methods
Constructor
Set table name
Create object into database
Load object in memory from database
Load object in memory from database (wrapper for fetchAll function)
Load all object entries in memory from database
Update object into database
Update row(s) into database (wrapper for updateAll function)
Update all object rows into database
Delete object in database
Delete row(s) in database (wrapper for deleteAll function)
Delete all object rows in database
Delete all links between an object $this
Escape field value
Run Dolibarr triggers (from other modules)
Details
at line 66
__construct()
Constructor
at line 80
$this
setTableName($table_name)
Set table name
at line 94
int
create(array $data, int $notrigger = 1)
Create object into database
at line 154
int
fetch(int $id, string $ref = '')
Load object in memory from database
at line 214
int
fetchWhere(string $where)
Load object in memory from database (wrapper for fetchAll function)
at line 225
int
fetchAll(string $where = '')
Load all object entries in memory from database
at line 300
int
update(array $data, int $notrigger = 1)
Update object into database
at line 357
int
updateWhere(array $data, string $where, int $notrigger = 1)
Update row(s) into database (wrapper for updateAll function)
at line 370
int
updateAll(array $data, string $where = '', int $notrigger = 1)
Update all object rows into database
at line 420
int
delete(int $notrigger = 1)
Delete object in database
at line 471
int
deleteWhere(string $where, int $notrigger = 1)
Delete row(s) in database (wrapper for deleteAll function)
at line 483
int
deleteAll(string $where = '', int $notrigger = 1)
Delete all object rows in database
at line 549
protected int
deleteAllObjectLinked()
Delete all links between an object $this
at line 573
protected string
escape($value)
Escape field value
at line 584
protected int
run_triggers($action_suffix)
Run Dolibarr triggers (from other modules)