1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
timezone.php
См. документацию.
1<?php
2
3
4namespace Bitrix\Calendar\ICal\Builder;
5
6
7use Bitrix\Calendar\ICal\Basic\BasicComponent;
8use Bitrix\Calendar\ICal\Basic\Content;
9use Bitrix\Calendar\ICal\Basic\Observance;
10use Bitrix\Calendar\Util;
11use DateTimeZone;
12
14{
15 private $id;
16 private $observances = [];
17
18 public static function createInstance(): Timezone
19 {
20 return new self();
21 }
22
23 public function __construct()
24 {
25 }
26
27 public function getType(): string
28 {
29 return 'VTIMEZONE';
30 }
31
32 public function getProperties(): array
33 {
34 return [
35 'TZID',
36 ];
37 }
38
43 public function setTimezoneId(DateTimeZone $tz): Timezone
44 {
45 $this->id = $tz->getName();
46
47 return $this;
48 }
49
50 public function setObservance(Observance $observance)
51 {
52 $this->observances[] = $observance;
53
54 return $this;
55 }
56
60 public function setContent(): Content
61 {
62 return Content::getInstance($this->getType())
63 ->textProperty('TZID', $this->id)
64 ->subComponent(...$this->observances);
65 }
66}
textProperty($names, ?string $value, bool $disableEscaping=false)
Определения content.php:48
setTimezoneId(DateTimeZone $tz)
Определения timezone.php:43
setObservance(Observance $observance)
Определения timezone.php:50
static createInstance()
Определения timezone.php:18
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804