@@ -9,7 +9,6 @@ |
||
| 9 | 9 | namespace flipbox\organizations\actions\organizations; |
| 10 | 10 | |
| 11 | 11 | use flipbox\craft\ember\actions\elements\DeleteElement; |
| 12 | -use flipbox\organizations\elements\Organization; |
|
| 13 | 12 | use flipbox\organizations\elements\Organization as OrganizationElement; |
| 14 | 13 | |
| 15 | 14 | /** |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | namespace flipbox\organizations\actions\organizations; |
| 10 | 10 | |
| 11 | 11 | use flipbox\craft\ember\actions\elements\ViewElement; |
| 12 | -use flipbox\organizations\elements\Organization; |
|
| 13 | 12 | use flipbox\organizations\elements\Organization as OrganizationElement; |
| 14 | 13 | |
| 15 | 14 | /** |
@@ -26,7 +26,6 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * @inheritdoc |
| 29 | - * @param UserAssociation $record |
|
| 30 | 29 | * @return bool |
| 31 | 30 | */ |
| 32 | 31 | abstract protected function performAction(User $user, Organization $organization, int $sortOrder = null): bool; |
@@ -62,7 +61,7 @@ discard block |
||
| 62 | 61 | } |
| 63 | 62 | |
| 64 | 63 | /** |
| 65 | - * @param string|int $identifier |
|
| 64 | + * @param string $identifier |
|
| 66 | 65 | * @return User|null |
| 67 | 66 | */ |
| 68 | 67 | protected function findUser($identifier) |
@@ -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) |
@@ -7,8 +7,8 @@ |
||
| 7 | 7 | use craft\events\ModelEvent; |
| 8 | 8 | use craft\helpers\ArrayHelper; |
| 9 | 9 | use flipbox\craft\ember\helpers\QueryHelper; |
| 10 | -use flipbox\organizations\elements\Organization; |
|
| 11 | 10 | use flipbox\organizations\Organizations as OrganizationPlugin; |
| 11 | +use flipbox\organizations\elements\Organization; |
|
| 12 | 12 | use flipbox\organizations\queries\OrganizationQuery; |
| 13 | 13 | use flipbox\organizations\queries\UserAssociationQuery; |
| 14 | 14 | use flipbox\organizations\records\UserAssociation; |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | /** |
| 70 | 70 | * Set an array or query of user types to a user |
| 71 | 71 | * |
| 72 | - * @param $userTypes |
|
| 72 | + * @param UserTypeQuery $userTypes |
|
| 73 | 73 | * @return $this |
| 74 | 74 | */ |
| 75 | 75 | public function setUserTypes($userTypes) |
@@ -6,8 +6,8 @@ |
||
| 6 | 6 | use craft\helpers\ArrayHelper; |
| 7 | 7 | use craft\helpers\Json; |
| 8 | 8 | use flipbox\craft\ember\helpers\QueryHelper; |
| 9 | -use flipbox\organizations\elements\Organization; |
|
| 10 | 9 | use flipbox\organizations\Organizations as OrganizationPlugin; |
| 10 | +use flipbox\organizations\elements\Organization; |
|
| 11 | 11 | use flipbox\organizations\queries\UserTypeQuery; |
| 12 | 12 | use flipbox\organizations\records\UserAssociation; |
| 13 | 13 | use flipbox\organizations\records\UserType; |
@@ -10,10 +10,10 @@ |
||
| 10 | 10 | |
| 11 | 11 | use Craft; |
| 12 | 12 | use flipbox\craft\ember\actions\models\CreateModel; |
| 13 | +use flipbox\organizations\Organizations; |
|
| 13 | 14 | use flipbox\organizations\cp\actions\general\traits\SiteSettingAttributesTrait; |
| 14 | 15 | use flipbox\organizations\models\Settings; |
| 15 | 16 | use flipbox\organizations\models\SiteSettings; |
| 16 | -use flipbox\organizations\Organizations; |
|
| 17 | 17 | use yii\base\Model; |
| 18 | 18 | use yii\web\HttpException; |
| 19 | 19 | |
@@ -13,9 +13,8 @@ |
||
| 13 | 13 | use flipbox\craft\ember\actions\LookupTrait; |
| 14 | 14 | use flipbox\craft\ember\actions\PopulateTrait; |
| 15 | 15 | use flipbox\organizations\actions\organizations\PopulateOrganizationTrait; |
| 16 | -use flipbox\organizations\cp\controllers\OrganizationTabsTrait; |
|
| 17 | 16 | use flipbox\organizations\cp\controllers\OrganizationSitesTrait; |
| 18 | -use flipbox\organizations\elements\Organization; |
|
| 17 | +use flipbox\organizations\cp\controllers\OrganizationTabsTrait; |
|
| 19 | 18 | use flipbox\organizations\elements\Organization as OrganizationElement; |
| 20 | 19 | use yii\base\Action; |
| 21 | 20 | |
@@ -271,7 +271,7 @@ |
||
| 271 | 271 | /** |
| 272 | 272 | * Get an associated type by identifier (id/handle) |
| 273 | 273 | * |
| 274 | - * @param $identifier |
|
| 274 | + * @param integer|null $identifier |
|
| 275 | 275 | * @return null|TypeModel |
| 276 | 276 | */ |
| 277 | 277 | public function getType($identifier) |
@@ -12,7 +12,6 @@ |
||
| 12 | 12 | use craft\helpers\ArrayHelper; |
| 13 | 13 | use flipbox\craft\ember\helpers\QueryHelper; |
| 14 | 14 | use flipbox\organizations\queries\OrganizationTypeQuery; |
| 15 | -use flipbox\organizations\records\OrganizationType; |
|
| 16 | 15 | use flipbox\organizations\records\OrganizationType as TypeModel; |
| 17 | 16 | use flipbox\organizations\records\OrganizationTypeAssociation; |
| 18 | 17 | |
@@ -168,6 +168,9 @@ |
||
| 168 | 168 | return $this; |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | + /** |
|
| 172 | + * @return User |
|
| 173 | + */ |
|
| 171 | 174 | protected function resolveUser($user) |
| 172 | 175 | { |
| 173 | 176 | if (is_array($user) && |
@@ -10,11 +10,10 @@ |
||
| 10 | 10 | |
| 11 | 11 | use Craft; |
| 12 | 12 | use craft\db\Query; |
| 13 | -use craft\elements\db\UserQuery; |
|
| 14 | 13 | use craft\elements\User; |
| 14 | +use craft\elements\db\UserQuery; |
|
| 15 | 15 | use craft\helpers\ArrayHelper; |
| 16 | 16 | use flipbox\craft\ember\helpers\QueryHelper; |
| 17 | -use flipbox\organizations\records\UserAssociation; |
|
| 18 | 17 | use flipbox\organizations\records\UserAssociation as OrganizationUsersRecord; |
| 19 | 18 | |
| 20 | 19 | /** |