|
dolibarr 23.0.3
|


Public Member Functions | |
| __construct () | |
| Constructor. | |
| get ($id) | |
| Get a leave. | |
| index ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $page=0, $user_ids='', $sqlfilters='', $properties='', $pagination_data=false) | |
| List leaves. | |
| post ($request_data=null) | |
| Create a leave. | |
| put ($id, $request_data=null) | |
| Update expense report general fields. | |
| delete ($id) | |
| Delete holiday. | |
| validate ($id, $notrigger=0) | |
| Validate a holiday. | |
| approve ($id, $notrigger=0) | |
| Approve a leave. | |
| cancel ($id, $notrigger=0) | |
| Cancel a holiday. | |
| refuse ($id, $detail_refuse, $notrigger=0) | |
| Refuse a holiday. | |
| reopen ($id, $notrigger=0) | |
| Reopen a canceled holiday. | |
Public Member Functions inherited from DolibarrApi | |
| __construct ($db, $cachedir='', $refreshCache=false) | |
| Constructor. | |
Private Member Functions | |
| _validate ($data) | |
| Validate fields before create or update object. | |
Additional Inherited Members | |
Protected Member Functions inherited from DolibarrApi | |
| _checkValForAPI ($field, $value, $object) | |
| Check and convert a string depending on its type/name. | |
| _filterObjectProperties ($object, $properties) | |
| Filter properties that will be returned on object. | |
| _cleanObjectDatas ($object) | |
| Clean sensitive object data @phpstan-template T. | |
| _checkFilters ($sqlfilters, &$error='') | |
| Return if a $sqlfilters parameter is valid Function no more used. | |
Static Protected Member Functions inherited from DolibarrApi | |
| static | _checkAccessToResource ($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid') |
| Check access by user to a given resource. | |
| static | _forge_criteria_callback ($matches) |
| Function to forge a SQL criteria from a Generic filter string. | |
Definition at line 36 of file api_holidays.class.php.
|
private |
Validate fields before create or update object.
| ?array<string,string> | $data Array with data to verify |
| RestException |
Definition at line 639 of file api_holidays.class.php.
Referenced by post().
| Holidays::approve | ( | $id, | |
| $notrigger = 0 ) |
Approve a leave.
If you get a bad value for param notrigger check, provide this in body { "notrigger": 0 }
| int | $id | Leave ID |
| int | $notrigger | 1=Does not execute triggers, 0= execute triggers |
@url POST {id}/approve
| RestException |
Definition at line 401 of file api_holidays.class.php.
References $id, DolibarrApi\_checkAccessToResource(), DolibarrApi\_cleanObjectDatas(), and Holiday\STATUS_APPROVED.
| Holidays::cancel | ( | $id, | |
| $notrigger = 0 ) |
Cancel a holiday.
If you get a bad value for param notrigger check, provide this in body { "notrigger": 0 }
| int | $id | Holiday ID |
| int | $notrigger | 1=Does not execute triggers, 0= execute triggers |
@url POST {id}/cancel
| RestException |
Definition at line 446 of file api_holidays.class.php.
References $id, DolibarrApi\_checkAccessToResource(), DolibarrApi\_cleanObjectDatas(), and Holiday\STATUS_CANCELED.
| Holidays::delete | ( | $id | ) |
Delete holiday.
| int | $id | Leave Report ID |
| RestException |
Definition at line 309 of file api_holidays.class.php.
References $id, and DolibarrApi\_checkAccessToResource().
| Holidays::get | ( | $id | ) |
Get a leave.
Return an array with leave information
| int | $id | ID of Leave |
| RestException |
Definition at line 76 of file api_holidays.class.php.
References $id, DolibarrApi\_checkAccessToResource(), and DolibarrApi\_cleanObjectDatas().
| Holidays::index | ( | $sortfield = "t.rowid", | |
| $sortorder = 'ASC', | |||
| $limit = 100, | |||
| $page = 0, | |||
| $user_ids = '', | |||
| $sqlfilters = '', | |||
| $properties = '', | |||
| $pagination_data = false ) |
List leaves.
Get a list of Leaves
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| int | $limit | List limit |
| int | $page | Page number |
| string | $user_ids | User ids filter field. Example: '1' or '1,2,3' {@pattern /^[0-9,]*$/i} |
| string | $sqlfilters | Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" |
| string | $properties | Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names |
| bool | $pagination_data | If this parameter is set to true the response will include pagination data. Default value is false. Page starts from 0* |
| RestException |
Definition at line 114 of file api_holidays.class.php.
References DolibarrApi\_cleanObjectDatas(), DolibarrApi\_filterObjectProperties(), and forgeSQLFromUniversalSearchCriteria().
| Holidays::post | ( | $request_data = null | ) |
Create a leave.
| array | $request_data | Request data @phan-param ?array<string,string> $request_data @phpstan-param ?array<string,string> $request_data |
| RestException |
Definition at line 206 of file api_holidays.class.php.
References DolibarrApi\_checkValForAPI(), _validate(), and sanitizeVal().
| Holidays::put | ( | $id, | |
| $request_data = null ) |
Update expense report general fields.
Does not touch lines of the expense report
| int | $id | Leave ID to update |
| array | $request_data | Expense report data @phan-param ?array<string,string> $request_data @phpstan-param ?array<string,string> $request_data |
| RestException | 401 Not allowed |
| RestException | 404 Expense report not found |
| RestException | 500 System error |
Definition at line 256 of file api_holidays.class.php.
References $id, DolibarrApi\_checkAccessToResource(), DolibarrApi\_checkValForAPI(), and sanitizeVal().
| Holidays::refuse | ( | $id, | |
| $detail_refuse, | |||
| $notrigger = 0 ) |
Refuse a holiday.
If you get a bad value for param notrigger check, provide this in body { "notrigger": 0 }
| int | $id | Holiday ID |
| string | $detail_refuse | Comments for refusal |
| int | $notrigger | 1=Does not execute triggers, 0= execute triggers |
@url POST {id}/refuse
| RestException |
Definition at line 493 of file api_holidays.class.php.
References $id, DolibarrApi\_checkAccessToResource(), DolibarrApi\_cleanObjectDatas(), and Holiday\STATUS_REFUSED.
| Holidays::reopen | ( | $id, | |
| $notrigger = 0 ) |
Reopen a canceled holiday.
This method allows to reopen a holiday that was previously canceled and set its status back to VALIDATED
If you get a bad value for param notrigger check, provide this in body { "notrigger": 0 }
| int | $id | Holiday ID |
| int | $notrigger | 1=Does not execute triggers, 0= execute triggers |
@url POST {id}/reopen
| RestException |
Definition at line 543 of file api_holidays.class.php.
References $id, DolibarrApi\_checkAccessToResource(), DolibarrApi\_cleanObjectDatas(), Holiday\STATUS_CANCELED, and Holiday\STATUS_VALIDATED.
| Holidays::validate | ( | $id, | |
| $notrigger = 0 ) |
Validate a holiday.
If you get a bad value for param notrigger check, provide this in body { "notrigger": 0 }
| int | $id | Leave report ID |
| int | $notrigger | 1=Does not execute triggers, 0= execute triggers |
@url POST {id}/validate
| RestException |
Definition at line 355 of file api_holidays.class.php.
References $id, DolibarrApi\_checkAccessToResource(), DolibarrApi\_cleanObjectDatas(), and Holiday\STATUS_VALIDATED.