Documentation

Record extends BaseAction
in package

Record class.

Table of Contents

$allowedHeaders  : array<string|int, mixed>
$allowedMethod  : mixed
{@inheritdoc}
$controller  : Controller
$responseType  : string
$recordModel  : Vtiger_Record_Model
Record model.
$userData  : array<string|int, mixed>
checkAction()  : void
Check called action.
getLanguage()  : string
Get current language.
getParentCrmId()  : int|null
Get parent record.
getPermissionType()  : int
Get permission type.
getUserCrmId()  : int
Get crmid for portal user.
getUserData()  : mixed
Get user data and session data.
getUserStorageId()  : int
Get user storage ID.
post()  : array<string|int, mixed>
Add record.
preProcess()  : mixed
Pre process function.
setAllUserData()  : void
Set user data.
setUserData()  : void
Set user data.
updateSession()  : void
Update user session.
updateUser()  : void
Update user data.
checkLifetimeSession()  : void
Check lifetime user session.
checkPermission()  : void
Check permission to method.
checkPermissionToModule()  : void
Check permission to module.
loadSession()  : void
Load user session data .

Properties

$allowedHeaders

public array<string|int, mixed> $allowedHeaders = []

Allowed headers

$allowedMethod

{@inheritdoc}

public mixed $allowedMethod = ['POST']

$responseType

public string $responseType = 'data'

Response data type.

$userData

private array<string|int, mixed> $userData = []

User data

Methods

checkAction()

Check called action.

public checkAction() : void
Tags
throws
Exception
Return values
void

getLanguage()

Get current language.

public getLanguage() : string
Return values
string

getParentCrmId()

Get parent record.

public getParentCrmId() : int|null
Tags
throws
Exception
Return values
int|null

getPermissionType()

Get permission type.

public getPermissionType() : int
Return values
int

getUserCrmId()

Get crmid for portal user.

public getUserCrmId() : int
Return values
int

getUserData()

Get user data and session data.

public getUserData(string $key[, string $param = '' ]) : mixed
Parameters
$key : string
$param : string = ''
Return values
mixed

getUserStorageId()

Get user storage ID.

public getUserStorageId() : int
Return values
int

post()

Add record.

public post() : array<string|int, mixed>
Tags
OA\Post

( path="/webservice/ManageConsents/ApprovalsRegister/Record", summary="Adds an consent entry", tags={"ApprovalsRegister"}, security={ {"basicAuth" : }, "ApiKeyAuth" : }, "token" : }} }, @OA\RequestBody( required=true, description="Required data for communication", @OA\JsonContent(ref="#/components/schemas/ApprovalsRegister_Post_Record_Request"), @OA\MediaType( mediaType="multipart/form-data", @OA\Schema(ref="#/components/schemas/ApprovalsRegister_Post_Record_Request") ), @OA\MediaType( mediaType="application/x-www-form-urlencoded", @OA\Schema(ref="#/components/schemas/ApprovalsRegister_Post_Record_Request") ), ), @OA\Response( response=200, description="Result of adding entry", @OA\JsonContent(ref="#/components/schemas/ApprovalsRegister_Post_Record_Response"), @OA\XmlContent(ref="#/components/schemas/ApprovalsRegister_Post_Record_Response"), ), @OA\Response( response=401, description="No sent token OR Invalid token", ), @OA\Response( response=403, description="No permissions for module", ), @OA\Response( response=405, description="Method Not Allowed", ), ),

OA\Schema

( schema="ApprovalsRegister_Post_Record_Request", title="A list of fields required while creating an entry", description="The list is based on fields in the Consent register module. Accepting or declining consent takes place based on the value in the approvals_register_status field.", type="object", example={ "subject" : "Text", "approvalsid" : "123", "contactid" : "321", "approvals_register_type" : "PLL_ACCEPTANCE", "approvals_register_status" : "PLL_FOR_VERIFICATION", "registration_date" : "2019-11-12 12:00" } ),

OA\Schema

( schema="ApprovalsRegister_Post_Record_Response", title="Adding an entry", description="Result of adding entry", type="object", @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"), @OA\Property( property="result", description="Result of adding entry", type="object", @OA\Property( property="id", type="integer", description="New entry ID. Empty value means that the operation was unsuccessful.", example=24842 ), @OA\Property( property="error", type="string", example="", description="Error message. The variable exists when some of the provided data is incomplete and the entry could not be added.", ) ), ),

Return values
array<string|int, mixed>

preProcess()

Pre process function.

public preProcess() : mixed
Return values
mixed

setAllUserData()

Set user data.

public setAllUserData(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>
Return values
void

setUserData()

Set user data.

public setUserData(string $key, mixed $value) : void
Parameters
$key : string
$value : mixed
Return values
void

updateSession()

Update user session.

public updateSession([array<string|int, mixed> $data = [] ]) : void
Parameters
$data : array<string|int, mixed> = []
Return values
void

updateUser()

Update user data.

public updateUser([array<string|int, mixed> $data = [] ]) : void
Parameters
$data : array<string|int, mixed> = []
Return values
void

checkLifetimeSession()

Check lifetime user session.

protected checkLifetimeSession() : void
Tags
throws
Exception
Return values
void

checkPermission()

Check permission to method.

protected checkPermission() : void
Return values
void

checkPermissionToModule()

Check permission to module.

protected checkPermissionToModule() : void
Tags
throws
Exception
Return values
void

loadSession()

Load user session data .

protected loadSession() : void
Tags
throws
Exception
Return values
void

        

Search results