1 | <?php |
||
29 | class ObjectAssociation extends SortableAssociation |
||
30 | { |
||
31 | use SiteAttribute, |
||
32 | ElementAttribute, |
||
33 | traits\FieldAttribute; |
||
34 | |||
35 | /** |
||
36 | * The table alias |
||
37 | */ |
||
38 | const TABLE_ALIAS = 'hubspot_objects'; |
||
39 | |||
40 | /** |
||
41 | * @inheritdoc |
||
42 | */ |
||
43 | const TARGET_ATTRIBUTE = 'objectId'; |
||
44 | |||
45 | /** |
||
46 | * @inheritdoc |
||
47 | */ |
||
48 | const SOURCE_ATTRIBUTE = 'elementId'; |
||
49 | |||
50 | /** |
||
51 | * The default HubSpot Resource Id (if none exists) |
||
52 | */ |
||
53 | const DEFAULT_ID = 'UNKNOWN_ID'; |
||
54 | |||
55 | /** |
||
56 | * @inheritdoc |
||
57 | */ |
||
58 | protected $getterPriorityAttributes = ['fieldId', 'elementId', 'siteId']; |
||
59 | |||
60 | /** |
||
61 | * @inheritdoc |
||
62 | * @throws \Throwable |
||
63 | */ |
||
64 | public function __construct($config = []) |
||
69 | |||
70 | /** |
||
71 | * @noinspection PhpDocMissingThrowsInspection |
||
72 | * @return ObjectAssociationQuery |
||
73 | */ |
||
74 | public static function find(): ObjectAssociationQuery |
||
80 | |||
81 | /** |
||
82 | * {@inheritdoc} |
||
83 | */ |
||
84 | 3 | public static function tableAlias() |
|
88 | |||
89 | /** |
||
90 | * @inheritdoc |
||
91 | * @return ObjectAssociations |
||
92 | */ |
||
93 | protected function associationService(): SortableAssociations |
||
97 | |||
98 | /** |
||
99 | * @param array $criteria |
||
100 | * @return mixed|null |
||
101 | * @throws \yii\base\InvalidConfigException |
||
102 | */ |
||
103 | public function getResource(array $criteria = []) |
||
133 | |||
134 | /** |
||
135 | * @return array |
||
136 | */ |
||
137 | public function rules(): array |
||
173 | } |
||
174 |