Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
183 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
/** | ||
* @copyright Copyright (c) Flipbox Digital Limited | ||
* @license https://github.com/flipboxfactory/craft-ember/blob/master/LICENSE | ||
* @link https://github.com/flipboxfactory/craft-ember | ||
*/ | ||
|
||
namespace flipbox\organizations\models; | ||
|
||
use flipbox\organizations\Organizations; | ||
|
||
/** | ||
* @author Flipbox Factory <hello@flipboxfactory.com> | ||
* @since 2.0.0 | ||
*/ | ||
trait OrganizationAttributeTrait | ||
{ | ||
use OrganizationRulesTrait, \flipbox\organizations\objects\OrganizationAttributeTrait; | ||
|
||
/** | ||
* @return array | ||
*/ | ||
protected function organizationAttributes(): array | ||
{ | ||
return [ | ||
'organizationId' | ||
]; | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
protected function organizationAttributeLabels(): array | ||
{ | ||
return [ | ||
'organizationId' => Organizations::t('Organization Id') | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
/** | ||
* @copyright Copyright (c) Flipbox Digital Limited | ||
* @license https://github.com/flipboxfactory/craft-ember/blob/master/LICENSE | ||
* @link https://github.com/flipboxfactory/craft-ember | ||
*/ | ||
|
||
namespace flipbox\organizations\objects; | ||
|
||
/** | ||
* @property int|null $organizationId | ||
* | ||
* @author Flipbox Factory <hello@flipboxfactory.com> | ||
* @since 1.0.0 | ||
*/ | ||
trait OrganizationAttributeTrait | ||
{ | ||
use OrganizationMutatorTrait; | ||
|
||
/** | ||
* @var int|null | ||
*/ | ||
private $organizationId; | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
protected function internalSetOrganizationId(int $id = null) | ||
{ | ||
$this->organizationId = $id; | ||
return $this; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
protected function internalGetOrganizationId() | ||
{ | ||
return $this->organizationId === null ? null : (int) $this->organizationId; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.