1 | <?php |
||
27 | class Objects extends Integrations |
||
28 | { |
||
29 | /** |
||
30 | * @inheritdoc |
||
31 | */ |
||
32 | const TRANSLATION_CATEGORY = 'hubspot'; |
||
33 | |||
34 | /** |
||
35 | * @inheritdoc |
||
36 | */ |
||
37 | const INPUT_TEMPLATE_PATH = 'hubspot/_components/fieldtypes/Objects/input'; |
||
38 | |||
39 | /** |
||
40 | * @inheritdoc |
||
41 | */ |
||
42 | const INPUT_ITEM_TEMPLATE_PATH = 'hubspot/_components/fieldtypes/Objects/_inputItem'; |
||
43 | |||
44 | /** |
||
45 | * @inheritdoc |
||
46 | */ |
||
47 | const SETTINGS_TEMPLATE_PATH = 'hubspot/_components/fieldtypes/Objects/settings'; |
||
48 | |||
49 | /** |
||
50 | * @inheritdoc |
||
51 | */ |
||
52 | const ACTION_PREFORM_ACTION_PATH = 'hubspot/cp/fields/perform-action'; |
||
53 | |||
54 | /** |
||
55 | * @inheritdoc |
||
56 | */ |
||
57 | const ACTION_CREATE_ITEM_PATH = 'hubspot/cp/fields/create-item'; |
||
58 | |||
59 | /** |
||
60 | * @inheritdoc |
||
61 | */ |
||
62 | const ACTION_ASSOCIATION_ITEM_PATH = 'hubspot/cp/objects/associate'; |
||
63 | |||
64 | /** |
||
65 | * @inheritdoc |
||
66 | */ |
||
67 | const ACTION_DISSOCIATION_ITEM_PATH = 'hubspot/cp/objects/dissociate'; |
||
68 | |||
69 | /** |
||
70 | * @inheritdoc |
||
71 | */ |
||
72 | const ACTION_PREFORM_ITEM_ACTION_PATH = 'hubspot/cp/fields/perform-item-action'; |
||
73 | |||
74 | /** |
||
75 | * Indicates whether the full sync operation should be preformed if a matching HubSpot Object was found but not |
||
76 | * currently associated to the element. For example, when attempting to Sync a Craft User to a HubSpot Contact, if |
||
77 | * the HubSpot Contact already exists; true would override data in HubSpot while false would just perform |
||
78 | * an association (note, a subsequent sync operation could be preformed) |
||
79 | * @var bool |
||
80 | */ |
||
81 | public $syncToHubSpotOnMatch = false; |
||
82 | |||
83 | /** |
||
84 | * @inheritdoc |
||
85 | * @return ObjectsField |
||
86 | */ |
||
87 | protected function fieldService(): IntegrationField |
||
91 | |||
92 | /** |
||
93 | * @inheritdoc |
||
94 | * @return ObjectAssociations |
||
95 | */ |
||
96 | protected function associationService(): IntegrationAssociations |
||
100 | |||
101 | /** |
||
102 | * @inheritdoc |
||
103 | */ |
||
104 | public static function displayName(): string |
||
108 | |||
109 | /** |
||
110 | * @inheritdoc |
||
111 | */ |
||
112 | public static function defaultSelectionLabel(): string |
||
116 | |||
117 | /******************************************* |
||
118 | * CONNECTION |
||
119 | *******************************************/ |
||
120 | |||
121 | /** |
||
122 | * @return ConnectionInterface |
||
123 | * @throws \yii\base\InvalidConfigException |
||
124 | */ |
||
125 | public function getConnection(): ConnectionInterface |
||
130 | |||
131 | /******************************************* |
||
132 | * CACHE |
||
133 | *******************************************/ |
||
134 | |||
135 | /** |
||
136 | * @return CacheInterface |
||
137 | * @throws \yii\base\InvalidConfigException |
||
138 | */ |
||
139 | public function getCache(): CacheInterface |
||
144 | |||
145 | /******************************************* |
||
146 | * CRUD |
||
147 | *******************************************/ |
||
148 | |||
149 | /** |
||
150 | * @return CRUDInterface |
||
151 | * @throws InvalidConfigException |
||
152 | */ |
||
153 | public function getResource(): CRUDInterface |
||
167 | } |
||
168 |