Commit e0c3de82 authored by Sebastian Diez's avatar Sebastian Diez
Browse files

replaces usage of tx_em_Tools with...

replaces usage of tx_em_Tools with \TYPO3\CMS\Extensionmanager\Domain\Model\Extension and Tx_TerFe2_Utility_Category
parent fa2cdee5
Pipeline #871 failed with stages
in 117 minutes and 7 seconds
......@@ -244,9 +244,10 @@ class Tx_TerFe2_Provider_FileProvider extends Tx_TerFe2_Provider_AbstractProvide
return array();
}
$states = tx_em_Tools::getDefaultState(NULL);
$extensionModel = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
$states = $extensionModel->getDefaultState(null);
$states = array_flip($states);
$categories = tx_em_Tools::getDefaultCategory(NULL);
$categories = Tx_TerFe2_Utility_Category::getDefaultCategories(NULL);
$categories = array_flip($categories);
$extensions = array();
......
......@@ -70,7 +70,8 @@ class Tx_TerFe2_Task_ImportAllExtensionsTask extends tx_scheduler_Task
LEFT JOIN tx_terfe2_domain_model_extension ON tx_terfe2_domain_model_extension.uid = tx_terfe2_domain_model_version.extension',
'ext_key = "' . $extData['extensionkey'] . '" AND version_string = "' . $extData['version'] . '" AND tx_terfe2_domain_model_extension.deleted = 0 AND tx_terfe2_domain_model_version.deleted = 0'
);
$states = tx_em_Tools::getDefaultState(NULL);
$extensionModel = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
$states = $extensionModel->getDefaultState(null);
if ($versionRec['versionUid'] && $versionRec['state'] != $extData['state']) {
if (!array_key_exists($extData['state'], $states)) {
$extData['state'] = 'n/a';
......@@ -199,8 +200,9 @@ class Tx_TerFe2_Task_ImportAllExtensionsTask extends tx_scheduler_Task
*/
public function createVersion($extUid, $extData)
{
$states = tx_em_Tools::getDefaultState(NULL);
$categories = tx_em_Tools::getDefaultCategory(NULL);
$extensionModel = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
$states = $extensionModel->getDefaultState(null);
$categories = Tx_TerFe2_Utility_Category::getDefaultCategories(NULL);
$insertVersion = array(
'pid' => $this->pid,
......
......@@ -199,7 +199,8 @@ class Tx_TerFe2_Task_ImportExtensionsFromQueueTask extends tx_scheduler_Task
*/
public function createVersion($extUid, $extData, $crdate)
{
$states = tx_em_Tools::getDefaultState(NULL);
$extensionModel = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
$states = $extensionModel->getDefaultState(null);
$categories = Tx_TerFe2_Utility_Category::getDefaultCategories();
$folder1 = substr($extData['extensionkey'], 0, 1);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment