@@ -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\UserType; |
| 18 | 18 | |
| 19 | 19 | /** |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | /** |
| 39 | 39 | * Validates a single attribute. |
| 40 | 40 | * Child classes must implement this method to provide the actual validation logic. |
| 41 | - * @param Model|OrganizationsAssociatedToUserBehavior $model the data model to be validated |
|
| 41 | + * @param \craft\elements\User $model the data model to be validated |
|
| 42 | 42 | * @param string $attribute the name of the attribute to be validated. |
| 43 | 43 | */ |
| 44 | 44 | public function validateAttribute($model, $attribute) |
@@ -8,10 +8,10 @@ |
||
| 8 | 8 | |
| 9 | 9 | namespace flipbox\organizations\validators; |
| 10 | 10 | |
| 11 | +use Tightenco\Collect\Support\Collection; |
|
| 11 | 12 | use craft\helpers\Json; |
| 12 | -use flipbox\organizations\behaviors\OrganizationsAssociatedToUserBehavior; |
|
| 13 | 13 | use flipbox\organizations\Organizations as OrganizationPlugin; |
| 14 | -use Tightenco\Collect\Support\Collection; |
|
| 14 | +use flipbox\organizations\behaviors\OrganizationsAssociatedToUserBehavior; |
|
| 15 | 15 | use yii\base\Model; |
| 16 | 16 | use yii\validators\Validator; |
| 17 | 17 | |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | public $id; |
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | - * @param $value |
|
| 64 | + * @param \Tightenco\Collect\Support\Collection $value |
|
| 65 | 65 | * @return $this |
| 66 | 66 | */ |
| 67 | 67 | public function id($value) |
@@ -3,16 +3,16 @@ |
||
| 3 | 3 | namespace flipbox\organizations\behaviors; |
| 4 | 4 | |
| 5 | 5 | use Craft; |
| 6 | +use Tightenco\Collect\Support\Collection; |
|
| 6 | 7 | use craft\elements\User; |
| 7 | 8 | use craft\events\ModelEvent; |
| 8 | 9 | use flipbox\craft\ember\helpers\QueryHelper; |
| 10 | +use flipbox\organizations\Organizations as OrganizationPlugin; |
|
| 9 | 11 | use flipbox\organizations\elements\Organization; |
| 10 | -use flipbox\organizations\managers\RelationshipManagerInterface; |
|
| 11 | 12 | use flipbox\organizations\managers\OrganizationRelationshipManager; |
| 12 | -use flipbox\organizations\Organizations as OrganizationPlugin; |
|
| 13 | +use flipbox\organizations\managers\RelationshipManagerInterface; |
|
| 13 | 14 | use flipbox\organizations\queries\OrganizationQuery; |
| 14 | 15 | use flipbox\organizations\validators\OrganizationsValidator; |
| 15 | -use Tightenco\Collect\Support\Collection; |
|
| 16 | 16 | use yii\base\Behavior; |
| 17 | 17 | use yii\base\Event; |
| 18 | 18 | use yii\base\Exception; |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | /** |
| 100 | - * @param User|self $user |
|
| 100 | + * @param User $user |
|
| 101 | 101 | * @throws Exception |
| 102 | 102 | * @throws \Exception |
| 103 | 103 | * @throws \Throwable |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | /** |
| 130 | - * @param User|self $user |
|
| 130 | + * @param User $user |
|
| 131 | 131 | * @return void |
| 132 | 132 | */ |
| 133 | 133 | private function onAfterValidate(User $user) |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | * Get an array of associated organizations |
| 162 | 162 | * |
| 163 | 163 | * @param array $criteria |
| 164 | - * @return Organization[]|Collection |
|
| 164 | + * @return Collection |
|
| 165 | 165 | */ |
| 166 | 166 | public function getOrganizations(array $criteria = []): Collection |
| 167 | 167 | { |
@@ -2,13 +2,13 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace flipbox\organizations\behaviors; |
| 4 | 4 | |
| 5 | +use Tightenco\Collect\Support\Collection; |
|
| 5 | 6 | use craft\elements\User; |
| 6 | 7 | use flipbox\craft\ember\helpers\QueryHelper; |
| 7 | 8 | use flipbox\organizations\elements\Organization; |
| 8 | 9 | use flipbox\organizations\managers\RelationshipManagerInterface; |
| 9 | 10 | use flipbox\organizations\queries\UserTypeQuery; |
| 10 | 11 | use flipbox\organizations\records\UserType; |
| 11 | -use Tightenco\Collect\Support\Collection; |
|
| 12 | 12 | use yii\base\Behavior; |
| 13 | 13 | use yii\base\Exception; |
| 14 | 14 | |
@@ -9,12 +9,12 @@ |
||
| 9 | 9 | namespace flipbox\organizations\elements; |
| 10 | 10 | |
| 11 | 11 | use Craft; |
| 12 | +use Tightenco\Collect\Support\Collection; |
|
| 12 | 13 | use flipbox\craft\ember\helpers\QueryHelper; |
| 13 | -use flipbox\organizations\managers\RelationshipManagerInterface; |
|
| 14 | 14 | use flipbox\organizations\managers\OrganizationTypeRelationshipManager; |
| 15 | +use flipbox\organizations\managers\RelationshipManagerInterface; |
|
| 15 | 16 | use flipbox\organizations\queries\OrganizationTypeQuery; |
| 16 | 17 | use flipbox\organizations\records\OrganizationType; |
| 17 | -use Tightenco\Collect\Support\Collection; |
|
| 18 | 18 | |
| 19 | 19 | /** |
| 20 | 20 | * @author Flipbox Factory <[email protected]> |
@@ -9,15 +9,15 @@ |
||
| 9 | 9 | namespace flipbox\organizations\elements; |
| 10 | 10 | |
| 11 | 11 | use Craft; |
| 12 | +use Tightenco\Collect\Support\Collection; |
|
| 12 | 13 | use craft\db\Query; |
| 13 | -use craft\elements\db\UserQuery; |
|
| 14 | 14 | use craft\elements\User; |
| 15 | +use craft\elements\db\UserQuery; |
|
| 15 | 16 | use craft\helpers\ArrayHelper; |
| 16 | 17 | use flipbox\craft\ember\helpers\QueryHelper; |
| 17 | 18 | use flipbox\organizations\managers\RelationshipManagerInterface; |
| 18 | 19 | use flipbox\organizations\managers\UserRelationshipManager; |
| 19 | 20 | use flipbox\organizations\records\UserAssociation; |
| 20 | -use Tightenco\Collect\Support\Collection; |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * @author Flipbox Factory <[email protected]> |
@@ -12,8 +12,8 @@ |
||
| 12 | 12 | use craft\helpers\ArrayHelper; |
| 13 | 13 | use craft\helpers\Json; |
| 14 | 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 | 19 | |
@@ -162,7 +162,7 @@ |
||
| 162 | 162 | |
| 163 | 163 | /** |
| 164 | 164 | * @param OrganizationTypeAssociation|OrganizationType|int|array|null $type |
| 165 | - * @return OrganizationType|null |
|
| 165 | + * @return null|\flipbox\craft\ember\records\ActiveRecord |
|
| 166 | 166 | */ |
| 167 | 167 | protected function resolveType($type = null) |
| 168 | 168 | { |
@@ -11,8 +11,8 @@ |
||
| 11 | 11 | use craft\helpers\ArrayHelper; |
| 12 | 12 | use craft\helpers\Json; |
| 13 | 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; |