Skip to content

Commit

Permalink
relation / object mngt
Browse files Browse the repository at this point in the history
  • Loading branch information
nateiler committed Jun 20, 2019
1 parent eae9dde commit 13bbf2d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/objects/ElementMutatorTrait.php
Expand Up @@ -26,6 +26,14 @@ trait ElementMutatorTrait
*/
private $element;

/**
* @return bool
*/
public function isElementSet(): bool
{
return null !== $this->element;
}

/**
* Set associated elementId
*
Expand Down
8 changes: 8 additions & 0 deletions src/objects/FieldMutatorTrait.php
Expand Up @@ -25,6 +25,14 @@ trait FieldMutatorTrait
*/
private $field;

/**
* @return bool
*/
public function isFieldSet(): bool
{
return null !== $this->field;
}

/**
* Set associated fieldId
*
Expand Down
8 changes: 8 additions & 0 deletions src/objects/SiteMutatorTrait.php
Expand Up @@ -25,6 +25,14 @@ trait SiteMutatorTrait
*/
private $site;

/**
* @return bool
*/
public function isSiteSet(): bool
{
return null !== $this->site;
}

/**
* Set associated siteId
*
Expand Down
8 changes: 8 additions & 0 deletions src/objects/UserMutatorTrait.php
Expand Up @@ -25,6 +25,14 @@ trait UserMutatorTrait
*/
private $user;

/**
* @return bool
*/
public function isUserSet(): bool
{
return null !== $this->user;
}

/**
* Set associated userId
*
Expand Down

0 comments on commit 13bbf2d

Please sign in to comment.