| 1 | <?php |
||
| 19 | trait DisableAccountTrait |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @var bool Whether account is enabled. |
||
| 23 | * |
||
| 24 | * @ORM\Column(name="enabled", type="boolean", nullable=false) |
||
| 25 | */ |
||
| 26 | protected $isEnabled = true; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Disables or enables the account. |
||
| 30 | * |
||
| 31 | * @param bool $isEnabled New status of the account. |
||
| 32 | * |
||
| 33 | * @return self |
||
| 34 | */ |
||
| 35 | 1 | public function setEnabled(bool $isEnabled) |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Specifies whether the "disable account" feature is available for this user. |
||
| 46 | * |
||
| 47 | * @return bool |
||
| 48 | */ |
||
| 49 | 1 | protected function canAccountBeDisabled(): bool |
|
| 53 | } |
||
| 54 |