-
Notifications
You must be signed in to change notification settings - Fork 451
/
DeleteGroupCommand.php
95 lines (75 loc) · 2.23 KB
/
DeleteGroupCommand.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
namespace Concrete\Core\User\Group\Command;
use Concrete\Core\Foundation\Command\Command;
use Concrete\Core\User\Group\Command\Traits\ExistingGroupTrait;
class DeleteGroupCommand extends Command
{
use ExistingGroupTrait;
public const ONCHILDGROUPS_MOVETOROOT = 1;
public const ONCHILDGROUPS_MOVETOPARENT = 2;
public const ONCHILDGROUPS_ABORT = 3;
public const ONCHILDGROUPS_DELETE = 4;
/**
* @var bool
*/
private $onlyIfEmpty = false;
/**
* @var bool
*/
private $onChildGroups = self::ONCHILDGROUPS_MOVETOROOT;
/**
* @var bool
*/
private $extendedResults = false;
public function __construct(int $groupId)
{
$this->setGroupID($groupId);
}
public function isOnlyIfEmpty(): bool
{
return $this->onlyIfEmpty;
}
/**
* @return $this
*/
public function setOnlyIfEmpty(bool $value): object
{
$this->onlyIfEmpty = $value;
return $this;
}
/**
* @return $this
*/
public function setExtendedResults(bool $value): object
{
$this->extendedResults = $value;
return $this;
}
public function isExtendedResults(): bool
{
return $this->extendedResults;
}
/**
* @return $this
*
* @see \Concrete\Core\User\Group\Command\DeleteGroupCommand::ONCHILDGROUPS_MOVETOROOT
* @see \Concrete\Core\User\Group\Command\DeleteGroupCommand::ONCHILDGROUPS_MOVETOPARENT
* @see \Concrete\Core\User\Group\Command\DeleteGroupCommand::ONCHILDGROUPS_ABORT
* @see \Concrete\Core\User\Group\Command\DeleteGroupCommand::ONCHILDGROUPS_DELETE
*/
public function setOnChildGroups(int $value): object
{
$this->onChildGroups = $value;
return $this;
}
/**
* @see \Concrete\Core\User\Group\Command\DeleteGroupCommand::ONCHILDGROUPS_MOVETOROOT
* @see \Concrete\Core\User\Group\Command\DeleteGroupCommand::ONCHILDGROUPS_MOVETOPARENT
* @see \Concrete\Core\User\Group\Command\DeleteGroupCommand::ONCHILDGROUPS_ABORT
* @see \Concrete\Core\User\Group\Command\DeleteGroupCommand::ONCHILDGROUPS_DELETE
*/
public function getOnChildGroups(): int
{
return $this->onChildGroups;
}
}