Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/ilovecveti.ru/bitrix/modules/calendar/lib/sync/entities/ |
Upload File : |
<?php namespace Bitrix\Calendar\Sync\Entities; use Bitrix\Calendar\Core\Mappers\Section; use Bitrix\Calendar\Core; use Bitrix\Calendar\Sync\Dictionary; class SyncSectionMap extends Core\Base\Map { public function getNonLocalSections(): SyncSectionMap { return new self(array_filter($this->collection, function ($item) { /** @var SyncSection $item */ return $item->getVendorName() !== Section::SECTION_TYPE_LOCAL; })); } public function getLocalSections(): SyncSectionMap { return new self(array_filter($this->collection, function ($item) { /** @var SyncSection $item */ return $item->getVendorName() === Section::SECTION_TYPE_LOCAL; })); } /** * @return SyncSectionMap */ public function getSuccessSyncSection(): SyncSectionMap { return new self(array_filter($this->collection, function ($syncSection) { /** @var SyncSection $syncSection */ return $syncSection->getAction() === Dictionary::SYNC_SECTION_ACTION['success']; })); } /** * @return SyncSectionMap */ public function getActiveSections() { return new static(array_filter( $this->collection, static fn ($item) => ($item->getAction() !== Dictionary::SYNC_EVENT_ACTION['delete'])) ); } }