CustomObject
class CustomObject extends CrudObject (View source)
CustomObject class
Properties
string | $element | from CrudObject | |
string | $table_element | from CrudObject | |
array | $fetch_fields | from CrudObject | |
array | $date_fields | from CrudObject | |
string | $pk_name | from CrudObject | |
string | $ref_field_name | from CrudObject | |
array | $rows | from CrudObject | |
string | $triggers_prefix | from CrudObject | |
string | $picto | ||
array | $tooltip_details | ||
string | $doc_title | ||
array | $doc_lines | ||
string | $card_url | ||
protected string | $modulepart |
Methods
Constructor
Create object into database
Load object in memory from database (wrapper for fetchAll function)
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
Clone an object
Returns object extrafields as a ['label' => 'value'] array
Returns the reference to the following non used object depending on the active numbering model defined into MODULE_RIGHTS_CLASS_ADDON
Return clicable name (with picto eventually)
Return label of status of object (draft, validated, .
Get object image(s)
Create a document onto disk according to template module.
Delete document from disk.
Details
at line 57
__construct()
Constructor
in CrudObject at line 80
$this
setTableName($table_name)
Set table name
at line 97
int
create(array $data, int $notrigger)
Create object into database
in CrudObject at line 154
int
fetch(int $id, string $ref = '')
Load object in memory from database
in CrudObject at line 214
int
fetchWhere(string $where)
Load object in memory from database (wrapper for fetchAll function)
in CrudObject at line 225
int
fetchAll(string $where = '')
Load all object entries in memory from database
at line 117
int
update(array $data, int $notrigger)
Update object into database
in CrudObject at line 357
int
updateWhere(array $data, string $where, int $notrigger = 1)
Update row(s) into database (wrapper for updateAll function)
in CrudObject at line 370
int
updateAll(array $data, string $where = '', int $notrigger = 1)
Update all object rows into database
at line 136
int
delete(int $notrigger)
Delete object in database
in CrudObject at line 471
int
deleteWhere(string $where, int $notrigger = 1)
Delete row(s) in database (wrapper for deleteAll function)
in CrudObject at line 483
int
deleteAll(string $where = '', int $notrigger = 1)
Delete all object rows in database
in CrudObject at line 549
protected int
deleteAllObjectLinked()
Delete all links between an object $this
in CrudObject at line 573
protected string
escape($value)
Escape field value
in CrudObject at line 584
protected int
run_triggers($action_suffix)
Run Dolibarr triggers (from other modules)
at line 70
$this
clone($obj)
Clone an object
at line 154
array
getExtraFields()
Returns object extrafields as a ['label' => 'value'] array
at line 185
string
getNextNumRef(string $const_name_prefix = '', string $model_name = '', Societe $soc = '')
Returns the reference to the following non used object depending on the active numbering model defined into MODULE_RIGHTS_CLASS_ADDON
at line 249
string
getNomUrl(int $withpicto, string $title = '')
Return clicable name (with picto eventually)
at line 284
string
getLibStatut(int $mode)
Return label of status of object (draft, validated, .
..)
at line 295
string
getImage($default_image)
Get object image(s)
at line 333
int
generateDocument(string $model)
Create a document onto disk according to template module.
at line 407
int
deleteDocument()
Delete document from disk.