dolibarr 20.0.0
Workstations Class Reference
Inheritance diagram for Workstations:
Collaboration diagram for Workstations:

Public Member Functions

 __construct ()
 Constructor.
 
 get ($id)
 Get properties of a workstation object by id.
 
 getByRef ($ref)
 Get properties of a workstation object by ref.
 
 index ($sortfield="t.ref", $sortorder='ASC', $limit=100, $page=0, $sqlfilters='', $properties='')
 List workstations.
 
- 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

 _fetch ($id, $ref='')
 Get properties of 1 workstation object.
 

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.
 

Detailed Description

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

Member Function Documentation

◆ _cleanObjectDatas()

Workstations::_cleanObjectDatas ( $object)
protected

Clean sensible object datas.

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

Reimplemented from DolibarrApi.

Definition at line 188 of file api_workstations.class.php.

References $object.

Referenced by _fetch(), and index().

◆ _fetch()

Workstations::_fetch ( $id,
$ref = '' )
private

Get properties of 1 workstation object.

Return an array with workstation information.

Parameters
int$idID of product
string$refRef of element
Returns
array|mixed Data without useless information
Exceptions
RestException401
RestException403
RestException404

Definition at line 305 of file api_workstations.class.php.

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

Referenced by get(), and getByRef().

◆ get()

Workstations::get ( $id)

Get properties of a workstation object by id.

Return an array with workstation information.

Parameters
int$idID of workstation
Returns
array|mixed Data without useless information

@url GET {id}

Exceptions
RestException401
RestException403
RestException404

Definition at line 69 of file api_workstations.class.php.

References _fetch().

◆ getByRef()

Workstations::getByRef ( $ref)

Get properties of a workstation object by ref.

Return an array with workstation information.

Parameters
string$refRef of element
Returns
array|mixed Data without useless information

@url GET ref/{ref}

Exceptions
RestException401
RestException403
RestException404

Definition at line 89 of file api_workstations.class.php.

References _fetch().

◆ index()

Workstations::index ( $sortfield = "t.ref",
$sortorder = 'ASC',
$limit = 100,
$page = 0,
$sqlfilters = '',
$properties = '' )

List workstations.

Get a list of workstations

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.tobuy:=:0) and (t.tosell:=:1)"
string$propertiesRestrict the data returned to these properties. Ignored if empty. Comma separated list of properties names
Returns
array Array of workstation objects

Definition at line 107 of file api_workstations.class.php.

References _cleanObjectDatas(), DolibarrApi\_filterObjectProperties(), and forgeSQLFromUniversalSearchCriteria().


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