first commit

This commit is contained in:
salam committed 2026-10-19 08:18:39 +02:00
commit 1218dd1517
12716 files changed
+989233

No files matched your search

@@ -0,0 +1,148 @@
<?php
namespace TYPO3\CMS\Beuser\Domain\Model;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
/**
* Model for backend user
* @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
*/
class BackendUser extends \TYPO3\CMS\Extbase\Domain\Model\BackendUser
{
/**
* Comma separated list of uids in multi-select
* Might retrieve the labels from TCA/DataMapper
*
* @var string
*/
protected $allowedLanguages = '';
/**
* @var string
*/
protected $dbMountPoints = '';
/**
* @var string
*/
protected $description;
/**
* @var string
*/
protected $fileMountPoints = '';
/**
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Beuser\Domain\Model\BackendUserGroup>
*/
protected $backendUserGroups;
/**
* @param string $allowedLanguages
*/
public function setAllowedLanguages($allowedLanguages)
{
$this->allowedLanguages = $allowedLanguages;
}
/**
* @return string
*/
public function getAllowedLanguages()
{
return $this->allowedLanguages;
}
/**
* @param string $dbMountPoints
*/
public function setDbMountPoints($dbMountPoints)
{
$this->dbMountPoints = $dbMountPoints;
}
/**
* @return string
*/
public function getDbMountPoints()
{
return $this->dbMountPoints;
}
/**
* @param string $fileMountPoints
*/
public function setFileMountPoints($fileMountPoints)
{
$this->fileMountPoints = $fileMountPoints;
}
/**
* @return string
*/
public function getFileMountPoints()
{
return $this->fileMountPoints;
}
/**
* Check if user is active, not disabled
*
* @return bool
*/
public function isActive()
{
if ($this->getIsDisabled()) {
return false;
}
$now = new \DateTime('now');
return !$this->getStartDateAndTime() && !$this->getEndDateAndTime() || $this->getStartDateAndTime() <= $now && (!$this->getEndDateAndTime() || $this->getEndDateAndTime() > $now);
}
/**
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $backendUserGroups
*/
public function setBackendUserGroups($backendUserGroups)
{
$this->backendUserGroups = $backendUserGroups;
}
/**
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
*/
public function getBackendUserGroups()
{
return $this->backendUserGroups;
}
/**
* Check if user is currently logged in
*
* @return bool
*/
public function isCurrentlyLoggedIn()
{
return $this->getUid() === (int)$this->getBackendUser()->user['uid'];
}
/**
* Gets the currently logged in backend user
*
* @return \TYPO3\CMS\Core\Authentication\BackendUserAuthentication
*/
public function getBackendUser()
{
return $GLOBALS['BE_USER'];
}
}
@@ -0,0 +1,109 @@
<?php
namespace TYPO3\CMS\Beuser\Domain\Model;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
use TYPO3\CMS\Extbase\Annotation as Extbase;
/**
* Model for backend user group
* @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
*/
class BackendUserGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
/**
* @var string
*/
protected $title;
/**
* @var string
*/
protected $description;
/**
* @var bool
*/
protected $hidden;
/**
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Beuser\Domain\Model\BackendUserGroup>
* @Extbase\ORM\Lazy
*/
protected $subGroups;
/**
* @param string $title
*/
public function setTitle($title)
{
$this->title = $title;
}
/**
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* @param string $description
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @param bool $hidden
*/
public function setHidden($hidden)
{
$this->hidden = $hidden;
}
/**
* @return bool
*/
public function getHidden()
{
return $this->hidden;
}
/**
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $subGroups
*/
public function setSubGroups($subGroups)
{
$this->subGroups = $subGroups;
}
/**
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
*/
public function getSubGroups()
{
return $this->subGroups;
}
}
@@ -0,0 +1,155 @@
<?php
namespace TYPO3\CMS\Beuser\Domain\Model;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
/**
* Demand filter for listings
* @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
*/
class Demand extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
/**
* @var int
*/
const ALL = 0;
/**
* @var int
*/
const USERTYPE_ADMINONLY = 1;
/**
* @var int
*/
const USERTYPE_USERONLY = 2;
/**
* @var int
*/
const STATUS_ACTIVE = 1;
/**
* @var int
*/
const STATUS_INACTIVE = 2;
/**
* @var int
*/
const LOGIN_SOME = 1;
/**
* @var int
*/
const LOGIN_NONE = 2;
/**
* @var string
*/
protected $userName = '';
/**
* @var int
*/
protected $userType = self::ALL;
/**
* @var int
*/
protected $status = self::ALL;
/**
* @var int
*/
protected $logins = 0;
/**
* @var int
*/
protected $backendUserGroup = 0;
/**
* @param string $userName
*/
public function setUserName($userName)
{
$this->userName = $userName;
}
/**
* @return string
*/
public function getUserName()
{
return $this->userName;
}
/**
* @param int $userType
*/
public function setUserType($userType)
{
$this->userType = $userType;
}
/**
* @return int
*/
public function getUserType()
{
return $this->userType;
}
/**
* @param int $status
*/
public function setStatus($status)
{
$this->status = $status;
}
/**
* @return int
*/
public function getStatus()
{
return $this->status;
}
/**
* @param int $logins
*/
public function setLogins($logins)
{
$this->logins = $logins;
}
/**
* @return int
*/
public function getLogins()
{
return $this->logins;
}
/**
* @param int $backendUserGroup
*/
public function setBackendUserGroup($backendUserGroup)
{
$this->backendUserGroup = $backendUserGroup;
}
/**
* @return int
*/
public function getBackendUserGroup()
{
return $this->backendUserGroup;
}
}
@@ -0,0 +1,87 @@
<?php
namespace TYPO3\CMS\Beuser\Domain\Model;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
/**
* Module data object
* @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
*/
class ModuleData
{
/**
* @var \TYPO3\CMS\Beuser\Domain\Model\Demand
*/
protected $demand;
/**
* @var array
*/
protected $compareUserList = [];
/**
* @param \TYPO3\CMS\Beuser\Domain\Model\Demand $demand
*/
public function injectDemand(\TYPO3\CMS\Beuser\Domain\Model\Demand $demand)
{
$this->demand = $demand;
}
/**
* @return \TYPO3\CMS\Beuser\Domain\Model\Demand
*/
public function getDemand()
{
return $this->demand;
}
/**
* @param \TYPO3\CMS\Beuser\Domain\Model\Demand $demand
*/
public function setDemand(\TYPO3\CMS\Beuser\Domain\Model\Demand $demand)
{
$this->demand = $demand;
}
/**
* Returns the compare list as array of user uis
*
* @return array
*/
public function getCompareUserList()
{
return array_keys($this->compareUserList);
}
/**
* Adds one backend user (by uid) to the compare user list
* Cannot be ObjectStorage, must be array
*
* @param int $uid
*/
public function attachUidCompareUser($uid)
{
$this->compareUserList[$uid] = true;
}
/**
* Strip one backend user from the compare user list
*
* @param int $uid
*/
public function detachUidCompareUser($uid)
{
unset($this->compareUserList[$uid]);
}
}