method public static

AutomaticProfile::onBeforeUpdate()

Класс: \Bitrix\Sale\Delivery\Services\AutomaticProfile

Сигнатура

public static onBeforeUpdate(int $serviceId[, array<string|int, mixed> &$fields = array() ]) : bool

Параметры

$serviceId int
$fields array<string|int, mixed> = array()

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

bool

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

AutomaticProfile::onBeforeUpdate() — метод класса \Bitrix\Sale\Delivery\Services\AutomaticProfile модуля «Интернет-магазин». AutomaticProfile: Класс AutomaticProfile Адаптер для работы профиля старых служб доставки с новым API.

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

use Bitrix\Main\Loader;
use Bitrix\Sale\Delivery\Services\AutomaticProfile;

Loader::includeModule('sale');

$serviceId = 1;
$result = AutomaticProfile::onBeforeUpdate($serviceId);
// $result: bool

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

onBeforeUpdate() есть и у других классов модуля «Интернет-магазин»: Automatic, Base, CashboxRestHandlerTable, Configurable, DeliveryRestHandlerTable, DiscountCouponTable, DiscountEntitiesTable, DiscountGroupTable.

Исходный файл: source/sale/lib/delivery/services/automatic_profile.php:620

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