Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
factory.php
1<?php
2
4
13
15{
16 public const SERVICE_NAME = 'google_api_oauth';
17
18 public function getEventManager(): Sync\Managers\EventManagerInterface
19 {
20 return new EventManager($this->getConnection(), $this->getConnection()->getOwner()->getId());
21 }
22
23 public function getSectionManager(): Sync\Managers\SectionManagerInterface
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
43 public function getImportManager(): Sync\Managers\IncomingSectionManagerInterface
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}