Ctyperesource
class Ctyperesource extends CommonDict (View source)
Class Ctyperesource
Properties
| DoliDB | $db | from CommonDict | |
| $error | from CommonDict | ||
| string[] | $errors | from CommonDict | |
| int | $id | from CommonDict | |
| ?int | $entity | from CommonDict | |
| ?string | $code | from CommonDict | |
| ?string | $label | from CommonDict | |
| ?int<0, 1> | $active | from CommonDict | |
| string | $element | ||
| string | $table_element | ||
| CtyperesourceLine[] | $lines |
Methods
int
fetch(int $id, string $code = '', string $label = '')
Load object in memory from the database
int
fetchAll(string $sortorder = '', string $sortfield = '', int $limit = 0, int $offset = 0, string|array<string, mixed> $filter = '', string $filtermode = 'AND')
Load object in memory from the database
int
createFromClone(User $user, int $fromid)
Load an object from its id and create a new one in database
int
initAsSpecimen()
Initialise object with example values Id must be 0 if object instance is a specimen
Details
__construct(DoliDB $db)
Constructor
int
create(User $user, int $notrigger = 0)
Create object into database
int
fetch(int $id, string $code = '', string $label = '')
Load object in memory from the database
int
fetchAll(string $sortorder = '', string $sortfield = '', int $limit = 0, int $offset = 0, string|array<string, mixed> $filter = '', string $filtermode = 'AND')
Load object in memory from the database
int
update(User $user, int $notrigger = 0)
Update object into 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
int
initAsSpecimen()
Initialise object with example values Id must be 0 if object instance is a specimen