PaySystem extends Restriction
Class PaySystem
Table of Contents
Properties
- $easeSort : int
Methods
- check() : bool
- Checking the service parameters for compliance with the restriction.
- checkByEntity() : int
- Checking the service parameters for compliance with the restriction by entity.
- delete() : DeleteResult
- getClassDescription() : string
- getClassTitle() : string
- getCode() : string
- Get a restriction code that is comparable to the service handler restriction code.
- getOnApplyErrorMessage() : string
- Returns message that will be display if error occurs while applying restriction
- getParamsStructure() : array<string|int, mixed>
- Returns params structure to show it to user
- getSeverity() : int
- isAvailable() : bool
- isMyCode() : bool
- prepareData() : bool
- prepareParamsValues() : array<string|int, mixed>
- save() : AddResult|UpdateResult
- validateRestriction() : Result
- Checking the restriction for compliance with business rules.
Properties
$easeSort
public
static int
$easeSort
= 200
100 - lightweight - just compare with params 200 - middleweight - may be use base queries 300 - hardweight - use base, and/or hard calculations
Methods
check()
Checking the service parameters for compliance with the restriction.
public
static check(mixed $params, array<string|int, mixed> $restrictionParams[, int $serviceId = 0 ]) : bool
Parameters
- $params : mixed
- $restrictionParams : array<string|int, mixed>
- $serviceId : int = 0
Return values
boolcheckByEntity()
Checking the service parameters for compliance with the restriction by entity.
public
static checkByEntity(Entity $entity, array<string|int, mixed> $restrictionParams, int $mode[, int $serviceId = 0 ]) : int
Parameters
- $entity : Entity
- $restrictionParams : array<string|int, mixed>
- $mode : int
- $serviceId : int = 0
Tags
Return values
intdelete()
public
static delete(mixed $restrictionId[, int $entityId = 0 ]) : DeleteResult
Parameters
- $restrictionId : mixed
- $entityId : int = 0
Tags
Return values
DeleteResultgetClassDescription()
public
static getClassDescription() : string
Return values
stringgetClassTitle()
public
static getClassTitle() : string
Return values
stringgetCode()
Get a restriction code that is comparable to the service handler restriction code.
public
static getCode() : string
Bitrix restrictions will return name of restriction class. Vendor restrictions must return full classname with namespace.
Example 1: for bitrix currency restriction class **Bitrix\Currency** it will return 'currency'
Example 2: for vendor currency restriction class **Vendor\Currency** it will return 'Vendor\Currency'
Return values
stringgetOnApplyErrorMessage()
Returns message that will be display if error occurs while applying restriction
public
static getOnApplyErrorMessage() : string
Return values
stringgetParamsStructure()
Returns params structure to show it to user
public
static getParamsStructure([int $entityId = 0 ]) : array<string|int, mixed>
Parameters
- $entityId : int = 0
Return values
array<string|int, mixed>getSeverity()
public
static getSeverity(int $mode) : int
Parameters
- $mode : int
-
- RestrictionManager::MODE_CLIENT | RestrictionManager::MODE_MANAGER
Return values
intisAvailable()
public
static isAvailable() : bool
Return values
boolisMyCode()
public
static isMyCode(string $code) : bool
Parameters
- $code : string
Return values
boolprepareData()
public
static prepareData(array<string|int, mixed> $servicesIds) : bool
Parameters
- $servicesIds : array<string|int, mixed>
Return values
boolprepareParamsValues()
public
static prepareParamsValues(array<string|int, mixed> $paramsValues[, int $entityId = 0 ]) : array<string|int, mixed>
Parameters
- $paramsValues : array<string|int, mixed>
- $entityId : int = 0
Return values
array<string|int, mixed>save()
public
static save(array<string|int, mixed> $fields[, int $restrictionId = 0 ]) : AddResult|UpdateResult
Parameters
- $fields : array<string|int, mixed>
- $restrictionId : int = 0
Tags
Return values
AddResult|UpdateResultvalidateRestriction()
Checking the restriction for compliance with business rules.
public
static validateRestriction(array<string|int, mixed> $fields) : Result
For example, for the restriction "currency" in this method, you can compare which currencies the payment system works with which the restriction is linked.
Parameters
- $fields : array<string|int, mixed>
-
restriction fields