Commit 38fa6f7b authored by Administrator's avatar Administrator

Make TYPO3 10 compatible

parent 60589bca
<?php
namespace MediaEssenz\Domaincheck\Controller;
namespace MEDIAESSENZ\Domaincheck\Controller;
use MediaEssenz\Domaincheck\Domain\Repository\TldRepository;
use MEDIAESSENZ\Domaincheck\Domain\Repository\TldRepository;
use TYPO3\CMS\Core\Utility\GeneralUtility;
class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
......@@ -13,14 +13,14 @@ class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControl
protected $extConf = [];
/**
* @var \MediaEssenz\Domaincheck\Domain\Repository\TldRepository
* @var \MEDIAESSENZ\Domaincheck\Domain\Repository\TldRepository
*/
protected $tldRepository;
/**
* inject the tldRepository
*
* @param \MediaEssenz\Domaincheck\Domain\Repository\TldRepository $tldRepository
* @param \MEDIAESSENZ\Domaincheck\Domain\Repository\TldRepository $tldRepository
* @return void
*/
public function injectTldRepository(TldRepository $tldRepository)
......@@ -30,7 +30,7 @@ class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControl
public function initializeAction()
{
$this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['domaincheck']);
$this->extConf = $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['domaincheck'];
parent::initializeAction();
}
......@@ -47,4 +47,4 @@ class AbstractController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControl
}
}
}
\ No newline at end of file
}
<?php
namespace MediaEssenz\Domaincheck\Controller;
namespace MEDIAESSENZ\Domaincheck\Controller;
use MediaEssenz\Domaincheck\Service\WhoisService;
use MEDIAESSENZ\Domaincheck\Utility\WhoisUtility;
use TYPO3\CMS\Extbase\Mvc\View\JsonView;
use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
use HDNET\Autoloader\Annotation\Plugin;
......@@ -10,9 +10,9 @@ use HDNET\Autoloader\Annotation\NoCache;
/**
* Class Check
* @package MediaEssenz\Domaincheck\Controller
* @package MEDIAESSENZ\Domaincheck\Controller
*/
class CheckController extends \MediaEssenz\Domaincheck\Controller\AbstractController
class CheckController extends AbstractController
{
/**
......@@ -31,11 +31,11 @@ class CheckController extends \MediaEssenz\Domaincheck\Controller\AbstractContro
$this->settings['tlds'] = implode(',', $check['tld']);
}
$tlds = $this->getTlds($this->settings['tlds']);
$whoisResponse = WhoisService::checkDomains($check['sld'], $tlds, $this->extConf);
$whoisResponse = WhoisUtility::checkDomains($check['sld'], $tlds, $this->extConf);
/** @var UriBuilder $uriBuilder */
$uriBuilder = $this->objectManager->get(UriBuilder::class);
$orderPage = $uriBuilder->setTargetPageUid($this->settings['orderPage'])->setUseCacheHash(false)->setCreateAbsoluteUri(true)->build();
$orderPage = $uriBuilder->setTargetPageUid($this->settings['orderPage'])->setCreateAbsoluteUri(true)->build();
$this->view->assign('value', [
'result' => 'OK',
......
<?php
namespace MediaEssenz\Domaincheck\Controller;
namespace MEDIAESSENZ\Domaincheck\Controller;
use HDNET\Autoloader\Annotation\Plugin;
use HDNET\Autoloader\Annotation\NoCache;
class SearchController extends \MediaEssenz\Domaincheck\Controller\AbstractController
class SearchController extends \MEDIAESSENZ\Domaincheck\Controller\AbstractController
{
/**
* @Plugin(value="Check")
......
<?php
namespace MediaEssenz\Domaincheck\Domain\Model;
namespace MEDIAESSENZ\Domaincheck\Domain\Model;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
/**
* Class Tld
* @package MediaEssenz\Domaincheck\Domain\Model
* @package MEDIAESSENZ\Domaincheck\Domain\Model
* @db
*/
class Tld extends AbstractEntity
......@@ -24,7 +24,7 @@ class Tld extends AbstractEntity
protected $regexCheck;
/**
* @var \MediaEssenz\Domaincheck\Domain\Model\Whois
* @var \MEDIAESSENZ\Domaincheck\Domain\Model\Whois
* @db
*/
protected $whois;
......@@ -74,7 +74,7 @@ class Tld extends AbstractEntity
}
/**
* @param \MediaEssenz\Domaincheck\Domain\Model\Whois $whois
* @param \MEDIAESSENZ\Domaincheck\Domain\Model\Whois $whois
* @return Tld
*/
public function setWhois($whois)
......@@ -82,4 +82,4 @@ class Tld extends AbstractEntity
$this->whois = $whois;
return $this;
}
}
\ No newline at end of file
}
<?php
namespace MediaEssenz\Domaincheck\Domain\Model;
namespace MEDIAESSENZ\Domaincheck\Domain\Model;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
/**
* Class Whois
* @package MediaEssenz\Domaincheck\Domain\Model
* @package MEDIAESSENZ\Domaincheck\Domain\Model
* @db
*/
class Whois extends AbstractEntity
......@@ -130,4 +130,4 @@ class Whois extends AbstractEntity
$this->regexInvalid = $regexInvalid;
return $this;
}
}
\ No newline at end of file
}
<?php
namespace MediaEssenz\Domaincheck\Domain\Repository;
namespace MEDIAESSENZ\Domaincheck\Domain\Repository;
use TYPO3\CMS\Extbase\Persistence\Repository;
......
<?php
namespace MediaEssenz\Domaincheck\Domain\Repository;
namespace MEDIAESSENZ\Domaincheck\Domain\Repository;
use TYPO3\CMS\Extbase\Persistence\Repository;
......
<?php
namespace MediaEssenz\Domaincheck\Utility;
namespace MEDIAESSENZ\Domaincheck\Utility;
class CheckUtility
{
......@@ -29,4 +29,4 @@ class CheckUtility
}
}
\ No newline at end of file
}
<?php
namespace MediaEssenz\Domaincheck\Service;
namespace MEDIAESSENZ\Domaincheck\Utility;
use MediaEssenz\Domaincheck\Domain\Model\Tld;
use MediaEssenz\Domaincheck\Utility\CheckUtility;
use MEDIAESSENZ\Domaincheck\Domain\Model\Tld;
class WhoisService
class WhoisUtility
{
/**
......
<?php
/**
* Base TCA generation for the model MediaEssenz\\Domaincheck\\Domain\\Model\\Tld
* Base TCA generation for the model MEDIAESSENZ\\Domaincheck\\Domain\\Model\\Tld
*/
$base = \HDNET\Autoloader\Utility\ModelUtility::getTcaInformation('MediaEssenz\\Domaincheck\\Domain\\Model\\Tld');
$base = \HDNET\Autoloader\Utility\ModelUtility::getTcaInformation('MEDIAESSENZ\\Domaincheck\\Domain\\Model\\Tld');
$custom = [
'ctrl' => [
......@@ -37,4 +37,4 @@ $custom = [
],
];
return \HDNET\Autoloader\Utility\ArrayUtility::mergeRecursiveDistinct($base, $custom);
\ No newline at end of file
return \HDNET\Autoloader\Utility\ArrayUtility::mergeRecursiveDistinct($base, $custom);
<?php
/**
* Base TCA generation for the model MediaEssenz\\Domaincheck\\Domain\\Model\\Whois
* Base TCA generation for the model MEDIAESSENZ\\Domaincheck\\Domain\\Model\\Whois
*/
$base = \HDNET\Autoloader\Utility\ModelUtility::getTcaInformation('MediaEssenz\\Domaincheck\\Domain\\Model\\Whois');
$base = \HDNET\Autoloader\Utility\ModelUtility::getTcaInformation('MEDIAESSENZ\\Domaincheck\\Domain\\Model\\Whois');
$custom = [
'ctrl' => [
......@@ -24,4 +24,4 @@ $custom = [
]
];
return \HDNET\Autoloader\Utility\ArrayUtility::mergeRecursiveDistinct($base, $custom);
\ No newline at end of file
return \HDNET\Autoloader\Utility\ArrayUtility::mergeRecursiveDistinct($base, $custom);
......@@ -16,7 +16,7 @@
},
"autoload": {
"psr-4": {
"MediaEssenz\\Domaincheck\\": "Classes/"
"MEDIAESSENZ\\Domaincheck\\": "Classes/"
}
}
}
......@@ -4,7 +4,7 @@
* Extension Manager/Repository config file for ext "domaincheck".
***************************************************************/
$EM_CONF[$_EXTKEY] = [
$EM_CONF['domaincheck'] = [
'title' => 'Domain check',
'description' => 'Frontend plugin to check domains.',
'category' => 'plugin',
......@@ -29,7 +29,7 @@ $EM_CONF[$_EXTKEY] = [
],
'autoload' => [
'psr-4' => [
'MediaEssenz\\Domaincheck\\' => 'Classes',
'MEDIAESSENZ\\Domaincheck\\' => 'Classes',
],
],
];
......@@ -4,7 +4,7 @@ defined('TYPO3_MODE') or die();
/*
* Add autoloader
*/
\HDNET\Autoloader\Loader::extLocalconf('MediaEssenz', $_EXTKEY, [
\HDNET\Autoloader\Loader::extLocalconf('MEDIAESSENZ', 'domaincheck', [
'TcaFiles',
'SmartObjects',
'Plugins',
......@@ -18,5 +18,5 @@ $iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\
$iconRegistry->registerIcon(
'extension-domaincheck',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:' . $_EXTKEY . '/ext_icon.svg']
);
\ No newline at end of file
['source' => 'EXT:domaincheck/Resources/Public/Icons/Extension.svg']
);
......@@ -4,7 +4,7 @@ defined('TYPO3_MODE') or die();
/*
* Add autoloader
*/
\HDNET\Autoloader\Loader::extTables('MediaEssenz', $_EXTKEY, [
\HDNET\Autoloader\Loader::extTables('MEDIAESSENZ', 'domaincheck', [
'TcaFiles',
'SmartObjects',
'Plugins',
......@@ -15,5 +15,5 @@ defined('TYPO3_MODE') or die();
* ContentElementWizard for Check
*/
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $_EXTKEY . '/Configuration/TypoScript/ContentElementWizard.typoscript">'
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:domaincheck/Configuration/TypoScript/ContentElementWizard.typoscript">'
);
Markdown is supported
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