@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |
| 93 | - * @return UserType|null |
|
| 93 | + * @return \flipbox\craft\ember\records\ActiveRecord|null |
|
| 94 | 94 | */ |
| 95 | 95 | protected function resolveType() |
| 96 | 96 | { |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
| 105 | - * @return UserType|null |
|
| 105 | + * @return null|\flipbox\craft\ember\records\ActiveRecord |
|
| 106 | 106 | */ |
| 107 | 107 | private function resolveTypeFromId() |
| 108 | 108 | { |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | /** |
| 117 | 117 | * @param $type |
| 118 | - * @return UserType|null |
|
| 118 | + * @return null|\flipbox\craft\ember\records\ActiveRecord |
|
| 119 | 119 | */ |
| 120 | 120 | protected function internalResolveType($type = null) |
| 121 | 121 | { |
@@ -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 | |
@@ -85,6 +85,7 @@ |
||
| 85 | 85 | * @inheritDoc |
| 86 | 86 | * |
| 87 | 87 | * @param bool $addToOrganization |
| 88 | + * @param Organization $object |
|
| 88 | 89 | */ |
| 89 | 90 | public function addOne($object, array $attributes = [], bool $addToOrganization = false) |
| 90 | 91 | { |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | - * @param $type |
|
| 53 | + * @param \flipbox\craft\ember\records\ActiveRecord $type |
|
| 54 | 54 | * @return static |
| 55 | 55 | */ |
| 56 | 56 | public function setType($type = null) |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |
| 93 | - * @return OrganizationType|null |
|
| 93 | + * @return \flipbox\craft\ember\records\ActiveRecord|null |
|
| 94 | 94 | */ |
| 95 | 95 | protected function resolveType() |
| 96 | 96 | { |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
| 105 | - * @return OrganizationType|null |
|
| 105 | + * @return null|\flipbox\craft\ember\records\ActiveRecord |
|
| 106 | 106 | */ |
| 107 | 107 | private function resolveTypeFromId() |
| 108 | 108 | { |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | /** |
| 117 | 117 | * @param $type |
| 118 | - * @return OrganizationType|null |
|
| 118 | + * @return null|\flipbox\craft\ember\records\ActiveRecord |
|
| 119 | 119 | */ |
| 120 | 120 | protected function internalResolveType($type = null) |
| 121 | 121 | { |
@@ -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 | /** |
@@ -333,7 +333,7 @@ |
||
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 | /** |
| 336 | - * @param QueryInterface|ElementInterface[] $objects |
|
| 336 | + * @param \flipbox\organizations\queries\OrganizationQuery $objects |
|
| 337 | 337 | * @return bool |
| 338 | 338 | */ |
| 339 | 339 | public function associateMany($objects): bool |
@@ -9,9 +9,9 @@ |
||
| 9 | 9 | namespace flipbox\organizations\managers; |
| 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 | -use Tightenco\Collect\Support\Collection; |
|
| 15 | 15 | use yii\base\Exception; |
| 16 | 16 | use yii\db\ActiveRecord; |
| 17 | 17 | use yii\db\QueryInterface; |
@@ -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\UserTypeAssociationManager; |
| 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,11 +9,11 @@ |
||
| 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 | 14 | use flipbox\organizations\managers\OrganizationTypeAssociationManager; |
| 14 | 15 | use flipbox\organizations\queries\OrganizationTypeQuery; |
| 15 | 16 | use flipbox\organizations\records\OrganizationType; |
| 16 | -use Tightenco\Collect\Support\Collection; |
|
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * @author Flipbox Factory <[email protected]> |
@@ -13,9 +13,9 @@ |
||
| 13 | 13 | use craft\helpers\ArrayHelper; |
| 14 | 14 | use craft\helpers\Json; |
| 15 | 15 | use flipbox\craft\ember\helpers\QueryHelper; |
| 16 | +use flipbox\organizations\Organizations; |
|
| 16 | 17 | use flipbox\organizations\behaviors\OrganizationsAssociatedToUserBehavior; |
| 17 | 18 | use flipbox\organizations\elements\Organization; |
| 18 | -use flipbox\organizations\Organizations; |
|
| 19 | 19 | use flipbox\organizations\queries\UserAssociationQuery; |
| 20 | 20 | use flipbox\organizations\records\UserAssociation; |
| 21 | 21 | |
@@ -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) |
@@ -9,8 +9,8 @@ |
||
| 9 | 9 | namespace flipbox\organizations\validators; |
| 10 | 10 | |
| 11 | 11 | use craft\helpers\Json; |
| 12 | -use flipbox\organizations\behaviors\OrganizationsAssociatedToUserBehavior; |
|
| 13 | 12 | use flipbox\organizations\Organizations as OrganizationPlugin; |
| 13 | +use flipbox\organizations\behaviors\OrganizationsAssociatedToUserBehavior; |
|
| 14 | 14 | use yii\base\Model; |
| 15 | 15 | use yii\validators\Validator; |
| 16 | 16 | |