dolibarr  13.0.2
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
Boms Class Reference
+ Inheritance diagram for Boms:
+ Collaboration diagram for Boms:

Public Member Functions

 __construct ()
 Constructor.
 
 get ($id)
 Get properties of a bom object. More...
 
 index ($sortfield="t.rowid", $sortorder= 'ASC', $limit=100, $page=0, $sqlfilters= '')
 List boms. More...
 
 post ($request_data=null)
 Create bom object. More...
 
 put ($id, $request_data=null)
 Update bom. More...
 
 delete ($id)
 Delete bom. More...
 
- Public Member Functions inherited from DolibarrApi
 __construct ($db, $cachedir= '', $refreshCache=false)
 Constructor. More...
 

Protected Member Functions

 _cleanObjectDatas ($object)
 Clean sensible object datas. More...
 
- Protected Member Functions inherited from DolibarrApi
 _cleanObjectDatas ($object)
 Executed method when API is called without parameter. More...
 
 _checkFilters ($sqlfilters)
 Return if a $sqlfilters parameter is valid. More...
 

Private Member Functions

 _validate ($data)
 Validate fields before create or update object. More...
 

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 user access to a resource. More...
 
static _forge_criteria_callback ($matches)
 Function to forge a SQL criteria. More...
 

Detailed Description

Definition at line 37 of file api_boms.class.php.

Member Function Documentation

Boms::_cleanObjectDatas (   $object)
protected

Clean sensible object datas.

Parameters
Object$objectObject to clean
Returns
Object Object with cleaned properties

Definition at line 275 of file api_boms.class.php.

Referenced by get(), and index().

Boms::_validate (   $data)
private

Validate fields before create or update object.

Parameters
array$dataArray of data to validate
Returns
array
Exceptions
RestException

Definition at line 339 of file api_boms.class.php.

Referenced by post().

Boms::delete (   $id)

Delete bom.

Parameters
int$idBOM ID
Returns
array

Definition at line 240 of file api_boms.class.php.

References DolibarrApi\_checkAccessToResource().

Boms::get (   $id)

Get properties of a bom object.

Return an array with bom informations

Parameters
int$idID of bom
Returns
array|mixed data without useless information

GET {id}

Exceptions
RestException

Definition at line 65 of file api_boms.class.php.

References DolibarrApi\_checkAccessToResource(), and _cleanObjectDatas().

Boms::index (   $sortfield = "t.rowid",
  $sortorder = 'ASC',
  $limit = 100,
  $page = 0,
  $sqlfilters = '' 
)

List boms.

Get a list of boms

Parameters
string$sortfieldSort field
string$sortorderSort order
int$limitLimit for list
int$pagePage number
string$sqlfiltersOther criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"
Returns
array Array of order objects
Exceptions
RestException

Definition at line 98 of file api_boms.class.php.

References DolibarrApi\_checkFilters(), _cleanObjectDatas(), and db.

Boms::post (   $request_data = null)

Create bom object.

Parameters
array$request_dataRequest datas
Returns
int ID of bom

Definition at line 182 of file api_boms.class.php.

References _validate().

Boms::put (   $id,
  $request_data = null 
)

Update bom.

Parameters
int$idId of bom to update
array$request_dataDatas
Returns
int

Definition at line 207 of file api_boms.class.php.

References DolibarrApi\_checkAccessToResource().


The documentation for this class was generated from the following file: