Bitrix API

ReservationSettingsBuildEvent extends Event

Event for building reservation settings.

If you need to change the reservation settings, while you cannot edit the configuration (@see \Bitrix\Main\Configuration\Option), you can use this event to change the settings.

For example (realization event handler):

public static function OnReservationSettingsBuild(\Bitrix\Sale\Reservation\Configuration\ReservationSettingsBuildEvent $event)
{
if (self::isEnabledCrmReservation())
{
$event->getSettings()->setReserveCondition(
\Bitrix\Sale\Reservation\Configuration\ReserveCondition::ON_CREATE
);
}
}

Table of Contents

Constants

NAME  = 'OnReservationSettingsBuild'
Event name.

Methods

__construct()  : mixed
getSettings()  : ReservationSettings
Reservation settings.

Constants

Methods


        
On this page

Search results