Rename public directory

This commit is contained in:
Björn Fromme
2019-06-06 09:53:25 +02:00
parent 5ea4db814e
commit a299c7ccce
968 changed files with 35 additions and 35 deletions
@@ -0,0 +1,80 @@
<?php
namespace EP\EpEvents\Hooks;
/***************************************************************
*
* Copyright notice
*
* (c) 2017 Björn Fromme <[email protected]>, dreipunktnull
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use EP\EpProducts\Traits\DbConnectionTrait;
use TYPO3\CMS\Core\DataHandling\DataHandler;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use TYPO3\CMS\Extbase\Object\ObjectManager;
class Tcemain
{
use DbConnectionTrait;
/**
* @param array $fields
* @param string $table
* @param int $id
* @param DataHandler $obj
* @throws \Doctrine\DBAL\DBALException
*/
public function processDatamap_preProcessFieldArray(array &$fields, $table, $id, DataHandler $obj)
{
if ($table === 'tx_epevents_domain_model_offer') {
// Set default value for url segment
if (empty($fields['url'])) {
$fields['url'] = $fields['name'] . date('dmy');
}
// Clear realurl cache for detail page
$settings = $this->getSettings();
$detailPageUid = $settings['plugin']['tx_epevents']['settings']['offerDetailPageUid'];
if ((int) $detailPageUid > 0) {
$qb = $this->getDbConnection()->createQueryBuilder();
$qb
->delete('tx_realurl_urldata')
->where('page_id = :pageUid')
->setParameter('pageUid', $detailPageUid)
->execute()
;
}
}
}
/**
* @return array
*/
protected function getSettings()
{
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
$configurationManager = $objectManager->get(ConfigurationManagerInterface::class);
return GeneralUtility::removeDotsFromTS(
$configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT)
);
}
}