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/ical/basic/ |
Upload File : |
<?php namespace Bitrix\Calendar\ICal\Basic; class AttendeesPropertyType extends PropertyType { private $calendarAddress; public static function createInstance($names, AttendeesProperty $calendarAddress): AttendeesPropertyType { return new self($names, $calendarAddress); } public function __construct($names, AttendeesProperty $calendarAddress) { parent::__construct($names); $this->calendarAddress = $calendarAddress; if ($this->calendarAddress->participationStatus) { $this->addParameter(Parameter::getInstance('PARTSTAT', $this->calendarAddress->participationStatus)); } if ($this->calendarAddress->role) { $this->addParameter(Parameter::getInstance('ROLE', $this->calendarAddress->role)); } if ($this->calendarAddress->cutype) { $this->addParameter(Parameter::getInstance('CUTYPE', $this->calendarAddress->cutype)); } if ($this->calendarAddress->rsvp) { $this->addParameter(Parameter::getInstance('RSVP', 'TRUE')); } if ($this->calendarAddress->name) { $this->addParameter(Parameter::getInstance('CN', trim($this->calendarAddress->name))); } if ($this->calendarAddress->email) { $this->addParameter(Parameter::getInstance('EMAIL', trim($this->calendarAddress->email))); } } public function getValue(): string { if (!empty($this->calendarAddress->mailto)) { return "mailto:{$this->calendarAddress->mailto}"; } return "mailto:{$this->calendarAddress->email}"; } public function getOriginalValue(): AttendeesProperty { return $this->calendarAddress; } }