Interventions
class Interventions extends DolibarrApi (View source)
API class for Interventions
Properties
| protected DoliDB | $db | from DolibarrApi | |
| Restler | $r | from DolibarrApi | |
| static string[] | $FIELDS | ||
| static string[] | $FIELDSLINE | ||
| Fichinter | $fichinter |
Methods
Constructor
Check and convert a string depending on its type/name.
Filter properties that will be returned on object
Clean sensible object data
Check access by user to a given resource
Return if a $sqlfilters parameter is valid Function no more used. Kept for backward compatibility with old APIs of modules
Function to forge a SQL criteria from a Generic filter string.
Get an intervention Return an array with intervention information
List interventions
Create an intervention
Update intervention general fields (won't touch lines of fichinter)
Add a line to an intervention
Delete an intervention
Validate an intervention
Close an intervention
Delete the line of the interventional.
Sets an intervention as draft
Adds a contact to an interventional
Get contacts of given interventional
Delete a contact type of given interventional
update the line of the interventional.
Details
__construct()
Constructor
protected string|array<string, mixed>
_checkValForAPI(string $field, string|string[] $value, object $object)
Check and convert a string depending on its type/name.
protected object
_filterObjectProperties(object $object, string $properties)
Filter properties that will be returned on object
protected object
_cleanObjectDatas(object $object)
Clean sensible object data
static protected bool
_checkAccessToResource(string $resource, int $resource_id = 0, string $dbtablename = '', string $feature2 = '', string $dbt_keyfield = 'fk_soc', string $dbt_select = 'rowid')
Check access by user to a given resource
protected bool|string
_checkFilters(string $sqlfilters, string $error = '')
Return if a $sqlfilters parameter is valid Function no more used. Kept for backward compatibility with old APIs of modules
static protected string
_forge_criteria_callback(string[] $matches)
Function to forge a SQL criteria from a Generic filter string.
Function no more used. Kept for backward compatibility with old APIs of modules
object
get(int $id, string $ref = '', string $ref_ext = '', int $contact_list = 1)
Get an intervention Return an array with intervention information
array
index(string $sortfield = "t.rowid", string $sortorder = 'ASC', int $limit = 100, int $page = 0, string $thirdparty_ids = '', string $sqlfilters = '', string $properties = '', string $contact_type = '', bool $pagination_data = false, int $loadlinkedobjects = 0)
List interventions
Get a list of interventions
int
post(array $request_data = null)
Create an intervention
object
put(int $id, array $request_data = null)
Update intervention general fields (won't touch lines of fichinter)
int
postLine(int $id, array $request_data = null)
Add a line to an intervention
array
delete(int $id)
Delete an intervention
object
validate(int $id, int $notrigger = 0)
Validate an intervention
If you get a bad value for param notrigger check, provide this in body { "notrigger": 0 }
object
close(int $id, int $notrigger = 0)
Close an intervention
If you get a bad value for param notrigger check, provide this in body { "notrigger": 0 }
object
deleteInterventionalLine(int $id, int $lineid)
Delete the line of the interventional.
object
settodraft(int $id)
Sets an intervention as draft
object
addContact(int $id, int $fk_socpeople, string $type_contact, string $source, int $notrigger = 0)
Adds a contact to an interventional
array<int, mixed>
getContacts(int $id, string $type = '')
Get contacts of given interventional
Return an array with contact information
object
deleteContact(int $id, int $contactid, string $type)
Delete a contact type of given interventional
object|false
updateInterventionalLine(int $id, int $lineid, array $request_data)
update the line of the interventional.