1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
factory.php
См. документацию.
1<?php
2
3namespace Bitrix\Calendar\Sync\Google;
4
5use Bitrix\Calendar\Sync;
6use Bitrix\Calendar\Sync\Connection\Connection;
7use Bitrix\Calendar\Sync\Managers\IncomingEventManagerInterface;
8use Bitrix\Calendar\Sync\Managers\IncomingSectionManagerInterface;
9use Bitrix\Calendar\Sync\Managers\OutgoingEventManagerInterface;
10use Bitrix\Calendar\Sync\Managers\OutgoingSectionManagerInterface;
11use Bitrix\Calendar\Sync\Managers\PushManagerInterface;
12use Bitrix\Calendar\Sync\Util\Context;
13
15{
16 public const SERVICE_NAME = 'google_api_oauth';
17
19 {
20 return new EventManager($this->getConnection(), $this->getConnection()->getOwner()->getId());
21 }
22
24 {
25 return new SectionManager($this->getConnection(), $this->getConnection()->getOwner()->getId());
26 }
27
28 public function getConnection(): Connection
29 {
30 return $this->connection;
31 }
32
33 public function getCode(): string
34 {
35 return self::SERVICE_NAME;
36 }
37
38 public function getContext(): Context
39 {
40 return $this->context;
41 }
42
44 {
45 return new ImportManager($this->getConnection(), $this->getConnection()->getOwner()->getId());
46 }
47
48 public function canSubscribeSection(): bool
49 {
50 return true;
51 }
52
53 public function canSubscribeConnection(): bool
54 {
55 return true;
56 }
57
59 {
60 // TODO: check, that owner is user
61 return new PushManager($this->connection, $this->connection->getOwner()->getId());
62 }
63
65 {
66 return new ImportManager($this->getConnection(), $this->getConnection()->getOwner()->getId());
67 }
68
70 {
71 return new ImportManager($this->getConnection(), $this->getConnection()->getOwner()->getId());
72 }
73
75 {
76 return new OutgoingEventManager($this->getConnection(), $this->getConnection()->getOwner()->getId());
77 }
78
80 {
81 return new OutgoingSectionManager($this->getConnection(), $this->getConnection()->getOwner()->getId());
82 }
83}
$connection
Определения actionsdefinitions.php:38
getOutgoingSectionManager()
Определения factory.php:79
getIncomingSectionManager()
Определения factory.php:64
$context
Определения csv_new_setup.php:223
Определения culture.php:9