Documentation

Widgets extends BaseAction
in package

Webservice premium container - Gets a list of widgets class.

Table of Contents

$allowedHeaders  : array<string|int, mixed>
$allowedMethod  : array<string|int, string>
$controller  : Controller
$responseType  : string
$supportedTypes  : array<string|int, string>
$userData  : array<string|int, mixed>
checkAction()  : void
Check called action.
get()  : array<string|int, mixed>
Get widgets list method.
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.
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

public array<string|int, string> $allowedMethod = ['GET']

Allowed methods

$responseType

public string $responseType = 'data'

Response data type.

$supportedTypes

protected array<string|int, string> $supportedTypes = ['RelatedModule', 'Updates', 'Comments', 'DetailView']

Supported widget types

$userData

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

User data

Methods

checkAction()

Check called action.

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

get()

Get widgets list method.

public get() : array<string|int, mixed>
Tags
OA\Get

( path="/webservice/WebservicePremium/{moduleName}/Widgets", summary="Gets a list of widgets", description="List of widgets", tags={"BaseModule"}, security={{"basicAuth" : }, "ApiKeyAuth" : }, "token" : }}}, @OA\Parameter(name="moduleName", description="Module name", @OA\Schema(type="string"), in="path", example="Contacts", required=true), @OA\Response( response=200, description="List of widgets", @OA\JsonContent(ref="#/components/schemas/BaseModule_Get_Widgets_Response"), @OA\XmlContent(ref="#/components/schemas/BaseModule_Get_Widgets_Response"), ), @OA\Response( response=401, description="No sent token, Invalid token, Token has expired", @OA\JsonContent(ref="#/components/schemas/Exception"), @OA\XmlContent(ref="#/components/schemas/Exception"), ), @OA\Response( response=403, description="No permissions for module", @OA\JsonContent(ref="#/components/schemas/Exception"), @OA\XmlContent(ref="#/components/schemas/Exception"), ), @OA\Response( response=405, description="Invalid method", @OA\JsonContent(ref="#/components/schemas/Exception"), @OA\XmlContent(ref="#/components/schemas/Exception"), ), ),

OA\Schema

( schema="BaseModule_Get_Widgets_Response", title="Base module - Response action - data of widgets", description="Module action - Data of widgets - response body", type="object", required={"status", "result"}, @OA\Property( property="status", type="integer", description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error", enum={0, 1}, ), @OA\Property( property="result", type="object", description="List of widgets", @OA\AdditionalProperties(type="object", ref="#/components/schemas/BaseModule_Widget_Result"), ), ),

OA\Schema

( schema="BaseModule_Widget_Result", title="Widget data by specific ID", description="Module action - Widget for specific ID - response data", type="object", required={"id", "type", "label", "wcol", "sequence", "name", "data"}, @OA\Property(property="id", type="integer", description="Widget ID", example=12), @OA\Property(property="type", type="string", description="Widget type", example="RelatedModule"), @OA\Property(property="label", type="string", description="Widget label", example="Contacts"), @OA\Property(property="wcol", type="integer", description="Widget position", example=1, enum={1, 2, 3}), @OA\Property(property="sequence", type="integer", description="Sequence", example=1), @OA\Property(property="name", type="string", description="The translated name of the widget", example="Contacts"), @OA\Property(property="data", type="object", description="Widget specific data", example={ "relation_id" : 1, "relatedmodule" : 4, "relatedfields" : { "0" : "firstname", "1" : "lastname", "2" : "phone", "3" : "email" }, "viewtype" : "List", "customView" : }, "limit" : 5, "action" : 1, "actionSelect" : "0", "no_result_text" : "0", "switchHeader" : "-", "filter" : "-", "checkbox" : "-", "orderby" : }, "relatedModuleName" : "Contacts" }), ),

Return values
array<string|int, mixed>

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

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
Tags
throws
Exception
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