dolibarr 20.0.0
|
Public Member Functions | |
__construct () | |
Constructor. | |
get ($id) | |
Get properties of a bom object. | |
index ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $page=0, $sqlfilters='', $properties='') | |
List boms. | |
post ($request_data=null) | |
Create bom object. | |
put ($id, $request_data=null) | |
Update bom. | |
delete ($id) | |
Delete bom. | |
getLines ($id) | |
Get lines of an BOM. | |
postLine ($id, $request_data=null) | |
Add a line to given BOM. | |
putLine ($id, $lineid, $request_data=null) | |
Update a line to given BOM. | |
deleteLine ($id, $lineid) | |
Delete a line to given BOM. | |
Public Member Functions inherited from DolibarrApi | |
__construct ($db, $cachedir='', $refreshCache=false) | |
Constructor. | |
Protected Member Functions | |
_cleanObjectDatas ($object) | |
Clean sensible object datas. | |
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. | |
_checkFilters ($sqlfilters, &$error='') | |
Return if a $sqlfilters parameter is valid Function no more used. | |
Private Member Functions | |
_validate ($data) | |
Validate fields before create or update object. | |
checkRefNumbering () | |
Validate the ref field and get the next Number if it's necessary. | |
Additional Inherited Members | |
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 38 of file api_boms.class.php.
|
protected |
Clean sensible object datas.
Object | $object | Object to clean |
Reimplemented from DolibarrApi.
Definition at line 501 of file api_boms.class.php.
References $object, and _cleanObjectDatas().
Referenced by _cleanObjectDatas(), get(), getLines(), index(), and putLine().
|
private |
Validate fields before create or update object.
array | $data | Array of data to validate |
RestException |
Definition at line 572 of file api_boms.class.php.
Referenced by post().
|
private |
Validate the ref field and get the next Number if it's necessary.
Definition at line 592 of file api_boms.class.php.
Boms::delete | ( | $id | ) |
Delete bom.
int | $id | BOM ID |
RestException | 403 Access denied |
RestException | 404 BOM not found |
RestException | 500 Error deleting bom |
Definition at line 279 of file api_boms.class.php.
References DolibarrApi\_checkAccessToResource().
Boms::deleteLine | ( | $id, | |
$lineid ) |
Delete a line to given BOM.
int | $id | Id of BOM to update |
int | $lineid | Id of line to delete |
@url DELETE {id}/lines/{lineid}
RestException | 403 Access denied |
RestException | 404 BOM not found |
RestException | 500 Error deleting bom line |
Definition at line 454 of file api_boms.class.php.
References DolibarrApi\_checkAccessToResource().
Boms::get | ( | $id | ) |
Get properties of a bom object.
Return an array with bom information
int | $id | ID of bom |
@url GET {id}
RestException | 403 Access denied |
RestException | 404 BOM not found |
Definition at line 69 of file api_boms.class.php.
References DolibarrApi\_checkAccessToResource(), and _cleanObjectDatas().
Boms::getLines | ( | $id | ) |
Get lines of an BOM.
int | $id | Id of BOM |
@url GET {id}/lines
RestException | 403 Access denied |
RestException | 404 BOM not found |
Definition at line 317 of file api_boms.class.php.
References DolibarrApi\_checkAccessToResource(), and _cleanObjectDatas().
Boms::index | ( | $sortfield = "t.rowid", | |
$sortorder = 'ASC', | |||
$limit = 100, | |||
$page = 0, | |||
$sqlfilters = '', | |||
$properties = '' ) |
List boms.
Get a list of boms
string | $sortfield | Sort field |
string | $sortorder | Sort order |
int | $limit | Limit for list |
int | $page | Page number |
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 |
RestException | 400 Bad sqlfilters |
RestException | 403 Access denied |
RestException | 503 Error retrieving list of boms |
Definition at line 105 of file api_boms.class.php.
References _cleanObjectDatas(), DolibarrApi\_filterObjectProperties(), and forgeSQLFromUniversalSearchCriteria().
Boms::post | ( | $request_data = null | ) |
Create bom object.
array | $request_data | Request datas |
RestException | 403 Access denied |
RestException | 500 Error retrieving list of boms |
Definition at line 188 of file api_boms.class.php.
References DolibarrApi\_checkValForAPI(), _validate(), checkRefNumbering(), and sanitizeVal().
Boms::postLine | ( | $id, | |
$request_data = null ) |
Add a line to given BOM.
@url POST {id}/lines
RestException | 403 Access denied |
RestException | 404 BOM not found |
RestException | 500 Error adding bom line |
Definition at line 353 of file api_boms.class.php.
References DolibarrApi\_checkAccessToResource().
Boms::put | ( | $id, | |
$request_data = null ) |
Update bom.
int | $id | Id of bom to update |
array | $request_data | Datas |
RestException | 403 Access denied |
RestException | 404 BOM not found |
RestException | 500 Error updating bom |
Definition at line 225 of file api_boms.class.php.
References DolibarrApi\_checkAccessToResource(), DolibarrApi\_checkValForAPI(), checkRefNumbering(), and sanitizeVal().
Boms::putLine | ( | $id, | |
$lineid, | |||
$request_data = null ) |
Update a line to given BOM.
@url PUT {id}/lines/{lineid}
RestException | 403 Access denied |
RestException | 404 BOM not found |
Definition at line 403 of file api_boms.class.php.
References DolibarrApi\_checkAccessToResource(), and _cleanObjectDatas().