web-base/Core/Objects/DatabaseEntity/Attribute/Visibility.class.php

27 lines
528 B
PHP
Raw Permalink Normal View History

2023-01-07 15:34:05 +01:00
<?php
namespace Core\Objects\DatabaseEntity\Attribute;
#[\Attribute(\Attribute::TARGET_PROPERTY)] class Visibility {
// Visibility enum
const NONE = 0;
const BY_GROUP = 1;
const ALL = 2;
private int $visibility;
private array $groups;
public function __construct(int $visibility, int ...$groups) {
$this->visibility = $visibility;
$this->groups = $groups;
}
public function getType(): int {
return $this->visibility;
}
public function getGroups(): array {
return $this->groups;
}
}