method public static

TradeBinding::checkByEntity()

Класс: \Bitrix\Sale\Services\PaySystem\Restrictions\TradeBinding

Сигнатура

public static checkByEntity(Entity $entity, array<string|int, mixed> $restrictionParams, int $mode[, int $serviceId = 0 ]) : int

Описание

Проверка параметров службы на соответствие ограничению по сущности.

Параметры

$entity Entity
$restrictionParams array<string|int, mixed>
$mode int
$serviceId int = 0

Возвращаемое значение

int

Как применяется в TradeBinding

TradeBinding::checkByEntity() — метод класса \Bitrix\Sale\Services\PaySystem\Restrictions\TradeBinding модуля «Интернет-магазин».

Статический метод — вызывается через имя класса TradeBinding, без создания объекта.

use Bitrix\Main\Loader;
use Bitrix\Sale\Services\PaySystem\Restrictions\TradeBinding;

Loader::includeModule('sale');

$entity = null; // Entity
$restrictionParams = [];
$mode = 1;
$result = TradeBinding::checkByEntity($entity, $restrictionParams, $mode);
// $result: int

Другие методы TradeBinding

checkByEntity() есть и у других классов модуля «Интернет-магазин»: Base, ByConcreteProduct, ByDimensions, ByLocation, ByMaxSize, ByPaySystem, ByPersonType, ByPrice.

Исходный файл: source/sale/lib/services/paysystem/restrictions/tradebinding.php:84

Что будем искать? Например,Продвижение