From dd6016bcbddccdb70ab59c17a26159a02367ac3a Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 2 Oct 2016 12:06:07 +0200 Subject: [PATCH] Adding group status --- Account/Group.php | 12 ++++++++++++ Account/GroupStatus.php | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 Account/GroupStatus.php diff --git a/Account/Group.php b/Account/Group.php index 0e9230a15..03b606361 100644 --- a/Account/Group.php +++ b/Account/Group.php @@ -71,6 +71,8 @@ class Group implements ArrayableInterface, \JsonSerializable */ protected $parents = []; + private $status = GroupStatus::INACTIVE; + /** * Permissions. * @@ -171,6 +173,16 @@ class Group implements ArrayableInterface, \JsonSerializable $this->description = $description; } + public function getStatus() : int + { + return $this->status; + } + + public function setStatus(int $status) + { + $this->status = $status; + } + /** * Get string representation. * diff --git a/Account/GroupStatus.php b/Account/GroupStatus.php new file mode 100644 index 000000000..8699f72c8 --- /dev/null +++ b/Account/GroupStatus.php @@ -0,0 +1,38 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace phpOMS\Account; + +use phpOMS\Datatypes\Enum; + +/** + * Accept status enum. + * + * @category Calendar + * @package Modules + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +abstract class GroupStatus extends Enum +{ + const ACTIVE = 1; + + const INACTIVE = 2; + + const HIDDEN = 4; +}