47 lines
1.6 KiB
PHP
Executable File
47 lines
1.6 KiB
PHP
Executable File
<?php
|
|
|
|
/*
|
|
* This file is developed by evoWeb.
|
|
*
|
|
* It is free software; you can redistribute it and/or modify it under
|
|
* the terms of the GNU General Public License, either version 2
|
|
* of the License, or any later version.
|
|
*
|
|
* For the full copyright and license information, please read the
|
|
* LICENSE.txt file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Evoweb\EwBase\Xclass;
|
|
|
|
use TYPO3\CMS\Backend\Form\FormDataProvider\SiteTcaInline as BaseSiteTcaInline;
|
|
|
|
class SiteTcaInline extends BaseSiteTcaInline
|
|
{
|
|
/**
|
|
* Resolve inline fields
|
|
*/
|
|
public function addData(array $result): array
|
|
{
|
|
$result = $this->addInlineFirstPid($result);
|
|
foreach ($result['processedTca']['columns'] as $fieldName => $fieldConfig) {
|
|
if (!$this->isInlineField($fieldConfig)) {
|
|
continue;
|
|
}
|
|
$childTableName = $fieldConfig['config']['foreign_table'] ?? '';
|
|
if (!in_array($childTableName, ['site_errorhandling', 'site_route', 'site_base_variant'], true)) {
|
|
return $result;
|
|
}
|
|
$result['processedTca']['columns'][$fieldName]['children'] = [];
|
|
$result = $this->resolveSiteRelatedChildren($result, $fieldName);
|
|
if (!empty($result['processedTca']['columns'][$fieldName]['config']['selectorOrUniqueConfiguration'])) {
|
|
throw new \RuntimeException(
|
|
'selectorOrUniqueConfiguration not implemented in sites module',
|
|
1624313533
|
|
);
|
|
}
|
|
}
|
|
|
|
return $result;
|
|
}
|
|
}
|