@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | /** |
| 91 | - * @param User|self $user |
|
| 91 | + * @param User $user |
|
| 92 | 92 | * @throws Exception |
| 93 | 93 | * @throws \Exception |
| 94 | 94 | * @throws \Throwable |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | /** |
| 121 | - * @param User|self $user |
|
| 121 | + * @param User $user |
|
| 122 | 122 | * @return void |
| 123 | 123 | */ |
| 124 | 124 | private function onAfterValidate(User $user) |
@@ -5,14 +5,11 @@ |
||
| 5 | 5 | use Craft; |
| 6 | 6 | use craft\elements\User; |
| 7 | 7 | use craft\events\ModelEvent; |
| 8 | -use flipbox\craft\ember\helpers\QueryHelper; |
|
| 8 | +use flipbox\organizations\Organizations as OrganizationPlugin; |
|
| 9 | 9 | use flipbox\organizations\elements\Organization; |
| 10 | -use flipbox\organizations\relationships\RelationshipInterface; |
|
| 11 | 10 | use flipbox\organizations\relationships\OrganizationRelationship; |
| 12 | -use flipbox\organizations\Organizations as OrganizationPlugin; |
|
| 13 | -use flipbox\organizations\queries\OrganizationQuery; |
|
| 11 | +use flipbox\organizations\relationships\RelationshipInterface; |
|
| 14 | 12 | use flipbox\organizations\validators\OrganizationsValidator; |
| 15 | -use Tightenco\Collect\Support\Collection; |
|
| 16 | 13 | use yii\base\Behavior; |
| 17 | 14 | use yii\base\Event; |
| 18 | 15 | use yii\base\Exception; |
@@ -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,15 +9,15 @@ |
||
| 9 | 9 | namespace flipbox\organizations\relationships; |
| 10 | 10 | |
| 11 | 11 | use Craft; |
| 12 | +use Tightenco\Collect\Support\Collection; |
|
| 12 | 13 | use craft\elements\User; |
| 13 | 14 | use craft\helpers\ArrayHelper; |
| 14 | 15 | use craft\helpers\Json; |
| 15 | 16 | use flipbox\craft\ember\helpers\QueryHelper; |
| 16 | -use flipbox\organizations\elements\Organization; |
|
| 17 | 17 | use flipbox\organizations\Organizations; |
| 18 | +use flipbox\organizations\elements\Organization; |
|
| 18 | 19 | use flipbox\organizations\queries\UserAssociationQuery; |
| 19 | 20 | use flipbox\organizations\records\UserAssociation; |
| 20 | -use Tightenco\Collect\Support\Collection; |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * Manages Organizations associated to Users |
@@ -8,15 +8,15 @@ |
||
| 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 | 14 | use flipbox\craft\ember\helpers\QueryHelper; |
| 14 | -use flipbox\organizations\elements\Organization; |
|
| 15 | 15 | use flipbox\organizations\Organizations; |
| 16 | +use flipbox\organizations\elements\Organization; |
|
| 16 | 17 | use flipbox\organizations\queries\OrganizationTypeAssociationQuery; |
| 17 | 18 | use flipbox\organizations\records\OrganizationType; |
| 18 | 19 | use flipbox\organizations\records\OrganizationTypeAssociation; |
| 19 | -use Tightenco\Collect\Support\Collection; |
|
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | 22 | * Manages Organization Types associated to Organizations |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | /** |
| 165 | 165 | * @param QueryInterface|ElementInterface[] $objects |
| 166 | 166 | * @param array $attributes |
| 167 | - * @return RelationshipInterface |
|
| 167 | + * @return RelationshipTrait |
|
| 168 | 168 | * |
| 169 | 169 | * @deprecated use `add($objects, $attributes)` |
| 170 | 170 | */ |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | * |
| 179 | 179 | * @param ActiveRecord|ElementInterface|int|array $object |
| 180 | 180 | * @param array $attributes |
| 181 | - * @return RelationshipInterface |
|
| 181 | + * @return RelationshipTrait |
|
| 182 | 182 | * |
| 183 | 183 | * @deprecated use `add($objects, $attributes)` |
| 184 | 184 | */ |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | * |
| 193 | 193 | * @param $objects |
| 194 | 194 | * @param array $attributes |
| 195 | - * @return RelationshipInterface |
|
| 195 | + * @return RelationshipTrait |
|
| 196 | 196 | */ |
| 197 | 197 | public function add($objects, array $attributes = []): RelationshipInterface |
| 198 | 198 | { |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | * Dissociate an array of user associations from an organization |
| 225 | 225 | * |
| 226 | 226 | * @param QueryInterface|ElementInterface[] $objects |
| 227 | - * @return RelationshipInterface |
|
| 227 | + * @return RelationshipTrait |
|
| 228 | 228 | * |
| 229 | 229 | * @deprecated use `remove($objects)` |
| 230 | 230 | */ |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | * Dissociate a user from an organization |
| 238 | 238 | * |
| 239 | 239 | * @param ActiveRecord|ElementInterface|int|array |
| 240 | - * @return RelationshipInterface |
|
| 240 | + * @return RelationshipTrait |
|
| 241 | 241 | * |
| 242 | 242 | * @deprecated use `remove($objects)` |
| 243 | 243 | */ |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | |
| 249 | 249 | /** |
| 250 | 250 | * @param $objects |
| 251 | - * @return RelationshipInterface |
|
| 251 | + * @return RelationshipTrait |
|
| 252 | 252 | */ |
| 253 | 253 | public function remove($objects): RelationshipInterface |
| 254 | 254 | { |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | |
| 269 | 269 | /** |
| 270 | 270 | * Reset associations |
| 271 | - * @return RelationshipInterface |
|
| 271 | + * @return RelationshipTrait |
|
| 272 | 272 | */ |
| 273 | 273 | public function reset(): RelationshipInterface |
| 274 | 274 | { |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | |
| 280 | 280 | /** |
| 281 | 281 | * Reset associations |
| 282 | - * @return RelationshipInterface |
|
| 282 | + * @return RelationshipTrait |
|
| 283 | 283 | */ |
| 284 | 284 | public function clear(): RelationshipInterface |
| 285 | 285 | { |
@@ -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; |
@@ -9,17 +9,17 @@ |
||
| 9 | 9 | namespace flipbox\organizations\relationships; |
| 10 | 10 | |
| 11 | 11 | use Craft; |
| 12 | -use craft\elements\db\UserQuery; |
|
| 12 | +use Tightenco\Collect\Support\Collection; |
|
| 13 | 13 | use craft\elements\User; |
| 14 | +use craft\elements\db\UserQuery; |
|
| 14 | 15 | use craft\helpers\ArrayHelper; |
| 15 | 16 | use craft\helpers\Json; |
| 16 | 17 | use flipbox\craft\ember\helpers\QueryHelper; |
| 18 | +use flipbox\organizations\Organizations; |
|
| 17 | 19 | use flipbox\organizations\behaviors\OrganizationsAssociatedToUserBehavior; |
| 18 | 20 | use flipbox\organizations\elements\Organization; |
| 19 | -use flipbox\organizations\Organizations; |
|
| 20 | 21 | use flipbox\organizations\queries\UserAssociationQuery; |
| 21 | 22 | use flipbox\organizations\records\UserAssociation; |
| 22 | -use Tightenco\Collect\Support\Collection; |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * Manages Users associated to Organizations |