| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318 |
- <?php
- namespace Opentalent\OtAdmin\Domain\Entity;
- /**
- * Basic information about a typo3 website
- */
- class SiteInfos
- {
- protected int $rootUid;
- protected string $siteTitle = "";
- protected string $baseUrl = "";
- protected string $template = "";
- protected string $preferences = "";
- protected ?int $matomoId = null;
- protected ?bool $isPremium = null;
- protected bool $deleted = false;
- protected bool $hiddenOrRestricted = false;
- protected array $mountedForBeUsers = [];
- protected array $mountedForBeGroups = [];
- protected ?int $ownerUserUid = null;
- protected ?int $ownerGroupUid = null;
- /**
- * SiteInfos constructor.
- * @param int $rootUid
- * @param string|null $siteTitle
- * @param string|null $baseUrl
- * @param string|null $template
- * @param string|null $preferences
- * @param int|null $matomoId
- * @param bool|null $isPremium
- * @param bool $deleted
- * @param bool $hiddenOrRestricted
- * @param array|null $mountedForBeUsers
- * @param array|null $mountedForBeGroups
- * @param int|null $ownerUserUid
- * @param int|null $ownerGroupUid
- */
- public function __construct(
- int $rootUid,
- string $siteTitle = null,
- string $baseUrl = null,
- string $template = null,
- string $preferences = null,
- int $matomoId = null,
- bool $isPremium = null,
- bool $deleted = false,
- bool $hiddenOrRestricted = false,
- array $mountedForBeUsers = null,
- array $mountedForBeGroups = null,
- int $ownerUserUid = null,
- int $ownerGroupUid = null
- )
- {
- $this->rootUid = $rootUid;
- if ($siteTitle !== null) {
- $this->siteTitle = $siteTitle;
- }
- if ($baseUrl !== null) {
- $this->baseUrl = $baseUrl;
- }
- if ($template !== null) {
- $this->template = $template;
- }
- if ($preferences !== null) {
- $this->preferences = $preferences;
- }
- if ($matomoId !== null) {
- $this->matomoId = $matomoId;
- }
- if ($isPremium !== null) {
- $this->isPremium = $isPremium;
- }
- if ($deleted !== null) {
- $this->deleted = $deleted;
- }
- if ($hiddenOrRestricted !== null) {
- $this->hiddenOrRestricted = $hiddenOrRestricted;
- }
- if ($mountedForBeUsers !== null) {
- $this->mountedForBeUsers = $mountedForBeUsers;
- }
- if ($mountedForBeGroups !== null) {
- $this->mountedForBeGroups = $mountedForBeGroups;
- }
- if ($ownerUserUid !== null) {
- $this->ownerUserUid = $ownerUserUid;
- }
- if ($ownerGroupUid !== null) {
- $this->ownerGroupUid = $ownerGroupUid;
- }
- }
- /**
- * @return int
- */
- public function getRootUid(): int
- {
- return $this->rootUid;
- }
- /**
- * @param int $rootUid
- */
- public function setRootUid(int $rootUid): void
- {
- $this->rootUid = $rootUid;
- }
- /**
- * @return string
- */
- public function getSiteTitle(): string
- {
- return $this->siteTitle;
- }
- /**
- * @param string $siteTitle
- */
- public function setSiteTitle(string $siteTitle): void
- {
- $this->siteTitle = $siteTitle;
- }
- /**
- * @return string
- */
- public function getBaseUrl(): string
- {
- return $this->baseUrl;
- }
- /**
- * @param string $baseUrl
- */
- public function setBaseUrl(string $baseUrl): void
- {
- $this->baseUrl = $baseUrl;
- }
- /**
- * @return string
- */
- public function getTemplate(): string
- {
- return $this->template;
- }
- /**
- * @param string $template
- */
- public function setTemplate(string $template): void
- {
- $this->template = $template;
- }
- /**
- * @return string
- */
- public function getPreferences(): string
- {
- return $this->preferences;
- }
- /**
- * @param string $preferences
- */
- public function setPreferences(string $preferences): void
- {
- $this->preferences = $preferences;
- }
- /**
- * @return int
- */
- public function getMatomoId(): ?int
- {
- return $this->matomoId;
- }
- /**
- * @param int|null $matomoId
- */
- public function setMatomoId(?int $matomoId): void
- {
- $this->matomoId = $matomoId;
- }
- /**
- * @return bool | null
- */
- public function isPremium(): ?bool
- {
- return $this->isPremium;
- }
- /**
- * @param bool $isPremium
- */
- public function setIsPremium(bool $isPremium): void
- {
- $this->isPremium = $isPremium;
- }
- /**
- * @return bool
- */
- public function isDeleted(): bool
- {
- return $this->deleted;
- }
- /**
- * @param bool $deleted
- */
- public function setDeleted(bool $deleted): void
- {
- $this->deleted = $deleted;
- }
- /**
- * @return bool
- */
- public function isHiddenOrRestricted(): bool
- {
- return $this->hiddenOrRestricted;
- }
- /**
- * @param bool $hiddenOrRestricted
- */
- public function setHiddenOrRestricted(bool $hiddenOrRestricted): void
- {
- $this->hiddenOrRestricted = $hiddenOrRestricted;
- }
- /**
- * @return array
- */
- public function getMountedForBeUsers(): array
- {
- return $this->mountedForBeUsers;
- }
- /**
- * @param array $mountedForBeUsers
- */
- public function setMountedForBeUsers(array $mountedForBeUsers): void
- {
- $this->mountedForBeUsers = $mountedForBeUsers;
- }
- /**
- * @param array $beUser ['uid' => int, 'username' => string]
- */
- public function addMountedForBeUser(array $beUser): void
- {
- $this->mountedForBeUsers[] = $beUser;
- }
- /**
- * @return array
- */
- public function getMountedForBeGroups(): array
- {
- return $this->mountedForBeGroups;
- }
- /**
- * @param array $mountedForBeGroups
- */
- public function setMountedForBeGroups(array $mountedForBeGroups): void
- {
- $this->mountedForBeGroups = $mountedForBeGroups;
- }
- /**
- * @param array $beGroup
- */
- public function addMountedForBeGroups(array $beGroup): void
- {
- $this->mountedForBeGroups[] = $beGroup;
- }
- /**
- * @return int|null
- */
- public function getOwnerUserUid(): ?int
- {
- return $this->ownerUserUid;
- }
- /**
- * @param int|null $ownerUserUid
- */
- public function setOwnerUserUid(?int $ownerUserUid): void
- {
- $this->ownerUserUid = $ownerUserUid;
- }
- /**
- * @return int|null
- */
- public function getOwnerGroupUid(): ?int
- {
- return $this->ownerGroupUid;
- }
- /**
- * @param int|null $ownerGroupUid
- */
- public function setOwnerGroupUid(?int $ownerGroupUid): void
- {
- $this->ownerGroupUid = $ownerGroupUid;
- }
- }
|