Skip to content

Commit

Permalink
Add geter for embedded plan in LayoutItem
Browse files Browse the repository at this point in the history
  • Loading branch information
slavcodev committed Sep 21, 2015
1 parent 3c6fc91 commit 4fc6fed
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Entities/LayoutItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,18 @@ public function setStarred($value)
{
return $this->setAttribute('starred', (bool) $value);
}

/**
* @return Plan|null
*/
public function getPlan()
{
$values = $this->getAttribute('plan');

if ($values !== null) {
return new Plan($values);
} else {
return null;
}
}
}

0 comments on commit 4fc6fed

Please sign in to comment.