@@ -15,18 +15,18 @@ |
||
| 15 | 15 | use craft\base\Field; |
| 16 | 16 | use craft\base\PreviewableFieldInterface; |
| 17 | 17 | use craft\db\Query; |
| 18 | +use craft\elements\User as UserElement; |
|
| 18 | 19 | use craft\elements\db\ElementQuery; |
| 19 | 20 | use craft\elements\db\ElementQueryInterface; |
| 20 | -use craft\elements\User as UserElement; |
|
| 21 | 21 | use craft\helpers\ElementHelper; |
| 22 | 22 | use craft\helpers\StringHelper; |
| 23 | 23 | use craft\validators\ArrayValidator; |
| 24 | -use flipbox\organization\elements\db\Organization as OrganizationQuery; |
|
| 24 | +use flipbox\organization\Organization as OrganizationPlugin; |
|
| 25 | 25 | use flipbox\organization\elements\Organization as OrganizationElement; |
| 26 | +use flipbox\organization\elements\db\Organization as OrganizationQuery; |
|
| 26 | 27 | use flipbox\organization\helpers\Query as QueryHelper; |
| 27 | -use flipbox\organization\Organization as OrganizationPlugin; |
|
| 28 | -use flipbox\organization\records\User as OrganizationUserRecord; |
|
| 29 | 28 | use flipbox\organization\queue\jobs\LocalizeRelations; |
| 29 | +use flipbox\organization\records\User as OrganizationUserRecord; |
|
| 30 | 30 | use flipbox\organization\validators\User as UserValidator; |
| 31 | 31 | use yii\base\Exception; |
| 32 | 32 | |
@@ -16,8 +16,8 @@ |
||
| 16 | 16 | use craft\models\FieldLayout as FieldLayoutModel; |
| 17 | 17 | use craft\services\Elements; |
| 18 | 18 | use craft\services\Fields; |
| 19 | -use craft\web\twig\variables\CraftVariable; |
|
| 20 | 19 | use craft\web\UrlManager; |
| 20 | +use craft\web\twig\variables\CraftVariable; |
|
| 21 | 21 | use flipbox\organization\controllers\OrganizationController; |
| 22 | 22 | use flipbox\organization\elements\Organization as OrganizationElement; |
| 23 | 23 | use flipbox\organization\fields\Organization as OrganizationField; |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | Event::on( |
| 62 | 62 | Fields::class, |
| 63 | 63 | Fields::EVENT_REGISTER_FIELD_TYPES, |
| 64 | - function (RegisterComponentTypesEvent $event) { |
|
| 64 | + function(RegisterComponentTypesEvent $event) { |
|
| 65 | 65 | $event->types[] = OrganizationField::class; |
| 66 | 66 | $event->types[] = UserField::class; |
| 67 | 67 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | Event::on( |
| 72 | 72 | Elements::class, |
| 73 | 73 | Elements::EVENT_REGISTER_ELEMENT_TYPES, |
| 74 | - function (RegisterComponentTypesEvent $event) { |
|
| 74 | + function(RegisterComponentTypesEvent $event) { |
|
| 75 | 75 | $event->types[] = OrganizationElement::class; |
| 76 | 76 | } |
| 77 | 77 | ); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | Event::on( |
| 88 | 88 | CraftVariable::class, |
| 89 | 89 | CraftVariable::EVENT_INIT, |
| 90 | - function (Event $event) { |
|
| 90 | + function(Event $event) { |
|
| 91 | 91 | /** @var CraftVariable $variable */ |
| 92 | 92 | $variable = $event->sender; |
| 93 | 93 | $variable->set('organization', OrganizationVariable::class); |