Remove vendored-in doctrine dbal
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user