diff --git a/composer.json b/composer.json index 9ed88b2..033867b 100644 --- a/composer.json +++ b/composer.json @@ -18,8 +18,8 @@ } ], "require":{ - "php":">=7.1", - "contao/core-bundle":"^4.4", + "php":"^7.4 || ^8.0", + "contao/core-bundle":"^4.9", "contao-estatemanager/core": "^1.0" }, "require-dev": { diff --git a/src/Resources/contao/config/config.php b/src/Resources/contao/config/config.php index 1083400..c36adfd 100644 --- a/src/Resources/contao/config/config.php +++ b/src/Resources/contao/config/config.php @@ -11,10 +11,13 @@ // ESTATEMANAGER $GLOBALS['TL_ESTATEMANAGER_ADDONS'][] = array('ContaoEstateManager\WibImport', 'AddonManager'); -if(ContaoEstateManager\WibImport\AddonManager::valid()) { +use ContaoEstateManager\WibImport\AddonManager; +use ContaoEstateManager\WibImport\WibImport; + +if(AddonManager::valid()) { // HOOKS - $GLOBALS['TL_HOOKS']['realEstateImportBeforeSync'][] = array('ContaoEstateManager\WibImport\WibImport', 'manuallyDownloadOpenImmoFile'); - $GLOBALS['TL_HOOKS']['realEstateImportBeforeCronSync'][] = array('ContaoEstateManager\WibImport\WibImport', 'downloadOpenImmoFile'); - $GLOBALS['TL_HOOKS']['realEstateImportPrePrepareRecord'][] = array('ContaoEstateManager\WibImport\WibImport', 'skipPartnerRecord'); - $GLOBALS['TL_HOOKS']['realEstateImportSaveImage'][] = array('ContaoEstateManager\WibImport\WibImport', 'downloadImage'); + $GLOBALS['TL_HOOKS']['realEstateImportBeforeSync'][] = array(WibImport::class, 'manuallyDownloadOpenImmoFile'); + $GLOBALS['TL_HOOKS']['realEstateImportBeforeCronSync'][] = array(WibImport::class, 'downloadOpenImmoFile'); + $GLOBALS['TL_HOOKS']['realEstateImportPrePrepareRecord'][] = array(WibImport::class, 'skipPartnerRecord'); + $GLOBALS['TL_HOOKS']['realEstateImportSaveImage'][] = array(WibImport::class, 'downloadImage'); }