CLeadStatus
class CLeadStatus extends CommonDict (View source)
Class of dictionary of opportunity status
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 | |
| CLeadStatus> | $records | ||
| string | $element | ||
| string | $table_element | ||
| int | $position | ||
| float | $percent | ||
| array<string, array{type: string, label: string, enabled: int<0, 2>|string, position: int, notnull?: int, visible: int<-5, 5>|string, alwayseditable?: int<0, 1>, noteditable?: int<0, 1>, default?: string, index?: int, foreignkey?: string, searchall?: int<0, 1>, isameasure?: int<0, 1>, css?: string, csslist?: string, help?: string, showoncombobox?: int<0, 4>, disabled?: int<0, 1>, arrayofkeyval?: array<int|string, string>, autofocusoncreate?: int<0, 1>, comment?: string, copytoclipboard?: int<1, 2>, validate?: int<0, 1>, showonheader?: int<0, 1>}> | $fields |
Methods
__construct($db)
Constructor
create($user, int $notrigger = 0)
Create object into database
fetch($id, string $code = '')
Load object in memory from database
array|int
fetchAll(string $sortorder = '', string $sortfield = '', int $limit = 0, int $offset = 0, string $filter = '', string $filtermode = 'AND')
Load list of objects in memory from the database.
update($user = null, int $notrigger = 0)
Update object into database
Details
__construct($db)
Constructor
@param DoliDB $db Database handler
create($user, int $notrigger = 0)
Create object into database
@param User $user User that create
fetch($id, string $code = '')
Load object in memory from database
@param int $id Id of CUnit object to fetch (rowid)
array|int
fetchAll(string $sortorder = '', string $sortfield = '', int $limit = 0, int $offset = 0, string $filter = '', string $filtermode = 'AND')
Load list of objects in memory from the database.
update($user = null, int $notrigger = 0)
Update object into database
@param User $user User that modify
delete(User $user, $notrigger = 0)
Delete object in database