23 $languageId = \CCalendar::getUserLanguageId($event->
getOwner()?->getId());
24 $description = $this->addAttendeesInfo($event->
getDescription(), $event, $languageId);
26 return $this->addSpecialInfo($description, $event, $languageId);
37 $description = $this->removeAttendeesInfo($description, $languageId);
39 return $this->removeSpecialInfo($description, $languageId);
48 private function removeAttendeesInfo(
string $description,
string $languageId): string
51 ->cutAttendeesFromDescription($description)
65 private function addAttendeesInfo(?
string $description,
Event $event,
string $languageId): string
73 $event->getAttendeesCollection()
74 && ($attendees = $event->getAttendeesCollection()->getAttendeesCodes())
75 && count($attendees) > 1
78 $description = (
new AttendeesDescription($languageId))
79 ->addAttendeesToDescription($attendees, $description, $event->getParentId())
93 private function addSpecialInfo(
string $description, Event $event,
string $languageId): string
95 $padding =
"\r\n\r\n";
96 if (!$event->getDescription())
120 private function isGuest(Event $event): bool
122 return $event->getId() !== $event->getParentId();
130 private function isReservation(Event $event): bool
132 return $event->getSpecialLabel() === ResourceBooking::EVENT_LABEL;
140 private function isEventWithAttendees(Event $event): bool
142 return $event->getAttendeesCollection() !==
null
143 && count($event->getAttendeesCollection()->getAttendeesCodes()) > 1;
151 private function removeSpecialInfo(
string $description,
string $languageId)
static getMessage($code, $replace=null, $language=null)