Tickets
class Tickets extends DolibarrApi (View source)
API class for ticket object
Properties
| protected DoliDB | $db | from DolibarrApi | |
| Restler | $r | from DolibarrApi | |
| static string[] | $FIELDS | ||
| static string[] | $FIELDS_MESSAGES | ||
| Ticket | $ticket |
Methods
Constructor
Check and convert a string depending on its type/name.
Filter properties that will be returned on object
Clean sensible object datas
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 properties of a Ticket object.
Get properties of a Ticket object from track id
Get properties of a Ticket object from ref
List tickets
Create ticket object
Add a new message to an existing ticket identified by property ->track_id into request.
Update ticket
Delete ticket
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 datas
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, int $contact_list = 1)
Get properties of a Ticket object.
Return an array with ticket information
array|mixed
getByTrackId(string $track_id, int $contact_list = 1)
Get properties of a Ticket object from track id
Return an array with ticket information
array|mixed
getByRef(string $ref, int $contact_list = 1)
Get properties of a Ticket object from ref
Return an array with ticket information
array
index(int $socid = 0, string $sortfield = "t.rowid", string $sortorder = "ASC", int $limit = 100, int $page = 0, string $sqlfilters = '', string $properties = '', int $loadcontacts = 0, bool $pagination_data = false)
List tickets
Get a list of tickets
int
post(array $request_data = null)
Create ticket object
int
postNewMessage(array $request_data = null)
Add a new message to an existing ticket identified by property ->track_id into request.
object
put(int $id, array $request_data = null)
Update ticket
array
delete(int $id)
Delete ticket