method public static

ByPersonType::checkByEntity()

Класс: \Bitrix\Sale\Delivery\Restrictions\ByPersonType

Сигнатура

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

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

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

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

use Bitrix\Main\Loader;
use Bitrix\Sale\Delivery\Restrictions\ByPersonType;

Loader::includeModule('sale');

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

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

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

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

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