Commit 98dc7455 authored by Andreas Wolf's avatar Andreas Wolf Committed by Thomas Löffler

[TASK] Adjust TYPO3 core classes to namespaces

Change-Id: I762f91d0247bad9c7ae4bde992ac1bdf14b2383f
Reviewed-on: https://review.typo3.org/50612Reviewed-by: Thomas Löffler's avatarThomas Löffler <loeffler@spooner-web.de>
Tested-by: Thomas Löffler's avatarThomas Löffler <loeffler@spooner-web.de>
parent e6479c24
......@@ -26,7 +26,7 @@
/**
* Cache for extension files
*/
class Tx_TerFe2_Cache_FileCache implements t3lib_Singleton
class Tx_TerFe2_Cache_FileCache implements \TYPO3\CMS\Core\SingletonInterface
{
/**
......
......@@ -26,7 +26,7 @@
/**
* Abstract controller
*/
abstract class Tx_TerFe2_Controller_AbstractController extends Tx_Extbase_MVC_Controller_ActionController
abstract class Tx_TerFe2_Controller_AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
{
/**
......@@ -78,7 +78,7 @@ abstract class Tx_TerFe2_Controller_AbstractController extends Tx_Extbase_MVC_Co
protected function translate($label, array $arguments = array())
{
$extensionKey = $this->request->getControllerExtensionKey();
return Tx_Extbase_Utility_Localization::translate($label, $extensionKey, $arguments);
return \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate($label, $extensionKey, $arguments);
}
......@@ -94,7 +94,7 @@ abstract class Tx_TerFe2_Controller_AbstractController extends Tx_Extbase_MVC_Co
* @param array $arguments Arguments to pass to the target action
* @return void
*/
protected function redirectWithMessage($message, $action, $title = '', $severity = t3lib_FlashMessage::OK,
protected function redirectWithMessage($message, $action, $title = '', $severity = \TYPO3\CMS\Core\Messaging\FlashMessage::OK,
$controller = NULL, $extension = NULL, array $arguments = NULL)
{
$this->flashMessageContainer->add($message, $title, $severity);
......@@ -133,7 +133,7 @@ abstract class Tx_TerFe2_Controller_AbstractController extends Tx_Extbase_MVC_Co
*/
protected function redirectWithError($message, $action, $controller = NULL, $extension = NULL, array $arguments = NULL)
{
$this->flashMessageContainer->add($message, '', t3lib_FlashMessage::ERROR);
$this->flashMessageContainer->add($message, '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
$this->clearPageCache($GLOBALS['TSFE']->id);
$this->redirect($action, $controller, $extension, $arguments);
}
......@@ -151,7 +151,7 @@ abstract class Tx_TerFe2_Controller_AbstractController extends Tx_Extbase_MVC_Co
*/
protected function forwardWithError($message, $action, $controller = NULL, $extension = NULL, array $arguments = NULL)
{
$this->flashMessageContainer->add($message, '', t3lib_FlashMessage::ERROR);
$this->flashMessageContainer->add($message, '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
$this->clearPageCache($GLOBALS['TSFE']->id);
$this->forward($action, $controller, $extension, $arguments);
}
......@@ -166,8 +166,8 @@ abstract class Tx_TerFe2_Controller_AbstractController extends Tx_Extbase_MVC_Co
protected function clearPageCache($pages)
{
if (!empty($pages)) {
$pages = t3lib_div::intExplode(',', $pages, TRUE);
Tx_Extbase_Utility_Cache::clearPageCache($pages);
$pages = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $pages, TRUE);
$this->cacheService->clearPageCache([$pages]);
}
}
......@@ -182,7 +182,7 @@ abstract class Tx_TerFe2_Controller_AbstractController extends Tx_Extbase_MVC_Co
*/
protected function addBaseUriIfNecessary($uri)
{
return t3lib_div::locationHeaderUrl($uri);
return \TYPO3\CMS\Core\Utility\GeneralUtility::locationHeaderUrl($uri);
}
}
......
......@@ -20,7 +20,7 @@ class Tx_TerFe2_Controller_Eid_ExtensionController
{
/**
* @var t3lib_DB
* @var \TYPO3\CMS\Core\Database\DatabaseConnection
*/
protected $databaseConnection;
......@@ -91,4 +91,4 @@ class Tx_TerFe2_Controller_Eid_ExtensionController
}
$controller = new Tx_TerFe2_Controller_Eid_ExtensionController();
$controller->dispatch(t3lib_div::_GET('action'));
$controller->dispatch(\TYPO3\CMS\Core\Utility\GeneralUtility::_GET('action'));
......@@ -65,7 +65,7 @@ class Tx_TerFe2_Controller_ExtensionController extends Tx_TerFe2_Controller_Abst
protected $session;
/**
* @var Tx_Extbase_Persistence_Manager
* @var \TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager
*/
protected $persistenceManager;
......@@ -94,7 +94,7 @@ class Tx_TerFe2_Controller_ExtensionController extends Tx_TerFe2_Controller_Abst
$this->ownerRepository = $this->objectManager->get('Tx_T3oAjaxlogin_Domain_Repository_UserRepository');
$this->providerManager = $this->objectManager->get('Tx_TerFe2_Provider_ProviderManager');
$this->session = $this->objectManager->get('Tx_TerFe2_Persistence_Session');
$this->persistenceManager = $this->objectManager->get('Tx_Extbase_Persistence_Manager');
$this->persistenceManager = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class);
// Show insecure extensions only for reviewers
$this->extensionRepository->setShowInsecure($this->securityRole->isReviewer());
......@@ -224,7 +224,7 @@ class Tx_TerFe2_Controller_ExtensionController extends Tx_TerFe2_Controller_Abst
$this->view->assign('loggedInUser', $loggedInUser);
/** @var Tx_TerFe2_Service_Documentation $documentationService */
$documentationService = t3lib_div::makeInstance('Tx_TerFe2_Service_Documentation');
$documentationService = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Tx_TerFe2_Service_Documentation');
$documentationLink = $documentationService->getDocumentationLink($extension->getExtKey(), $extension->getLastVersion()->getVersionString());
$this->view->assign('documentationLink', $documentationLink);
......@@ -236,7 +236,7 @@ class Tx_TerFe2_Controller_ExtensionController extends Tx_TerFe2_Controller_Abst
// gets all other extensions from the owner
$this->extensionRepository->setDefaultOrderings(
array(
'lastVersion.uploadDate' => Tx_Extbase_Persistence_QueryInterface::ORDER_DESCENDING
'lastVersion.uploadDate' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING
)
);
$otherExtensionsByUser = $this->extensionRepository->findAllOtherFromFrontendUser($extension, $extension->getFrontendUser());
......@@ -249,7 +249,7 @@ class Tx_TerFe2_Controller_ExtensionController extends Tx_TerFe2_Controller_Abst
// adds username
$url .= '&user_id=' . urlencode($extension->getFlattrUsername());
// adds current url
/** @var Tx_Extbase_MVC_Web_Routing_UriBuilder $uriBuilder */
/** @var \TYPO3\CMS\Backend\Routing\UriBuilder $uriBuilder */
$uriBuilder = $this->controllerContext->getUriBuilder();
$uriBuilder->setArguments(
array(
......@@ -351,7 +351,7 @@ class Tx_TerFe2_Controller_ExtensionController extends Tx_TerFe2_Controller_Abst
}
if (!empty($tag)) {
$tags = array();
$intermediateTags = t3lib_div::trimExplode(' ', $tag, TRUE);
$intermediateTags = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(' ', $tag, TRUE);
foreach ($intermediateTags as $tag) {
$tag = trim($tag, ',');
if (!empty($tag)) {
......@@ -382,7 +382,7 @@ class Tx_TerFe2_Controller_ExtensionController extends Tx_TerFe2_Controller_Abst
$this->translate('msg.extension_updated'),
'edit',
'',
t3lib_FlashMessage::OK,
\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
'Extension',
NULL,
array('extension' => $extension)
......@@ -392,7 +392,7 @@ class Tx_TerFe2_Controller_ExtensionController extends Tx_TerFe2_Controller_Abst
$this->translate('msg.extension_updated'),
'index',
'',
t3lib_FlashMessage::OK,
\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
'Registerkey'
);
}
......@@ -413,7 +413,7 @@ class Tx_TerFe2_Controller_ExtensionController extends Tx_TerFe2_Controller_Abst
'Tag "' . htmlspecialchars($tag->getTitle()) . '" was removed',
'edit',
'',
t3lib_FlashMessage::OK,
\TYPO3\CMS\Core\Messaging\FlashMessage::OK,
'Extension',
NULL,
array('extension' => $extension)
......@@ -453,7 +453,7 @@ class Tx_TerFe2_Controller_ExtensionController extends Tx_TerFe2_Controller_Abst
$version = $this->versionRepository->findOneByExtensionAndVersionString($extension, $versionString);
if (!$version) {
$this->redirectWithMessage($this->translate('msg.version_not_found'), 'show', '', t3lib_FlashMessage::ERROR, NULL, NULL, array('extension' => $extension));
$this->redirectWithMessage($this->translate('msg.version_not_found'), 'show', '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, NULL, NULL, array('extension' => $extension));
}
// Get file path
......@@ -481,14 +481,14 @@ class Tx_TerFe2_Controller_ExtensionController extends Tx_TerFe2_Controller_Abst
// Check if file exists
if (empty($fileUrl) || !Tx_TerFe2_Utility_File::fileExists($fileUrl)) {
$this->redirectWithMessage($this->translate('msg.file_not_found') . ': ' . basename($fileUrl), 'show', '', t3lib_FlashMessage::ERROR, NULL, NULL, array('extension' => $extension));
$this->redirectWithMessage($this->translate('msg.file_not_found') . ': ' . basename($fileUrl), 'show', '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, NULL, NULL, array('extension' => $extension));
}
// Check file hash of t3x packages
if ($format === 't3x') {
$fileHash = Tx_TerFe2_Utility_File::getFileHash($fileUrl);
if ($fileHash != $version->getFileHash()) {
$this->redirectWithMessage($this->translate('msg.file_hash_not_equal'), 'show', '', t3lib_FlashMessage::ERROR, NULL, NULL, array('extension' => $extension));
$this->redirectWithMessage($this->translate('msg.file_hash_not_equal'), 'show', '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, NULL, NULL, array('extension' => $extension));
}
}
......@@ -509,7 +509,7 @@ class Tx_TerFe2_Controller_ExtensionController extends Tx_TerFe2_Controller_Abst
// Send file to browser
if (!Tx_TerFe2_Utility_File::transferFile($fileUrl)) {
$this->redirectWithMessage($this->translate('msg.could_not_transfer_file'), 'show', '', t3lib_FlashMessage::ERROR, NULL, NULL, array('extension' => $extension));
$this->redirectWithMessage($this->translate('msg.could_not_transfer_file'), 'show', '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, NULL, NULL, array('extension' => $extension));
}
// Fallback
......@@ -528,7 +528,7 @@ class Tx_TerFe2_Controller_ExtensionController extends Tx_TerFe2_Controller_Abst
*/
public function uploadVersionAction(Tx_TerFe2_Domain_Model_Extension $extension, array $form = array())
{
if (!t3lib_extMgm::isLoaded('ter')) {
if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('ter')) {
$this->flashMessageContainer->add($this->translate('msq.createVersionTerNotLoaded'));
}
$this->view->assign('extension', $extension);
......@@ -563,7 +563,7 @@ class Tx_TerFe2_Controller_ExtensionController extends Tx_TerFe2_Controller_Abst
$this->forwardWithError($this->translate('msg.acceptGPL'), 'uploadVersion');
}
if (!t3lib_extMgm::isLoaded('ter')) {
if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('ter')) {
$this->forwardWithError($this->translate('msg.createVersionTerNotLoaded'), 'uploadVersion');
}
if (empty($this->frontendUser['username'])) {
......@@ -619,7 +619,7 @@ class Tx_TerFe2_Controller_ExtensionController extends Tx_TerFe2_Controller_Abst
*
* @param array $options Options for extension list
* @param array $restoreSearch Restore last search from session
* @return Tx_Extbase_Persistence_ObjectStorage Objects
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage Objects
*/
protected function getExtensions(array &$options, $restoreSearch = FALSE)
{
......@@ -633,8 +633,8 @@ class Tx_TerFe2_Controller_ExtensionController extends Tx_TerFe2_Controller_Abst
}
// Direction
$desc = Tx_Extbase_Persistence_QueryInterface::ORDER_DESCENDING;
$asc = Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING;
$desc = \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_DESCENDING;
$asc = \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING;
$direction = $desc;
if (!empty($options['direction'])) {
$direction = ($options['direction'] === 'asc' ? $asc : $desc);
......
......@@ -106,7 +106,7 @@ class Tx_TerFe2_Controller_MediaController extends Tx_TerFe2_Controller_Abstract
$extension->addMedia($newMedia);
}
$actionParameters = array('extension' => $extension);
$this->redirectWithMessage($this->translate('msg.media_created'), 'show', '', t3lib_FlashMessage::OK, 'Extension', NULL, $actionParameters);
$this->redirectWithMessage($this->translate('msg.media_created'), 'show', '', \TYPO3\CMS\Core\Messaging\FlashMessage::OK, 'Extension', NULL, $actionParameters);
}
......
......@@ -30,7 +30,7 @@ class Tx_TerFe2_Controller_ReviewController extends Tx_TerFe2_Controller_Abstrac
{
/**
* @var Tx_Extbase_Persistence_Manager
* @var \TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager
*/
protected $persistenceManager;
......@@ -42,7 +42,7 @@ class Tx_TerFe2_Controller_ReviewController extends Tx_TerFe2_Controller_Abstrac
*/
protected function initializeController()
{
$this->persistenceManager = $this->objectManager->get('Tx_Extbase_Persistence_Manager');
$this->persistenceManager = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager::class);
}
......@@ -79,17 +79,17 @@ class Tx_TerFe2_Controller_ReviewController extends Tx_TerFe2_Controller_Abstrac
$persist = TRUE;
} else {
$message = $this->translate('msg.reviewstate_not_enabled', array($versionString, $error));
$this->redirectWithMessage($message, 'show', '', t3lib_FlashMessage::ERROR, 'Extension', NULL, $actionParameters);
$this->redirectWithMessage($message, 'show', '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, 'Extension', NULL, $actionParameters);
}
}
if ($persist) {
$this->persistenceManager->persistAll();
$this->redirectWithMessage($this->translate('msg.reviewstate_enabled'), 'show', '', t3lib_FlashMessage::OK, 'Extension', NULL, $actionParameters);
$this->redirectWithMessage($this->translate('msg.reviewstate_enabled'), 'show', '', \TYPO3\CMS\Core\Messaging\FlashMessage::OK, 'Extension', NULL, $actionParameters);
}
$message = $this->translate('msg.reviewstate_not_changed');
$this->redirectWithMessage($message, 'show', '', t3lib_FlashMessage::WARNING, 'Extension', NULL, $actionParameters);
$this->redirectWithMessage($message, 'show', '', \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING, 'Extension', NULL, $actionParameters);
}
}
......
......@@ -26,7 +26,7 @@
/**
* Abstract entity
*/
class Tx_TerFe2_Domain_Model_AbstractEntity extends Tx_Extbase_DomainObject_AbstractEntity
class Tx_TerFe2_Domain_Model_AbstractEntity extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
/**
......
......@@ -26,7 +26,7 @@
/**
* Abstract value object
*/
class Tx_TerFe2_Domain_Model_AbstractValueObject extends Tx_Extbase_DomainObject_AbstractValueObject
class Tx_TerFe2_Domain_Model_AbstractValueObject extends \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject
{
/**
......
......@@ -62,14 +62,14 @@ class Tx_TerFe2_Domain_Model_Author extends Tx_TerFe2_Domain_Model_AbstractEntit
/**
* versions
* @var Tx_Extbase_Persistence_ObjectStorage<Tx_TerFe2_Domain_Model_Version>
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tx_TerFe2_Domain_Model_Version>
* @lazy
*/
protected $versions;
/**
* Frontend user
* @var Tx_Extbase_Domain_Model_FrontendUser
* @var \TYPO3\CMS\Extbase\Domain\Model\FrontendUser
*/
protected $frontendUser;
......@@ -86,11 +86,11 @@ class Tx_TerFe2_Domain_Model_Author extends Tx_TerFe2_Domain_Model_AbstractEntit
protected $authorType;
/**
* Constructor. Initializes all Tx_Extbase_Persistence_ObjectStorage instances.
* Constructor. Initializes all ObjectStorage instances.
*/
public function __construct()
{
$this->versions = new Tx_Extbase_Persistence_ObjectStorage();
$this->versions = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
}
......@@ -212,7 +212,7 @@ class Tx_TerFe2_Domain_Model_Author extends Tx_TerFe2_Domain_Model_AbstractEntit
/**
* Getter for versions
*
* @return Tx_Extbase_Persistence_ObjectStorage<Tx_TerFe2_Domain_Model_Version> versions
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tx_TerFe2_Domain_Model_Version> versions
*/
public function getVersions()
{
......@@ -246,7 +246,7 @@ class Tx_TerFe2_Domain_Model_Author extends Tx_TerFe2_Domain_Model_AbstractEntit
/**
* Getter for frontendUser
*
* @return Tx_Extbase_Domain_Model_FrontendUser
* @return \TYPO3\CMS\Extbase\Domain\Model\FrontendUser
*/
public function getFrontendUser()
{
......@@ -256,7 +256,7 @@ class Tx_TerFe2_Domain_Model_Author extends Tx_TerFe2_Domain_Model_AbstractEntit
/**
* Setter for frontendUser
*
* @param Tx_Extbase_Domain_Model_FrontendUser $frontendUser
* @param \TYPO3\CMS\Extbase\Domain\Model\FrontendUser $frontendUser
*/
public function setFrontendUser($frontendUser)
{
......
......@@ -50,7 +50,7 @@ class Tx_TerFe2_Domain_Model_Experience extends Tx_TerFe2_Domain_Model_AbstractV
/**
* Frontend user
* @var Tx_Extbase_Domain_Model_FrontendUser
* @var \TYPO3\CMS\Extbase\Domain\Model\FrontendUser
*/
protected $frontendUser;
......@@ -125,7 +125,7 @@ class Tx_TerFe2_Domain_Model_Experience extends Tx_TerFe2_Domain_Model_AbstractV
/**
* Getter for frontendUser
*
* @return Tx_Extbase_Persistence_ObjectStorage
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
*/
public function getFrontendUser()
{
......@@ -135,7 +135,7 @@ class Tx_TerFe2_Domain_Model_Experience extends Tx_TerFe2_Domain_Model_AbstractV
/**
* Setter for frontendUser
*
* @param Tx_Extbase_Persistence_ObjectStorage $frontendUser
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $frontendUser
*/
public function setFrontendUser($frontendUser)
{
......
......@@ -51,19 +51,19 @@ class Tx_TerFe2_Domain_Model_Extension extends Tx_TerFe2_Domain_Model_AbstractEn
/**
* Categories
* @var Tx_Extbase_Persistence_ObjectStorage<Tx_TerFe2_Domain_Model_Category>
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tx_TerFe2_Domain_Model_Category>
*/
protected $categories;
/**
* Tags
* @var Tx_Extbase_Persistence_ObjectStorage<Tx_TerFe2_Domain_Model_Tag>
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tx_TerFe2_Domain_Model_Tag>
*/
protected $tags;
/**
* Versions
* @var Tx_Extbase_Persistence_ObjectStorage<Tx_TerFe2_Domain_Model_Version>
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tx_TerFe2_Domain_Model_Version>
* @lazy
*/
protected $versions;
......@@ -142,13 +142,13 @@ class Tx_TerFe2_Domain_Model_Extension extends Tx_TerFe2_Domain_Model_AbstractEn
/**
* Constructor. Initializes all Tx_Extbase_Persistence_ObjectStorage instances.
* Constructor. Initializes all ObjectStorage instances.
*/
public function __construct()
{
$this->categories = new Tx_Extbase_Persistence_ObjectStorage();
$this->tags = new Tx_Extbase_Persistence_ObjectStorage();
$this->versions = new Tx_Extbase_Persistence_ObjectStorage();
$this->categories = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->tags = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->versions = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
}
......@@ -266,7 +266,7 @@ class Tx_TerFe2_Domain_Model_Extension extends Tx_TerFe2_Domain_Model_AbstractEn
/**
* Getter for categories
*
* @return Tx_Extbase_Persistence_ObjectStorage<Tx_TerFe2_Domain_Model_Category> Categories
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tx_TerFe2_Domain_Model_Category> Categories
*/
public function getCategories()
{
......@@ -322,7 +322,7 @@ class Tx_TerFe2_Domain_Model_Extension extends Tx_TerFe2_Domain_Model_AbstractEn
/**
* Getter for tags
*
* @return Tx_Extbase_Persistence_ObjectStorage<Tx_TerFe2_Domain_Model_Tag> Tags
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tx_TerFe2_Domain_Model_Tag> Tags
*/
public function getTags()
{
......@@ -357,7 +357,7 @@ class Tx_TerFe2_Domain_Model_Extension extends Tx_TerFe2_Domain_Model_AbstractEn
/**
* Getter for versions
*
* @return Tx_Extbase_Persistence_ObjectStorage<Tx_TerFe2_Domain_Model_Version> Versions
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tx_TerFe2_Domain_Model_Version> Versions
*/
public function getVersions()
{
......
......@@ -26,7 +26,7 @@
/**
* Extension manager cache entry
*/
class Tx_TerFe2_Domain_Model_ExtensionManagerCacheEntry extends Tx_Extbase_DomainObject_AbstractEntity
class Tx_TerFe2_Domain_Model_ExtensionManagerCacheEntry extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
// No attributes, getters and setters. Only required to get RAW result from respository
}
......
......@@ -206,19 +206,19 @@ class Tx_TerFe2_Domain_Model_Version extends Tx_TerFe2_Domain_Model_AbstractEnti
/**
* Media references
* @var Tx_Extbase_Persistence_ObjectStorage<Tx_TerFe2_Domain_Model_Media>
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tx_TerFe2_Domain_Model_Media>
*/
protected $media;
/**
* Experiences
* @var Tx_Extbase_Persistence_ObjectStorage<Tx_TerFe2_Domain_Model_Experience>
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tx_TerFe2_Domain_Model_Experience>
*/
protected $experiences;
/**
* Software relations
* @var Tx_Extbase_Persistence_ObjectStorage<Tx_TerFe2_Domain_Model_Relation>
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tx_TerFe2_Domain_Model_Relation>
* @lazy
*/
protected $softwareRelations;
......@@ -267,13 +267,13 @@ class Tx_TerFe2_Domain_Model_Version extends Tx_TerFe2_Domain_Model_AbstractEnti
protected $creationDate;
/**
* Constructor. Initializes all Tx_Extbase_Persistence_ObjectStorage instances.
* Constructor. Initializes all ObjectStorage instances.
*/
public function __construct()
{
$this->media = new Tx_Extbase_Persistence_ObjectStorage();
$this->experiences = new Tx_Extbase_Persistence_ObjectStorage();
$this->softwareRelations = new Tx_Extbase_Persistence_ObjectStorage();
$this->media = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->experiences = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
$this->softwareRelations = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
}
......@@ -969,10 +969,10 @@ class Tx_TerFe2_Domain_Model_Version extends Tx_TerFe2_Domain_Model_AbstractEnti
/**
* Setter for media
*
* @param Tx_Extbase_Persistence_ObjectStorage <Tx_TerFe2_Domain_Model_Media> $media media
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage <Tx_TerFe2_Domain_Model_Media> $media media
* @return void
*/
public function setMedia(Tx_Extbase_Persistence_ObjectStorage $media)
public function setMedia(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $media)
{
$this->media = $media;
}
......@@ -981,7 +981,7 @@ class Tx_TerFe2_Domain_Model_Version extends Tx_TerFe2_Domain_Model_AbstractEnti
/**
* Getter for media
*
* @return Tx_Extbase_Persistence_ObjectStorage<Tx_TerFe2_Domain_Model_Media> media
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tx_TerFe2_Domain_Model_Media> media
*/
public function getMedia()
{
......@@ -1016,10 +1016,10 @@ class Tx_TerFe2_Domain_Model_Version extends Tx_TerFe2_Domain_Model_AbstractEnti
/**
* Setter for experience
*
* @param Tx_Extbase_Persistence_ObjectStorage <Tx_TerFe2_Domain_Model_Experience> $experiences Experiences
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage <Tx_TerFe2_Domain_Model_Experience> $experiences Experiences
* @return void
*/
public function setExperiences(Tx_Extbase_Persistence_ObjectStorage $experiences)
public function setExperiences(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $experiences)
{
$this->experiences = $experiences;
}
......@@ -1028,7 +1028,7 @@ class Tx_TerFe2_Domain_Model_Version extends Tx_TerFe2_Domain_Model_AbstractEnti
/**
* Getter for experience
*
* @return Tx_Extbase_Persistence_ObjectStorage<Tx_TerFe2_Domain_Model_Experience> Experiences
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tx_TerFe2_Domain_Model_Experience> Experiences
*/
public function getExperiences()
{
......@@ -1063,10 +1063,10 @@ class Tx_TerFe2_Domain_Model_Version extends Tx_TerFe2_Domain_Model_AbstractEnti
/**
* Setter for softwareRelations
*
* @param Tx_Extbase_Persistence_ObjectStorage <Tx_TerFe2_Domain_Model_Relation> $softwareRelations Relations
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage <Tx_TerFe2_Domain_Model_Relation> $softwareRelations Relations
* @return void
*/
public function setSoftwareRelations(Tx_Extbase_Persistence_ObjectStorage $softwareRelations)
public function setSoftwareRelations(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $softwareRelations)
{
$this->softwareRelations = $softwareRelations;
}
......@@ -1075,7 +1075,7 @@ class Tx_TerFe2_Domain_Model_Version extends Tx_TerFe2_Domain_Model_AbstractEnti
/**
* Getter for softwareRelations
*
* @return Tx_Extbase_Persistence_ObjectStorage<Tx_TerFe2_Domain_Model_Relation> Relations
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Tx_TerFe2_Domain_Model_Relation> Relations
*/
public function getSoftwareRelations()
{
......@@ -1138,11 +1138,11 @@ class Tx_TerFe2_Domain_Model_Version extends Tx_TerFe2_Domain_Model_AbstractEnti
/**
* Returns all software relations which are conflicts
*
* @return Tx_Extbase_Persistence_ObjectStorage $conflicts
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $conflicts
*/
public function getConflicts()
{
$conflicts = new Tx_Extbase_Persistence_ObjectStorage();
$conflicts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
foreach ($this->getSoftwareRelations() as $softwareRelation) {
/** @var Tx_TerFe2_Domain_Model_Relation $softwareRelation */
$relationKey = $softwareRelation->getRelationKey();
......@@ -1156,11 +1156,11 @@ class Tx_TerFe2_Domain_Model_Version extends Tx_TerFe2_Domain_Model_AbstractEnti
/**
* Returns all software relations which are dependencies
*
* @return Tx_Extbase_Persistence_ObjectStorage $dependencies
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage $dependencies
*/
public function getDependencies()
{
$dependencies = new Tx_Extbase_Persistence_ObjectStorage();
$dependencies = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
foreach ($this->getSoftwareRelations() as $softwareRelation) {
/** @var Tx_TerFe2_Domain_Model_Relation $softwareRelation */
$relationKey = $softwareRelation->getRelationKey();
......
......@@ -26,7 +26,7 @@
/**
* Abstract repository
*/
abstract class Tx_TerFe2_Domain_Repository_AbstractRepository extends Tx_Extbase_Persistence_Repository
abstract class Tx_TerFe2_Domain_Repository_AbstractRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
{
/**
......@@ -35,7 +35,7 @@ abstract class Tx_TerFe2_Domain_Repository_AbstractRepository extends Tx_Extbase
* @param string $offset Offset to start with
* @param string $count Count of result
* @param array $ordering Ordering <-> Direction
* @return Tx_Extbase_Persistence_QueryInterface
* @return \TYPO3\CMS\Extbase\Persistence\QueryInterface
*/
public function createQuery($offset = 0, $count = 0, array $ordering = array())
{
......@@ -61,7 +61,7 @@ abstract class Tx_TerFe2_Domain_Repository_AbstractRepository extends Tx_Extbase
* Returns random objects from db
*
* @param integer $limit Limit of the results
* @return Tx_Extbase_Persistence_ObjectStorage Objects
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage Objects
*/
public function findRandom($limit)
{
......@@ -69,7 +69,7 @@ abstract class Tx_TerFe2_Domain_Repository_AbstractRepository extends Tx_Extbase
// Workaround for random ordering while Extbase doesn't support this
// See: http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/2010-July/005870.html
$backend = $this->objectManager->get('Tx_Extbase_Persistence_Storage_Typo3DbBackend');
$backend = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend::class);
$parameters = array();
$statementParts = $backend->parseQuery($query, $parameters);
$statementParts['orderings'][] = ' RAND()';
......@@ -86,7 +86,7 @@ abstract class Tx_TerFe2_Domain_Repository_AbstractRepository extends Tx_Extbase
* @param string $offset Offset to start with
* @param string $count Count of result
* @param string $ordering Ordering <-> Direction
* @return Tx_Extbase_Persistence_ObjectStorage Objects
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage Objects
*/
public function findAll($offset = 0, $count = 0, array $ordering = array())
{
......
......@@ -32,7 +32,7 @@ class Tx_TerFe2_Domain_Repository_AuthorRepository extends Tx_TerFe2_Domain_Repo
/**
* Returns the authors from latest extension versions
*
* @return Tx_Extbase_Persistence_ObjectStorage Author objects
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage Author objects
*/
public function findByLatestExtensionVersion()
{
......@@ -56,7 +56,7 @@ class Tx_TerFe2_Domain_Repository_AuthorRepository extends Tx_TerFe2_Domain_Repo
}
$query = $this->createQuery();
$query->setOrderings(
array('name' => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING)
array('name' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING)
);
$query->matching($query->in('uid', $uids));
......@@ -90,7 +90,7 @@ class Tx_TerFe2_Domain_Repository_AuthorRepository extends Tx_TerFe2_Domain_Repo
* Returns author with matching email, name and username
*
* @param array $authorRow
* @return array|Tx_Extbase_Persistence_QueryResultInterface
* @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
*/
public function findByAuthorData($authorRow)
{
......
......@@ -75,11 +75,11 @@ class Tx_TerFe2_Domain_Repository_ExtensionRepository extends Tx_TerFe2_Domain_R
/**
* Build basis constraint
*
* @param Tx_Extbase_Persistence_QueryInterface $query
* @param Tx_Extbase_Persistence_QOM_ConstraintInterface $constraint
* @return Tx_Extbase_Persistence_QueryInterface
* @param \TYPO3\CMS\Extbase\Persistence\QueryInterface $query
* @param \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface $constraint
* @return \TYPO3\CMS\Extbase\Persistence\QueryInterface
*/
protected function match(Tx_Extbase_Persistence_QueryInterface $query, Tx_Extbase_Persistence_QOM_ConstraintInterface $constraint)
protected function match(\TYPO3\CMS\Extbase\Persistence\QueryInterface $query, \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ConstraintInterface $constraint)
{
if ($this->showInsecure) {
$query->matching($constraint);
......@@ -99,12 +99,12 @@ class Tx_TerFe2_Domain_Repository_ExtensionRepository extends Tx_TerFe2_Domain_R
* @param int $offset
* @param int $count
* @param array $ordering
* @return array|Tx_Extbase_Persistence_QueryResultInterface
* @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
*/
public function findAll($offset = 0, $count = 0, array $ordering = array())
{
if (empty($ordering)) {
$ordering = array('lastVersion.title' => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING);
$ordering = array('lastVersion.title' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING);
}
$query = $this->createQuery($offset, $count, $ordering);
// Filter empty title
......@@ -115,7 +115,7 @@ class Tx_TerFe2_Domain_Repository_ExtensionRepository extends Tx_TerFe2_Domain_R
/**
* Returns all objects of this repository
*
* @return array|Tx_Extbase_Persistence_QueryResultInterface
* @return array|\TYPO3\CMS\Extbase\Persistence\QueryResultInterface
*/
public function findAllAdmin()
{
......@@ -141,11 +141,11 @@ class Tx_TerFe2_Domain_Repository_ExtensionRepository extends Tx_TerFe2_Domain_R
* Returns new and updated extensions