Commit 682873dd authored by Alexander Schnitzler's avatar Alexander Schnitzler
Browse files

[TASK] Include all classes via use statements in ext:extbase

This patch has been created with rector and php-cs-fixer

    bin/rector process --set=php53 typo3/sysext/extbase/Classes
    bin/rector process --set=php53 typo3/sysext/extbase/Tests

Releases: master
Resolves: #91047
Change-Id: Idcd1e10e5bf6dd5fa504873e450e31a980fab9db
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64180

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarAlexander Schnitzler <git@alexanderschnitzler.de>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarAlexander Schnitzler <git@alexanderschnitzler.de>
parent dc6dfd79
parameters:
php_version_features: '7.2'
auto_import_names: false
auto_import_names: true
import_short_classes: false
import_doc_blocks: false
paths:
- 'typo3/sysext/*/Classes/'
- 'typo3/sysext/*/Tests/Unit/'
- 'typo3/sysext/*/Tests/Functional/'
exclude_paths:
- 'typo3/sysext/*/Configuration/'
- 'typo3/sysext/core/Tests/Unit/Configuration/TypoScript/ConditionMatching/Fixtures/ConditionMatcherUserFuncs.php'
- 'typo3/sysext/*/Tests/Unit/Acceptance'
- 'typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/Fixtures/'
- 'ClassAliasMap.php'
- 'class.ext_update.php'
- 'typo3/sysext/*/Configuration/'
- 'typo3/sysext/core/Tests/Unit/Configuration/TypoScript/ConditionMatching/Fixtures/ConditionMatcherUserFuncs.php'
- 'typo3/sysext/*/Tests/Unit/Acceptance'
- 'typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/Fixtures/'
- 'ClassAliasMap.php'
- 'class.ext_update.php'
exclude_rectors:
- Rector\Php55\Rector\String_\StringClassNameToClassConstantRector
- Rector\Php70\Rector\List_\ListSwapArrayOrderRector
......
......@@ -17,11 +17,20 @@ declare(strict_types=1);
namespace TYPO3\CMS\Extbase\Configuration;
use TYPO3\CMS\Core\SingletonInterface;
use TYPO3\CMS\Core\TypoScript\TypoScriptService;
use TYPO3\CMS\Core\Utility\ArrayUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
use TYPO3\CMS\Extbase\Service\EnvironmentService;
use TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
/**
* Abstract base class for a general purpose configuration manager
* @internal only to be used within Extbase, not part of TYPO3 Core API.
*/
abstract class AbstractConfigurationManager implements \TYPO3\CMS\Core\SingletonInterface
abstract class AbstractConfigurationManager implements SingletonInterface
{
/**
* Default backend storage PID
......@@ -82,9 +91,9 @@ abstract class AbstractConfigurationManager implements \TYPO3\CMS\Core\Singleton
* @param \TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService
*/
public function __construct(
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager,
\TYPO3\CMS\Core\TypoScript\TypoScriptService $typoScriptService,
\TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService
ObjectManagerInterface $objectManager,
TypoScriptService $typoScriptService,
EnvironmentService $environmentService
) {
$this->objectManager = $objectManager;
$this->typoScriptService = $typoScriptService;
......@@ -94,7 +103,7 @@ abstract class AbstractConfigurationManager implements \TYPO3\CMS\Core\Singleton
/**
* @param \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObject
*/
public function setContentObject(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObject): void
public function setContentObject(ContentObjectRenderer $contentObject): void
{
$this->contentObject = $contentObject;
}
......@@ -102,7 +111,7 @@ abstract class AbstractConfigurationManager implements \TYPO3\CMS\Core\Singleton
/**
* @return \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer|null
*/
public function getContentObject(): ?\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
public function getContentObject(): ?ContentObjectRenderer
{
return $this->contentObject;
}
......@@ -146,7 +155,7 @@ abstract class AbstractConfigurationManager implements \TYPO3\CMS\Core\Singleton
// only merge $this->configuration and override controller configuration when retrieving configuration of the current plugin
if ($extensionName === null || $extensionName === $this->extensionName && $pluginName === $this->pluginName) {
$pluginConfiguration = $this->getPluginConfiguration((string)$this->extensionName, (string)$this->pluginName);
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($pluginConfiguration, $this->configuration);
ArrayUtility::mergeRecursiveWithOverrule($pluginConfiguration, $this->configuration);
$pluginConfiguration['controllerConfiguration'] = $this->getControllerConfiguration((string)$this->extensionName, (string)$this->pluginName);
if (isset($this->configuration['switchableControllerActions'])) {
$this->overrideControllerConfigurationWithSwitchableControllerActions($pluginConfiguration, $this->configuration['switchableControllerActions']);
......@@ -155,7 +164,7 @@ abstract class AbstractConfigurationManager implements \TYPO3\CMS\Core\Singleton
$pluginConfiguration = $this->getPluginConfiguration((string)$extensionName, (string)$pluginName);
$pluginConfiguration['controllerConfiguration'] = $this->getControllerConfiguration((string)$extensionName, (string)$pluginName);
}
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($frameworkConfiguration, $pluginConfiguration);
ArrayUtility::mergeRecursiveWithOverrule($frameworkConfiguration, $pluginConfiguration);
// only load context specific configuration when retrieving configuration of the current plugin
if ($extensionName === null || $extensionName === $this->extensionName && $pluginName === $this->pluginName) {
$frameworkConfiguration = $this->getContextSpecificFrameworkConfiguration($frameworkConfiguration);
......@@ -167,19 +176,19 @@ abstract class AbstractConfigurationManager implements \TYPO3\CMS\Core\Singleton
// stdWrap. Than we convert the configuration to normal TypoScript
// and apply the stdWrap to the storagePid
if (!$this->environmentService->isEnvironmentInFrontendMode()) {
\TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility::simulateFrontendEnvironment($this->getContentObject());
FrontendSimulatorUtility::simulateFrontendEnvironment($this->getContentObject());
}
$conf = $this->typoScriptService->convertPlainArrayToTypoScriptArray($frameworkConfiguration['persistence']);
$frameworkConfiguration['persistence']['storagePid'] = $GLOBALS['TSFE']->cObj->stdWrap($conf['storagePid'], $conf['storagePid.']);
if (!$this->environmentService->isEnvironmentInFrontendMode()) {
\TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility::resetFrontendEnvironment();
FrontendSimulatorUtility::resetFrontendEnvironment();
}
}
if (!empty($frameworkConfiguration['persistence']['recursive'])) {
// All implementations of getTreeList allow to pass the ids negative to include them into the result
// otherwise only childpages are returned
$storagePids = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $frameworkConfiguration['persistence']['storagePid']);
$storagePids = GeneralUtility::intExplode(',', $frameworkConfiguration['persistence']['storagePid']);
array_walk($storagePids, function (&$storagePid) {
if ($storagePid > 0) {
$storagePid = -$storagePid;
......
......@@ -17,6 +17,7 @@ declare(strict_types=1);
namespace TYPO3\CMS\Extbase\Configuration;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
use TYPO3\CMS\Core\Database\Query\Restriction\HiddenRestriction;
......@@ -272,7 +273,7 @@ class BackendConfigurationManager extends AbstractConfigurationManager
/**
* @return \TYPO3\CMS\Core\Authentication\BackendUserAuthentication
*/
protected function getBackendUser(): \TYPO3\CMS\Core\Authentication\BackendUserAuthentication
protected function getBackendUser(): BackendUserAuthentication
{
return $GLOBALS['BE_USER'];
}
......
......@@ -17,6 +17,11 @@ declare(strict_types=1);
namespace TYPO3\CMS\Extbase\Configuration;
use TYPO3\CMS\Extbase\Configuration\Exception\InvalidConfigurationTypeException;
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
use TYPO3\CMS\Extbase\Service\EnvironmentService;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
/**
* A configuration manager following the strategy pattern (GoF315). It hides the concrete
* implementation of the configuration manager and provides a unified access point.
......@@ -24,7 +29,7 @@ namespace TYPO3\CMS\Extbase\Configuration;
* Use the shutdown() method to drop the concrete implementation.
* @internal only to be used within Extbase, not part of TYPO3 Core API.
*/
class ConfigurationManager implements \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
class ConfigurationManager implements ConfigurationManagerInterface
{
/**
* @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
......@@ -46,8 +51,8 @@ class ConfigurationManager implements \TYPO3\CMS\Extbase\Configuration\Configura
* @param \TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService
*/
public function __construct(
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager,
\TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService
ObjectManagerInterface $objectManager,
EnvironmentService $environmentService
) {
$this->objectManager = $objectManager;
$this->environmentService = $environmentService;
......@@ -58,16 +63,16 @@ class ConfigurationManager implements \TYPO3\CMS\Extbase\Configuration\Configura
protected function initializeConcreteConfigurationManager(): void
{
if ($this->environmentService->isEnvironmentInFrontendMode()) {
$this->concreteConfigurationManager = $this->objectManager->get(\TYPO3\CMS\Extbase\Configuration\FrontendConfigurationManager::class);
$this->concreteConfigurationManager = $this->objectManager->get(FrontendConfigurationManager::class);
} else {
$this->concreteConfigurationManager = $this->objectManager->get(\TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager::class);
$this->concreteConfigurationManager = $this->objectManager->get(BackendConfigurationManager::class);
}
}
/**
* @param \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObject
*/
public function setContentObject(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObject): void
public function setContentObject(ContentObjectRenderer $contentObject): void
{
$this->concreteConfigurationManager->setContentObject($contentObject);
}
......@@ -75,7 +80,7 @@ class ConfigurationManager implements \TYPO3\CMS\Extbase\Configuration\Configura
/**
* @return \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer|null
*/
public function getContentObject(): ?\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
public function getContentObject(): ?ContentObjectRenderer
{
return $this->concreteConfigurationManager->getContentObject();
}
......@@ -119,7 +124,7 @@ class ConfigurationManager implements \TYPO3\CMS\Extbase\Configuration\Configura
case self::CONFIGURATION_TYPE_FULL_TYPOSCRIPT:
return $this->concreteConfigurationManager->getTypoScriptSetup();
default:
throw new \TYPO3\CMS\Extbase\Configuration\Exception\InvalidConfigurationTypeException('Invalid configuration type "' . $configurationType . '"', 1206031879);
throw new InvalidConfigurationTypeException('Invalid configuration type "' . $configurationType . '"', 1206031879);
}
}
......
......@@ -17,11 +17,14 @@ declare(strict_types=1);
namespace TYPO3\CMS\Extbase\Configuration;
use TYPO3\CMS\Core\SingletonInterface;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
/**
* Class ConfigurationManagerInterface
* @internal only to be used within Extbase, not part of TYPO3 Core API.
*/
interface ConfigurationManagerInterface extends \TYPO3\CMS\Core\SingletonInterface
interface ConfigurationManagerInterface extends SingletonInterface
{
const CONFIGURATION_TYPE_FRAMEWORK = 'Framework';
const CONFIGURATION_TYPE_SETTINGS = 'Settings';
......@@ -30,14 +33,14 @@ interface ConfigurationManagerInterface extends \TYPO3\CMS\Core\SingletonInterfa
/**
* @param \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObject
*/
public function setContentObject(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObject): void;
public function setContentObject(ContentObjectRenderer $contentObject): void;
/**
* Get the content object
*
* @return \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer|null
*/
public function getContentObject(): ?\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
public function getContentObject(): ?ContentObjectRenderer;
/**
* Returns the specified configuration.
......
......@@ -17,8 +17,13 @@ declare(strict_types=1);
namespace TYPO3\CMS\Extbase\Configuration;
use TYPO3\CMS\Core\Service\FlexFormService;
use TYPO3\CMS\Core\TypoScript\TypoScriptService;
use TYPO3\CMS\Core\Utility\ArrayUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\Exception\ParseErrorException;
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
use TYPO3\CMS\Extbase\Service\EnvironmentService;
/**
* A general purpose configuration manager used in frontend mode.
......@@ -26,7 +31,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
* Should NOT be singleton, as a new configuration manager is needed per plugin.
* @internal only to be used within Extbase, not part of TYPO3 Core API.
*/
class FrontendConfigurationManager extends \TYPO3\CMS\Extbase\Configuration\AbstractConfigurationManager
class FrontendConfigurationManager extends AbstractConfigurationManager
{
/**
* @var \TYPO3\CMS\Core\Service\FlexFormService
......@@ -40,10 +45,10 @@ class FrontendConfigurationManager extends \TYPO3\CMS\Extbase\Configuration\Abst
* @param \TYPO3\CMS\Core\Service\FlexFormService $flexFormService
*/
public function __construct(
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager,
\TYPO3\CMS\Core\TypoScript\TypoScriptService $typoScriptService,
\TYPO3\CMS\Extbase\Service\EnvironmentService $environmentService,
\TYPO3\CMS\Core\Service\FlexFormService $flexFormService
ObjectManagerInterface $objectManager,
TypoScriptService $typoScriptService,
EnvironmentService $environmentService,
FlexFormService $flexFormService
) {
parent::__construct($objectManager, $typoScriptService, $environmentService);
......@@ -245,7 +250,7 @@ class FrontendConfigurationManager extends \TYPO3\CMS\Extbase\Configuration\Abst
foreach ($switchableControllerActionPartsFromFlexForm as $switchableControllerActionPartFromFlexForm) {
[$controller, $action] = GeneralUtility::trimExplode('->', $switchableControllerActionPartFromFlexForm);
if (empty($controller) || empty($action)) {
throw new \TYPO3\CMS\Extbase\Configuration\Exception\ParseErrorException('Controller or action were empty when overriding switchableControllerActions from flexForm.', 1257146403);
throw new ParseErrorException('Controller or action were empty when overriding switchableControllerActions from flexForm.', 1257146403);
}
$overriddenControllerConfiguration[$controller][] = $action;
}
......
......@@ -31,6 +31,7 @@ use TYPO3\CMS\Extbase\Mvc\Response as ExtbaseResponse;
use TYPO3\CMS\Extbase\Persistence\ClassesConfigurationFactory;
use TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface;
use TYPO3\CMS\Extbase\Service\CacheService;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
/**
* Creates a request and dispatches it to the controller which was specified
......@@ -38,7 +39,7 @@ use TYPO3\CMS\Extbase\Service\CacheService;
*
* This class is the main entry point for extbase extensions.
*/
class Bootstrap implements \TYPO3\CMS\Extbase\Core\BootstrapInterface
class Bootstrap implements BootstrapInterface
{
/**
* @var array
......@@ -127,7 +128,7 @@ class Bootstrap implements \TYPO3\CMS\Extbase\Core\BootstrapInterface
public function initializeConfiguration(array $configuration): void
{
/** @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $contentObject */
$contentObject = $this->cObj ?? $this->container->get(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
$contentObject = $this->cObj ?? $this->container->get(ContentObjectRenderer::class);
$this->configurationManager->setContentObject($contentObject);
$this->configurationManager->setConfiguration($configuration);
// todo: Shouldn't the configuration manager object – which is a singleton – be stateless?
......
......@@ -15,13 +15,15 @@
namespace TYPO3\CMS\Extbase\Domain\Model;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
/**
* A file object (File Abstraction Layer)
*
* @internal experimental! This class is experimental and subject to change!
* @deprecated since TYPO3 10.4, will be removed in version 11.0
*/
abstract class AbstractFileCollection extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
abstract class AbstractFileCollection extends AbstractEntity
{
public function __construct()
{
......
......@@ -15,12 +15,15 @@
namespace TYPO3\CMS\Extbase\Domain\Model;
use TYPO3\CMS\Core\Resource\ResourceInterface;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
/**
* A file object (File Abstraction Layer)
*
* @internal experimental! This class is experimental and subject to change!
*/
abstract class AbstractFileFolder extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
abstract class AbstractFileFolder extends AbstractEntity
{
/**
* @var \TYPO3\CMS\Core\Resource\ResourceInterface
......@@ -30,7 +33,7 @@ abstract class AbstractFileFolder extends \TYPO3\CMS\Extbase\DomainObject\Abstra
/**
* @param \TYPO3\CMS\Core\Resource\ResourceInterface $originalResource
*/
public function setOriginalResource(\TYPO3\CMS\Core\Resource\ResourceInterface $originalResource)
public function setOriginalResource(ResourceInterface $originalResource)
{
$this->originalResource = $originalResource;
}
......
......@@ -16,11 +16,12 @@
namespace TYPO3\CMS\Extbase\Domain\Model;
use TYPO3\CMS\Extbase\Annotation as Extbase;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
/**
* This model represents a back-end user.
*/
class BackendUser extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
class BackendUser extends AbstractEntity
{
/**
* @var string
......
......@@ -16,11 +16,13 @@
namespace TYPO3\CMS\Extbase\Domain\Model;
use TYPO3\CMS\Extbase\Annotation as Extbase;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
/**
* This model represents a backend usergroup.
*/
class BackendUserGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
class BackendUserGroup extends AbstractEntity
{
const FILE_OPPERATIONS = 1;
const DIRECTORY_OPPERATIONS = 4;
......@@ -108,7 +110,7 @@ class BackendUserGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
*/
public function __construct()
{
$this->subGroups = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->subGroups = new ObjectStorage();
}
/**
......@@ -156,7 +158,7 @@ class BackendUserGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
*
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $subGroups
*/
public function setSubGroups(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $subGroups)
public function setSubGroups(ObjectStorage $subGroups)
{
$this->subGroups = $subGroups;
}
......
......@@ -16,11 +16,13 @@
namespace TYPO3\CMS\Extbase\Domain\Model;
use TYPO3\CMS\Extbase\Annotation as Extbase;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
/**
* This model represents a category (for anything).
*/
class Category extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
class Category extends AbstractEntity
{
/**
* @var string
......@@ -86,7 +88,7 @@ class Category extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
*/
public function getParent()
{
if ($this->parent instanceof \TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy) {
if ($this->parent instanceof LazyLoadingProxy) {
$this->parent->_loadRealInstance();
}
return $this->parent;
......
......@@ -23,7 +23,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*
* @internal experimental! This class is experimental and subject to change!
*/
class File extends \TYPO3\CMS\Extbase\Domain\Model\AbstractFileFolder
class File extends AbstractFileFolder
{
/**
* @return \TYPO3\CMS\Core\Resource\File
......
......@@ -16,13 +16,14 @@
namespace TYPO3\CMS\Extbase\Domain\Model;
use TYPO3\CMS\Extbase\Annotation as Extbase;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
/**
* This model represents a file mount.
*
* @deprecated since TYPO3 10.4, will be removed in version 11.0
*/
class FileMount extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
class FileMount extends AbstractEntity
{
public function __construct()
{
......
......@@ -16,6 +16,7 @@
namespace TYPO3\CMS\Extbase\Domain\Model;
use TYPO3\CMS\Core\Resource\ResourceFactory;
use TYPO3\CMS\Core\Resource\ResourceInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
......@@ -23,7 +24,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
*
* @internal experimental! This class is experimental and subject to change!
*/
class FileReference extends \TYPO3\CMS\Extbase\Domain\Model\AbstractFileFolder
class FileReference extends AbstractFileFolder
{
/**
* Uid of the referenced sys_file. Needed for extbase to serialize the
......@@ -36,7 +37,7 @@ class FileReference extends \TYPO3\CMS\Extbase\Domain\Model\AbstractFileFolder
/**
* @param \TYPO3\CMS\Core\Resource\ResourceInterface $originalResource
*/
public function setOriginalResource(\TYPO3\CMS\Core\Resource\ResourceInterface $originalResource)
public function setOriginalResource(ResourceInterface $originalResource)
{
$this->originalResource = $originalResource;
$this->uidLocal = (int)$originalResource->getOriginalFile()->getUid();
......
......@@ -20,6 +20,6 @@ namespace TYPO3\CMS\Extbase\Domain\Model;
*
* @internal experimental! This class is experimental and subject to change!
*/
class Folder extends \TYPO3\CMS\Extbase\Domain\Model\AbstractFileFolder
class Folder extends AbstractFileFolder
{
}
......@@ -21,6 +21,6 @@ namespace TYPO3\CMS\Extbase\Domain\Model;
* @internal experimental! This class is experimental and subject to change!
* @deprecated since TYPO3 10.4, will be removed in version 11.0
*/
class FolderBasedFileCollection extends \TYPO3\CMS\Extbase\Domain\Model\AbstractFileCollection
class FolderBasedFileCollection extends AbstractFileCollection
{
}
......@@ -15,10 +15,13 @@
namespace TYPO3\CMS\Extbase\Domain\Model;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
/**
* A Frontend User
*/
class FrontendUser extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
class FrontendUser extends AbstractEntity
{
/**
* @var string
......@@ -130,8 +133,8 @@ class FrontendUser extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
$this->username = $username;
$this->password = $password;
$this->usergroup = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->image = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->usergroup = new ObjectStorage();
$this->image = new ObjectStorage();
}
/**
......@@ -180,7 +183,7 @@ class FrontendUser extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
*
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $usergroup
*/
public function setUsergroup(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $usergroup)
public function setUsergroup(ObjectStorage $usergroup)
{
$this->usergroup = $usergroup;
}
......@@ -190,7 +193,7 @@ class FrontendUser extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
*
* @param \TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup $usergroup
*/
public function addUsergroup(\TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup $usergroup)
public function addUsergroup(FrontendUserGroup $usergroup)
{
$this->usergroup->attach($usergroup);
}
......@@ -200,7 +203,7 @@ class FrontendUser extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
*
* @param \TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup $usergroup
*/
public function removeUsergroup(\TYPO3\CMS\Extbase\Domain\Model\FrontendUserGroup $usergroup)
public function removeUsergroup(FrontendUserGroup $usergroup)
{
$this->usergroup->detach($usergroup);
}
......@@ -521,7 +524,7 @@ class FrontendUser extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
*
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $image
*/
public function setImage(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $image)
public function setImage(ObjectStorage $image)
{
$this->image = $image;
}
......
......@@ -15,10 +15,13 @@
namespace TYPO3\CMS\Extbase\Domain\Model;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
/**
* A Frontend User Group
*/
class FrontendUserGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
class FrontendUserGroup extends AbstractEntity
{
/**
* @var string
......@@ -48,7 +51,7 @@ class FrontendUserGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
public function __construct($title = '')
{
$this->setTitle($title);
$this->subgroup = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->subgroup = new ObjectStorage();
}
/**
......@@ -117,7 +120,7 @@ class FrontendUserGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
*
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $subgroup An object storage containing the subgroups to add
*/
public function setSubgroup(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $subgroup)
public function setSubgroup(ObjectStorage $subgroup)
{
$this->subgroup = $subgroup;
}
......
......@@ -21,6 +21,6 @@ namespace TYPO3\CMS\Extbase\Domain\Model;
* @internal experimental! This class is experimental and subject to change!
* @deprecated since TYPO3 10.4, will be removed in version 11.0
*/
class StaticFileCollection extends \TYPO3\CMS\Extbase\Domain\Model\AbstractFileCollection
class StaticFileCollection extends AbstractFileCollection