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
NAME
Event name.
public
mixed
NAME
= 'OnReservationSettingsBuild'
Methods
__construct()
public
__construct(ReservationSettings $settings) : mixed
Parameters
- $settings : ReservationSettings
getSettings()
Reservation settings.
public
getSettings() : ReservationSettings