refactor: remove code outside the first-goal scope
Keeps what the product detail pages, the AJAX date/price tables, the API endpoints (/api/hotel, /api/product, /api/content/*), the chatbot content-only page type and the MyE&P import need, determined by a class and template reference closure from those entry points. Removed: search, watchlist, calendar/contingent AJAX, snow report and contingent imports, groups swiss, iCal, reseller export, team/EpTeam, newsletter, CSV feeds, BpnConnect client, backend modules and page module previews, Tcemain hooks, scheduler tasks, staging and static search middlewares, forms and their finishers, gridelements and news templates, and the plugins and content elements not used on product pages. The SFTP and local XML import sources are gone; the import reads MyE&P only (ApiImportSource as ProductImportSource) and runs as ep:import-dates. ext_tables.sql stays complete so no table or column is dropped while the TYPO3 10 project shares the data. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
a46918de9d
commit
b890a55115
331 files changed
+18
-23190
No files matched your search
@@ -1,74 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace EP\EpTheme\Form;
|
||||
|
||||
use TYPO3\CMS\Core\Site\SiteFinder;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Form\Domain\Finishers\AbstractFinisher;
|
||||
|
||||
class AddReferrerFinisher extends AbstractFinisher
|
||||
{
|
||||
protected function executeInternal()
|
||||
{
|
||||
$this->addCurrentUrlField();
|
||||
$this->addReferrerField();
|
||||
}
|
||||
|
||||
private function addReferrerField(): void
|
||||
{
|
||||
// Look for key 'referrer' in frontend session
|
||||
$referrer = $GLOBALS['TSFE']->fe_user->getKey('ses', 'referrer');
|
||||
|
||||
if (null === $referrer) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Add textfield to form containing referrer value
|
||||
$field = $this->finisherContext
|
||||
->getFormRuntime()
|
||||
->getFormDefinition()
|
||||
->getPageByIndex(0)
|
||||
->createElement('referrer', 'Text');
|
||||
|
||||
$field->setDefaultValue($referrer);
|
||||
$field->setDataType('string');
|
||||
$field->setLabel('Referrer');
|
||||
|
||||
// Add finisher variable for potential later use
|
||||
$this->finisherContext->getFinisherVariableProvider()->add(
|
||||
$this->shortFinisherIdentifier,
|
||||
'referrer',
|
||||
$referrer
|
||||
);
|
||||
|
||||
// Remove session key
|
||||
$GLOBALS['TSFE']->fe_user->setKey('ses', 'referrer', null);
|
||||
$GLOBALS['TSFE']->fe_user->storeSessionData();
|
||||
}
|
||||
|
||||
private function addCurrentUrlField(): void
|
||||
{
|
||||
// Get URL of current page
|
||||
$pageId = $GLOBALS['TSFE']->id;
|
||||
$site = GeneralUtility::makeInstance(SiteFinder::class)->getSiteByPageId($pageId);
|
||||
$url = $site->getRouter()->generateUri($pageId);
|
||||
|
||||
// Add textfield to form containing url value
|
||||
$field = $this->finisherContext
|
||||
->getFormRuntime()
|
||||
->getFormDefinition()
|
||||
->getPageByIndex(0)
|
||||
->createElement('pageurl', 'Text');
|
||||
|
||||
$field->setDefaultValue($url);
|
||||
$field->setDataType('string');
|
||||
$field->setLabel('URL');
|
||||
|
||||
// Add finisher variable for potential later use
|
||||
$this->finisherContext->getFinisherVariableProvider()->add(
|
||||
$this->shortFinisherIdentifier,
|
||||
'pageurl',
|
||||
$url
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user