Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
excludedateshandler.php
1
<?php
2
3
namespace
Bitrix\Calendar\Sync\Util
;
4
5
use Bitrix\Calendar\Core;
6
use
Bitrix\Calendar\Core\Base\Map
;
7
use
Bitrix\Calendar\Core\Event\Event
;
8
9
class
ExcludeDatesHandler
10
{
17
public
function
prepareEventExcludeDates(
Event
$event, ?Core\Base\
Map
$exceptionEvents)
18
{
19
if
(
20
$exceptionEvents ===
null
21
|| $exceptionEvents->count() === 0
22
|| !$event->
getExcludedDateCollection
()
23
|| $event->
getExcludedDateCollection
()->count() === 0
24
)
25
{
26
return
;
27
}
28
30
foreach
($event->
getExcludedDateCollection
() as $key => $date)
31
{
32
if
($exceptionEvents->has($date->format(
'Ymd'
)))
33
{
34
$event->
getExcludedDateCollection
()->remove($key);
35
}
36
}
37
}
38
}
Bitrix\Calendar\Core\Base\Map
Definition
map.php:11
Bitrix\Calendar\Core\Event\Event
Definition
event.php:20
Bitrix\Calendar\Core\Event\Event\getExcludedDateCollection
getExcludedDateCollection()
Definition
event.php:835
Bitrix\Calendar\Sync\Util\ExcludeDatesHandler
Definition
excludedateshandler.php:10
Bitrix\Calendar\Sync\Util
Definition
attendeesdescription.php:3
modules
calendar
lib
sync
util
excludedateshandler.php
Создано системой
1.10.0