Salaros\Vtiger\VTWSCLib\Entities

class Entities

Vtiger Web Services PHP Client Session class

Class Entities

__construct($wsClient)

Class constructor

Parameters:
  • $wsClient (object) – Parent WSClient instance
findOneByID($moduleName, $entityID, $select =[])

Retrieves an entity by ID

Parameters:
  • $moduleName
  • $entityID
  • $select
Returns:

array $select The list of fields to select (defaults to SQL-like ‘*’ - all the fields)

findOne($moduleName, $params, $select =[])

Retrieve the entity matching a list of constraints

Parameters:
  • $moduleName
  • $params
  • $select
Returns:

array $select The list of fields to select (defaults to SQL-like ‘*’ - all the fields)

getID($moduleName, $params)

Retrieves the ID of the entity matching a list of constraints + prepends ‘<module_id>x’ string to it

Parameters:
  • $moduleName
  • $params
Returns:

string Type ID (a numeric ID + ‘<module_id>x’)

getNumericID($moduleName, $params)

Retrieve a numeric ID of the entity matching a list of constraints

Parameters:
  • $moduleName
  • $params
Returns:

integer Numeric ID

createOne($moduleName, $params)

Creates an entity for the giving module

Parameters:
  • $moduleName
  • $params
Returns:

array Entity creation results

updateOne($moduleName, $entityID, $params)

Updates an entity

Parameters:
  • $moduleName
  • $entityID
  • $params
Returns:

array Entity update result

deleteOne($moduleName, $entityID)

Provides entity removal functionality

Parameters:
  • $moduleName
  • $entityID
Returns:

array Removal status object

findMany($moduleName, $params, $select =, []$limit = 0)

Retrieves multiple records using module name and a set of constraints

Parameters:
  • $moduleName
  • $params
  • $select
  • $limit
Returns:

array $select The list of fields to select (defaults to SQL-like ‘*’ - all the fields)

sync($modifiedTime = null, $moduleName = null)

Sync will return a sync result object containing details of changes after modifiedTime

Parameters:
  • $modifiedTime
  • $moduleName
Returns:

array Sync result object

getQueryString($moduleName, $params, $select =, []$limit = 0)

Builds the query using the supplied parameters

Parameters:
  • $moduleName
  • $params
  • $select
  • $limit
Returns:

string $select The list of fields to select (defaults to SQL-like ‘*’ - all the fields)