Remove vendored-in doctrine dbal

This commit is contained in:
Björn Fromme
2018-09-29 14:36:44 +02:00
parent eaf8804e46
commit 2106ad85d5
23 changed files with 403 additions and 308 deletions
@@ -27,20 +27,21 @@ namespace EP\EpTheme\DataProcessing;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use EP\EpProducts\Utility\DbUtility;
use EP\EpProducts\Traits\DbConnectionTrait;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface;
class ContextProcessor implements DataProcessorInterface
{
use DbConnectionTrait;
/**
* @param ContentObjectRenderer $cObj
* @param array $contentObjectConfiguration
* @param array $processorConfiguration
* @param array $processedData
*
* @return array
* @throws \Doctrine\DBAL\DBALException
*/
public function process(
ContentObjectRenderer $cObj,
@@ -65,10 +66,12 @@ class ContextProcessor implements DataProcessorInterface
* @param int $uid
* @param string $table
* @return array
* @throws \Doctrine\DBAL\DBALException
*/
private function getContextRecord($uid, $table)
{
$qb = DbUtility::getDbConnection()->createQueryBuilder();
$qb = $this->getDbConnection()->createQueryBuilder();
$query = $qb
->select('*')
->from($table)
@@ -80,4 +83,5 @@ class ContextProcessor implements DataProcessorInterface
return $query->execute()->fetch();
}
}
@@ -27,7 +27,7 @@ namespace EP\EpTheme\DataProcessing;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use EP\EpProducts\Utility\DbUtility;
use EP\EpProducts\Traits\DbConnectionTrait;
use TYPO3\CMS\Core\Resource\FileRepository;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
@@ -35,14 +35,15 @@ use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface;
class SliderProcessor implements DataProcessorInterface
{
use DbConnectionTrait;
/**
* @param ContentObjectRenderer $cObj
* @param array $contentObjectConfiguration
* @param array $processorConfiguration
* @param array $processedData
*
* @return array
* @throws \Doctrine\DBAL\DBALException
*/
public function process(
ContentObjectRenderer $cObj,
@@ -61,7 +62,8 @@ class SliderProcessor implements DataProcessorInterface
return $processedData;
}
$qb = DbUtility::getDbConnection()->createQueryBuilder();
$qb = $this->getDbConnection()->createQueryBuilder();
$query = $qb
->select('uid', 'headline', 'subline', 'button', 'page_uid')
->from('tx_eptheme_domain_model_slide')
@@ -96,12 +98,14 @@ class SliderProcessor implements DataProcessorInterface
protected function getParentPageWithSlides()
{
$rootLine = $GLOBALS['TSFE']->sys_page->getRootLine($GLOBALS['TSFE']->id);
foreach ($rootLine as $parentPage)
{
if ((int) $parentPage['tx_eptheme_slides'] > 0) {
return (int) $parentPage['uid'];
}
}
return null;
}