dolibarr 22.0.5
EventAttendees Class Reference
Inheritance diagram for EventAttendees:
Collaboration diagram for EventAttendees:

Public Member Functions

 __construct ()
 Constructor of the class.
 
 deleteById ($id)
 Delete an event attendee.
 
 deleteByRef ($ref)
 Delete an event attendee.
 
 getById ($id)
 Get properties of a event attendee by id.
 
 getByRef ($ref)
 Get properties of an event attendee by ref.
 
 index ($sortfield="t.rowid", $sortorder='ASC', $limit=100, $page=0, $sqlfilters='', $properties='', $pagination_data=false)
 List Event attendees.
 
 post ($request_data=null)
 Create an event attendee.
 
 putById ($id, $request_data=null)
 Update an event attendee.
 
 putByRef ($ref, $request_data=null)
 Update an event attendee.
 
- 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 an event attendee.
 
 _validate ($data)
 Validate fields before create or update object.
 
 _checkAccessRights ($accesstype, $project_id=0)
 function to check for access rights - should probably have 1.
 

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 31 of file api_eventattendees.class.php.

Member Function Documentation

◆ _checkAccessRights()

EventAttendees::_checkAccessRights ( $accesstype,
$project_id = 0 )
private

function to check for access rights - should probably have 1.

parameter which is read/write/delete/... Why a separate function? because we probably needs to check so many many different kinds of objects

Parameters
string$accesstypeaccesstype: read, write, delete, ...
int$project_idwhich project do we need to check for access to, 0 means don't check
Returns
bool Return true if access is granted else false
Exceptions
RestException403
RestException500

Definition at line 603 of file api_eventattendees.class.php.

References dol_syslog().

Referenced by _fetch(), deleteById(), deleteByRef(), index(), post(), putById(), and putByRef().

◆ _cleanObjectDatas()

EventAttendees::_cleanObjectDatas ( $object)
protected

Clean sensible object datas.

Parameters
Object$objectObject to clean @phan-param ConferenceOrBoothAttendee $object @phpstan-param ConferenceOrBoothAttendee $object
Returns
Object Object with cleaned properties @phan-return ConferenceOrBoothAttendee @phpstan-return ConferenceOrBoothAttendee

Reimplemented from DolibarrApi.

Definition at line 497 of file api_eventattendees.class.php.

References $object.

Referenced by _fetch(), and index().

◆ _fetch()

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

Get properties of an event attendee.

Return an array with Event attendees

Parameters
int$idID of event_attendees
string$refRef of event_attendees
Returns
Object Object with cleaned properties @phan-return ConferenceOrBoothAttendee @phpstan-return ConferenceOrBoothAttendee
Exceptions
RestException403
RestException404

Definition at line 463 of file api_eventattendees.class.php.

References $id, _checkAccessRights(), and _cleanObjectDatas().

Referenced by getById(), getByRef(), putById(), and putByRef().

◆ _validate()

EventAttendees::_validate ( $data)
private

Validate fields before create or update object.

Parameters
?array<string,null|int|string>$data Data to validate
Returns
array<string,null|int|string> Return array with validated mandatory fields and their value @phan-return array<string,?int|?string> Return array with validated mandatory fields and their value
Exceptions
RestException400

Definition at line 580 of file api_eventattendees.class.php.

Referenced by post().

◆ deleteById()

EventAttendees::deleteById ( $id)

Delete an event attendee.

Parameters
int$idevent attendee ID
Returns
array @phan-return array<array<string,int|string>> @phpstan-return array<array<string,int|string>>

@url DELETE {id}

Exceptions
RestException403
RestException404
RestException500

Definition at line 85 of file api_eventattendees.class.php.

References $id, and _checkAccessRights().

◆ deleteByRef()

EventAttendees::deleteByRef ( $ref)

Delete an event attendee.

Parameters
string$refevent attendee ref
Returns
array @phan-return array<array<string,int|string>> @phpstan-return array<array<string,int|string>>

@url DELETE ref/{ref}

Exceptions
RestException403
RestException404
RestException500

Definition at line 123 of file api_eventattendees.class.php.

References _checkAccessRights().

◆ getById()

EventAttendees::getById ( $id)

Get properties of a event attendee by id.

Return an array with event attendee information

Parameters
int$idID of event attendee
Returns
Object Object with cleaned properties @phan-return ConferenceOrBoothAttendee @phpstan-return ConferenceOrBoothAttendee

@url GET {id}

Exceptions
RestException403
RestException404

Definition at line 162 of file api_eventattendees.class.php.

References $id, and _fetch().

◆ getByRef()

EventAttendees::getByRef ( $ref)

Get properties of an event attendee by ref.

Return an array with order information

Parameters
string$refRef of object
Returns
Object Object with cleaned properties @phan-return ConferenceOrBoothAttendee @phpstan-return ConferenceOrBoothAttendee

@url GET ref/{ref}

Exceptions
RestException403
RestException404

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

References _fetch().

◆ index()

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

List Event attendees.

Get a list of Event attendees

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.status:=:1) and (t.email:=:'bad@example.com')"
string$propertiesRestrict the data returned to these properties. Ignored if empty. Comma separated list of properties names
bool$pagination_dataIf this parameter is set to true the response will include pagination data. Default value is false. Page starts from 0*
Returns
array Array of order objects @phan-return ConferenceOrBoothAttendee[]|array{data:ConferenceOrBoothAttendee[],pagination:array{total:int,page:int,page_count:int,limit:int}} @phpstan-return ConferenceOrBoothAttendee[]|array{data:ConferenceOrBoothAttendee[],pagination:array{total:int,page:int,page_count:int,limit:int}}

@url GET

Exceptions
RestException403 Access denied
RestException503 Error

Definition at line 208 of file api_eventattendees.class.php.

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

◆ post()

EventAttendees::post ( $request_data = null)

Create an event attendee.

Example: {"module":"adherent","type_template":"member","active": 1,"ref":"(SendingEmailOnAutoSubscription)","fk_user":0,"joinfiles": "0", ... } Required: {"ref":"myBestTemplate","topic":"myBestOffer","type_template":"propal_send"}

Parameters
array$request_dataRequest data @phan-param ?array<string,string> $request_data @phpstan-param ?array<string,string> $request_data

@url POST

Returns
int ID of event attendee
Exceptions
RestException304
RestException403
RestException500

Definition at line 316 of file api_eventattendees.class.php.

References _checkAccessRights(), DolibarrApi\_checkValForAPI(), _validate(), and sanitizeVal().

◆ putById()

EventAttendees::putById ( $id,
$request_data = null )

Update an event attendee.

Example: {"module":"adherent","type_template":"member","active": 1,"ref":"(SendingEmailOnAutoSubscription)","fk_user":0,"joinfiles": "0", ... } Required: {"ref":"myBestTemplate","topic":"myBestOffer","type_template":"propal_send"}

Parameters
int$idId of order to update
array$request_dataData @phan-param ?array<string,string> $request_data @phpstan-param ?array<string,string> $request_data

@url PUT {id}

Returns
Object Object with cleaned properties
Exceptions
RestException403
RestException404
RestException500

Definition at line 362 of file api_eventattendees.class.php.

References $id, _checkAccessRights(), DolibarrApi\_checkValForAPI(), _fetch(), and sanitizeVal().

◆ putByRef()

EventAttendees::putByRef ( $ref,
$request_data = null )

Update an event attendee.

Example: {"module":"adherent","type_template":"member","active": 1,"ref":"(SendingEmailOnAutoSubscription)","fk_user":0,"joinfiles": "0", ... } Required: {"ref":"myBestTemplate","topic":"myBestOffer","type_template":"propal_send"}

Parameters
string$refRef of order to update
array$request_dataData @phan-param ?array<string,string> $request_data @phpstan-param ?array<string,string> $request_data

@url PUT ref/{ref}

Returns
Object Object with cleaned properties
Exceptions
RestException403
RestException404
RestException500

Definition at line 413 of file api_eventattendees.class.php.

References _checkAccessRights(), DolibarrApi\_checkValForAPI(), _fetch(), and sanitizeVal().


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