@@ -5,11 +5,9 @@ |
||
5 | 5 | use craft\elements\User; |
6 | 6 | use flipbox\craft\ember\helpers\QueryHelper; |
7 | 7 | use flipbox\organizations\elements\Organization; |
8 | -use flipbox\organizations\relationships\RelationshipInterface; |
|
9 | -use flipbox\organizations\relationships\UserTypeRelationship; |
|
10 | 8 | use flipbox\organizations\queries\UserTypeQuery; |
11 | 9 | use flipbox\organizations\records\UserType; |
12 | -use Tightenco\Collect\Support\Collection; |
|
10 | +use flipbox\organizations\relationships\RelationshipInterface; |
|
13 | 11 | use yii\base\Behavior; |
14 | 12 | use yii\base\Exception; |
15 | 13 |
@@ -12,8 +12,8 @@ |
||
12 | 12 | use craft\elements\User; |
13 | 13 | use craft\events\SetElementTableAttributeHtmlEvent; |
14 | 14 | use craft\helpers\Html; |
15 | -use flipbox\organizations\behaviors\OrganizationsAssociatedToUserBehavior; |
|
16 | 15 | use flipbox\organizations\Organizations; |
16 | +use flipbox\organizations\behaviors\OrganizationsAssociatedToUserBehavior; |
|
17 | 17 | use flipbox\organizations\records\UserAssociation; |
18 | 18 | use flipbox\organizations\records\UserType; |
19 | 19 |
@@ -9,10 +9,10 @@ |
||
9 | 9 | namespace flipbox\organizations\relationships; |
10 | 10 | |
11 | 11 | use Craft; |
12 | +use Tightenco\Collect\Support\Collection; |
|
12 | 13 | use craft\base\ElementInterface; |
13 | 14 | use craft\helpers\ArrayHelper; |
14 | 15 | use flipbox\organizations\records\UserAssociation; |
15 | -use Tightenco\Collect\Support\Collection; |
|
16 | 16 | use yii\base\Exception; |
17 | 17 | use yii\db\ActiveRecord; |
18 | 18 | use yii\db\QueryInterface; |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | * |
139 | 139 | * @param $objects |
140 | 140 | * @param array $attributes |
141 | - * @return RelationshipInterface |
|
141 | + * @return RelationshipTrait |
|
142 | 142 | */ |
143 | 143 | public function add($objects, array $attributes = []): RelationshipInterface |
144 | 144 | { |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | |
164 | 164 | /** |
165 | 165 | * @param $objects |
166 | - * @return RelationshipInterface |
|
166 | + * @return RelationshipTrait |
|
167 | 167 | */ |
168 | 168 | public function remove($objects): RelationshipInterface |
169 | 169 | { |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | |
184 | 184 | /** |
185 | 185 | * Reset associations |
186 | - * @return RelationshipInterface |
|
186 | + * @return RelationshipTrait |
|
187 | 187 | */ |
188 | 188 | public function reset(): RelationshipInterface |
189 | 189 | { |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | |
195 | 195 | /** |
196 | 196 | * Reset associations |
197 | - * @return RelationshipInterface |
|
197 | + * @return RelationshipTrait |
|
198 | 198 | */ |
199 | 199 | public function clear(): RelationshipInterface |
200 | 200 | { |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
81 | - * @return OrganizationType|null |
|
81 | + * @return \flipbox\craft\ember\records\ActiveRecord|null |
|
82 | 82 | */ |
83 | 83 | public function getType() |
84 | 84 | { |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | } |
99 | 99 | |
100 | 100 | /** |
101 | - * @return OrganizationType|null |
|
101 | + * @return \flipbox\craft\ember\records\ActiveRecord|null |
|
102 | 102 | */ |
103 | 103 | protected function resolveType() |
104 | 104 | { |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | } |
111 | 111 | |
112 | 112 | /** |
113 | - * @return OrganizationType|null |
|
113 | + * @return null|\flipbox\craft\ember\records\ActiveRecord |
|
114 | 114 | */ |
115 | 115 | private function resolveTypeFromId() |
116 | 116 | { |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | /** |
125 | 125 | * @param $type |
126 | - * @return OrganizationType|null |
|
126 | + * @return null|\flipbox\craft\ember\records\ActiveRecord |
|
127 | 127 | */ |
128 | 128 | protected function internalResolveType($type = null) |
129 | 129 | { |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
80 | - * @return UserType|null |
|
80 | + * @return \flipbox\craft\ember\records\ActiveRecord|null |
|
81 | 81 | */ |
82 | 82 | public function getType() |
83 | 83 | { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
100 | - * @return UserType|null |
|
100 | + * @return \flipbox\craft\ember\records\ActiveRecord|null |
|
101 | 101 | */ |
102 | 102 | protected function resolveType() |
103 | 103 | { |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | } |
110 | 110 | |
111 | 111 | /** |
112 | - * @return UserType|null |
|
112 | + * @return null|\flipbox\craft\ember\records\ActiveRecord |
|
113 | 113 | */ |
114 | 114 | private function resolveTypeFromId() |
115 | 115 | { |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | /** |
124 | 124 | * @param $type |
125 | - * @return UserType|null |
|
125 | + * @return null|\flipbox\craft\ember\records\ActiveRecord |
|
126 | 126 | */ |
127 | 127 | protected function internalResolveType($type = null) |
128 | 128 | { |
@@ -8,15 +8,14 @@ |
||
8 | 8 | |
9 | 9 | namespace flipbox\organizations\relationships; |
10 | 10 | |
11 | +use Tightenco\Collect\Support\Collection; |
|
11 | 12 | use craft\elements\User; |
12 | 13 | use craft\helpers\ArrayHelper; |
13 | 14 | use craft\helpers\Json; |
14 | -use flipbox\craft\ember\helpers\QueryHelper; |
|
15 | -use flipbox\organizations\elements\Organization; |
|
16 | 15 | use flipbox\organizations\Organizations; |
16 | +use flipbox\organizations\elements\Organization; |
|
17 | 17 | use flipbox\organizations\queries\UserAssociationQuery; |
18 | 18 | use flipbox\organizations\records\UserAssociation; |
19 | -use Tightenco\Collect\Support\Collection; |
|
20 | 19 | |
21 | 20 | /** |
22 | 21 | * Manages Organizations associated to Users |
@@ -175,7 +175,7 @@ |
||
175 | 175 | |
176 | 176 | /** |
177 | 177 | * @param OrganizationTypeAssociation|OrganizationType|int|array $type |
178 | - * @return OrganizationType|null |
|
178 | + * @return \flipbox\craft\ember\records\ActiveRecord|null |
|
179 | 179 | */ |
180 | 180 | protected function resolveObject($type) |
181 | 181 | { |
@@ -8,15 +8,14 @@ |
||
8 | 8 | |
9 | 9 | namespace flipbox\organizations\relationships; |
10 | 10 | |
11 | +use Tightenco\Collect\Support\Collection; |
|
11 | 12 | use craft\helpers\ArrayHelper; |
12 | 13 | use craft\helpers\Json; |
13 | -use flipbox\craft\ember\helpers\QueryHelper; |
|
14 | -use flipbox\organizations\elements\Organization; |
|
15 | 14 | use flipbox\organizations\Organizations; |
15 | +use flipbox\organizations\elements\Organization; |
|
16 | 16 | use flipbox\organizations\queries\OrganizationTypeAssociationQuery; |
17 | 17 | use flipbox\organizations\records\OrganizationType; |
18 | 18 | use flipbox\organizations\records\OrganizationTypeAssociation; |
19 | -use Tightenco\Collect\Support\Collection; |
|
20 | 19 | |
21 | 20 | /** |
22 | 21 | * Manages Organization Types associated to Organizations |
@@ -8,16 +8,14 @@ |
||
8 | 8 | |
9 | 9 | namespace flipbox\organizations\relationships; |
10 | 10 | |
11 | -use craft\elements\db\UserQuery; |
|
11 | +use Tightenco\Collect\Support\Collection; |
|
12 | 12 | use craft\elements\User; |
13 | 13 | use craft\helpers\ArrayHelper; |
14 | 14 | use craft\helpers\Json; |
15 | -use flipbox\craft\ember\helpers\QueryHelper; |
|
16 | -use flipbox\organizations\elements\Organization; |
|
17 | 15 | use flipbox\organizations\Organizations; |
16 | +use flipbox\organizations\elements\Organization; |
|
18 | 17 | use flipbox\organizations\queries\UserAssociationQuery; |
19 | 18 | use flipbox\organizations\records\UserAssociation; |
20 | -use Tightenco\Collect\Support\Collection; |
|
21 | 19 | |
22 | 20 | /** |
23 | 21 | * Manages Users associated to Organizations |