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);
}
......
......@@ -125,12 +125,12 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
$this->extensionRepository->add($extension);
$this->flashMessageContainer->add(
'', $this->translate('registerkey.key_registered'), t3lib_FlashMessage::OK
'', $this->translate('registerkey.key_registered'), \TYPO3\CMS\Core\Messaging\FlashMessage::OK
);
$this->redirect('index', 'Registerkey');
} else {
$this->flashMessageContainer->add(
$this->resolveWSErrorMessage('not_register.message'), $this->resolveWSErrorMessage('not_register.title'), t3lib_FlashMessage::ERROR
$this->resolveWSErrorMessage('not_register.message'), $this->resolveWSErrorMessage('not_register.title'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
);
}
} else {
......@@ -152,7 +152,7 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
$this->flashMessageContainer->add(
$message,
$this->resolveWSErrorMessage($error . '.title'),
t3lib_FlashMessage::ERROR
\TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
);
}
......@@ -170,15 +170,15 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
$registeredExtensions = $this->terConnection->getExtensionKeysByUser($error);
if ($error) {
$this->flashMessageContainer->add(
$this->resolveWSErrorMessage($error), '', t3lib_FlashMessage::ERROR
$this->resolveWSErrorMessage($error), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
);
} elseif (!is_array($registeredExtensions)) {
$this->flashMessageContainer->add(
$this->resolveWSErrorMessage('result_empty.message'), $this->resolveWSErrorMessage('result_empty.title'), t3lib_FlashMessage::ERROR
$this->resolveWSErrorMessage('result_empty.message'), $this->resolveWSErrorMessage('result_empty.title'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
);
} elseif (empty($registeredExtensions)) {
$this->flashMessageContainer->add(
$this->resolveWSErrorMessage('nothing_found'), '', t3lib_FlashMessage::WARNING
$this->resolveWSErrorMessage('nothing_found'), '', \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING
);
} else {
......@@ -195,7 +195,7 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
// $this->flashMessageContainer->add(
// sprintf('%s already exists.', $extensionKey),
// '',
// t3lib_FlashMessage::NOTICE
// \TYPO3\CMS\Core\Messaging\FlashMessage::NOTICE
// );
$countSkipped++;
} else {
......@@ -207,7 +207,7 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
// $this->flashMessageContainer->add(
// '',
// sprintf('%s salvaged.', $extensionKey ),
// t3lib_FlashMessage::OK
// \TYPO3\CMS\Core\Messaging\FlashMessage::OK
// );
$countSalvaged++;
......@@ -215,19 +215,19 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
}
if ($countSalvaged > 0) {
$this->flashMessageContainer->add(
$this->translate('registerkey.salvage.success', array($countSalvaged)), '', t3lib_FlashMessage::OK
$this->translate('registerkey.salvage.success', array($countSalvaged)), '', \TYPO3\CMS\Core\Messaging\FlashMessage::OK
);
} elseif ($countSkipped == 1) {
$this->flashMessageContainer->add(
$this->translate('registerkey.salvage.pass1.message'), $this->translate('registerkey.salvage.pass.title'), t3lib_FlashMessage::WARNING
$this->translate('registerkey.salvage.pass1.message'), $this->translate('registerkey.salvage.pass.title'), \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING
);
} elseif ($countSkipped > 1) {
$this->flashMessageContainer->add(
$this->translate('registerkey.salvage.pass.message', array($countSkipped)), $this->translate('registerkey.salvage.pass.title'), t3lib_FlashMessage::WARNING
$this->translate('registerkey.salvage.pass.message', array($countSkipped)), $this->translate('registerkey.salvage.pass.title'), \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING
);
} else {
$this->flashMessageContainer->add(
$this->resolveWSErrorMessage('nothing_found'), '', t3lib_FlashMessage::WARNING
$this->resolveWSErrorMessage('nothing_found'), '', \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING
);
}
}
......@@ -305,7 +305,7 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
$this->view->assign('extension', $extension);
$this->view->assign('loggedIn', $this->userRepository->findCurrent());
} else {
$this->flashMessageContainer->add($this->translate('registerkey.notyourextension'), '', t3lib_FlashMessage::ERROR);
$this->flashMessageContainer->add($this->translate('registerkey.notyourextension'), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
$this->redirect('index', 'Registerkey');
}
}
......@@ -338,28 +338,28 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
if ($this->terConnection->assignExtensionKey($extension->getExtKey(), $this->frontendUser['username'], $error)) {
// Update categories
$this->extensionRepository->update($extension);
$this->flashMessageContainer->add($this->translate('registerkey.key_updated', '', t3lib_FlashMessage::OK));
$this->flashMessageContainer->add($this->translate('registerkey.key_updated', '', \TYPO3\CMS\Core\Messaging\FlashMessage::OK));
$this->redirect('index', 'Registerkey');
} else {
// TODO: Show different message by $error code
$this->flashMessageContainer->add($this->translate('registerkey.key_update_failed', '', t3lib_FlashMessage::ERROR));
$this->flashMessageContainer->add($this->translate('registerkey.key_update_failed', '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR));
}
} else {
$this->flashMessageContainer->add(
$this->resolveWSErrorMessage($error . '.message'), $this->resolveWSErrorMessage($error . '.title'), t3lib_FlashMessage::ERROR
$this->resolveWSErrorMessage($error . '.message'), $this->resolveWSErrorMessage($error . '.title'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
);
}
} else {
// Update categories
$extension = $this->updateCategories($extension, $categories);
$this->extensionRepository->update($extension);
$this->flashMessageContainer->add($this->translate('registerkey.key_updated', '', t3lib_FlashMessage::OK));
$this->flashMessageContainer->add($this->translate('registerkey.key_updated', '', \TYPO3\CMS\Core\Messaging\FlashMessage::OK));
$this->redirect('index', 'Registerkey');
}
$this->redirect('edit', 'Registerkey', NULL, array('extension' => $extension));
} else {
$this->flashMessageContainer->add($this->translate('registerkey.notyourextension', '', t3lib_FlashMessage::ERROR));
$this->flashMessageContainer->add($this->translate('registerkey.notyourextension', '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR));
$this->redirect('index', 'Registerkey');
}
}
......@@ -403,7 +403,7 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
$newUser = trim($newUser);
if ($newUser == '') {
$this->flashMessageContainer->add(
'', $this->translate('registerkey.newuserempty'), t3lib_FlashMessage::ERROR
'', $this->translate('registerkey.newuserempty'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
);
} elseif ((strtolower($extension->getFrontendUser()) == strtolower($GLOBALS['TSFE']->fe_user->user['username'])) || $this->securityRole->isAdmin()) {
......@@ -415,15 +415,15 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
if ($this->terConnection->assignExtensionKey($extension->getExtKey(), $newUser, $error)) {
$extension->setFrontendUser($newUser);
$this->extensionRepository->update($extension);
$this->flashMessageContainer->add($this->translate('registerkey.keyTransfered', array($extension->getExtKey(), $newUser)), '', t3lib_FlashMessage::OK);
$this->flashMessageContainer->add($this->translate('registerkey.keyTransfered', array($extension->getExtKey(), $newUser)), '', \TYPO3\CMS\Core\Messaging\FlashMessage::OK);
} else {
$this->flashMessageContainer->add(
$this->resolveWSErrorMessage($error), $this->translate('registerkey.transferError.title', array($extension->getExtKey())), t3lib_FlashMessage::ERROR
$this->resolveWSErrorMessage($error), $this->translate('registerkey.transferError.title', array($extension->getExtKey())), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
);
}
} else {
$this->flashMessageContainer->add(
'', $this->translate('registerkey.notyourextension'), t3lib_FlashMessage::ERROR
'', $this->translate('registerkey.notyourextension'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
);
}
......@@ -441,7 +441,7 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
if ($extension->getVersionCount() > 0) {
$this->flashMessageContainer->add(
$this->translate('registerkey.deleting_prohibited', array($extension->getExtKey())), '', t3lib_FlashMessage::ERROR
$this->translate('registerkey.deleting_prohibited', array($extension->getExtKey())), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
);
} elseif ((strtolower($extension->getFrontendUser()) == strtolower($GLOBALS['TSFE']->fe_user->user['username'])) || $this->securityRole->isAdmin()) {
......@@ -449,15 +449,15 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
if ($this->terConnection->deleteExtensionKey($extension->getExtKey())) {
$this->extensionRepository->remove($extension);
$this->flashMessageContainer->add(
'', $this->translate('registerkey.deleted', array($extension->getExtKey())), t3lib_FlashMessage::OK
'', $this->translate('registerkey.deleted', array($extension->getExtKey())), \TYPO3\CMS\Core\Messaging\FlashMessage::OK
);
} else {
$this->flashMessageContainer->add(
$this->resolveWSErrorMessage('cannotbedeleted.message', array($extension->getExtKey())), $this->resolveWSErrorMessage('cannotbedeleted.title', array($extension->getExtKey())), t3lib_FlashMessage::ERROR
$this->resolveWSErrorMessage('cannotbedeleted.message', array($extension->getExtKey())), $this->resolveWSErrorMessage('cannotbedeleted.title', array($extension->getExtKey())), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
);
}
} else {
$this->flashMessageContainer->add($this->translate('registerkey.notyourextension'), '', t3lib_FlashMessage::ERROR);
$this->flashMessageContainer->add($this->translate('registerkey.notyourextension'), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
}
$this->redirect('index', 'Registerkey');
......@@ -470,7 +470,7 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
* @param \Tx_TerFe2_Domain_Model_Extension $extension
* @dontvalidate $extension
* @return void
* @throws \Tx_Extbase_MVC_Exception_UnsupportedRequestType
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
*/
public function keepAction(Tx_TerFe2_Domain_Model_Extension $extension)
{
......@@ -490,7 +490,7 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
{
if (!$this->securityRole->isAdmin()) {
$this->flashMessageContainer->add(
$this->resolveWSErrorMessage('not_admin.message'), $this->resolveWSErrorMessage('not_admin.title'), t3lib_FlashMessage::ERROR
$this->resolveWSErrorMessage('not_admin.message'), $this->resolveWSErrorMessage('not_admin.title'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
);
$this->redirect('index');
}
......@@ -506,11 +506,11 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
$redirectToIndexAction = TRUE;
}
$this->flashMessageContainer->add(
'', $this->translate('registerkey.version_deleted', array($version->getVersionString(), $version->getExtension()->getExtKey())), t3lib_FlashMessage::OK
'', $this->translate('registerkey.version_deleted', array($version->getVersionString(), $version->getExtension()->getExtKey())), \TYPO3\CMS\Core\Messaging\FlashMessage::OK
);
} else {
$this->flashMessageContainer->add(
$this->resolveWSErrorMessage('extensioncannotbedeleted.message', array($version->getExtension()->getExtKey())), $this->resolveWSErrorMessage('extensioncannotbedeleted.title', array($version->getExtension()->getExtKey())), t3lib_FlashMessage::ERROR
$this->resolveWSErrorMessage('extensioncannotbedeleted.message', array($version->getExtension()->getExtKey())), $this->resolveWSErrorMessage('extensioncannotbedeleted.title', array($version->getExtension()->getExtKey())), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
);
}
if ($redirectToIndexAction) {
......@@ -529,13 +529,13 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
{
if (!$this->securityRole->isAdmin()) {
$this->flashMessageContainer->add(
$this->resolveWSErrorMessage('no_admin.message'), $this->resolveWSErrorMessage('no_admin.title'), t3lib_FlashMessage::ERROR
$this->resolveWSErrorMessage('no_admin.message'), $this->resolveWSErrorMessage('no_admin.title'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR
);
$this->redirect('index');
}
$this->extensionRepository->setDefaultOrderings(
array('extKey' => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING)
array('extKey' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING)
);
if (!$extensionKey) {
$this->view->assign('adminExtensions', $this->extensionRepository->findAllAdmin());
......
......@@ -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