Commit 3520ed4f authored by Matthias Adrowski's avatar Matthias Adrowski
Browse files

[TASK] ECS Update + run

parent 110ed442
......@@ -163,10 +163,9 @@ class PluginController extends AbstractPlugin {
$content = $exception->getMessage();
}
if(isset($this->pluginConfiguration['classPrefix'] )) {
if (isset($this->pluginConfiguration['classPrefix'])) {
$this->prefixId = $this->pluginConfiguration['classPrefix'] . 'plugin1';
}
else {
} else {
$this->prefixId = 'plugin1';
}
return $this->pi_wrapInBaseClass($content);
......
......@@ -33,7 +33,6 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
* @package SGalinski\DfTabs\Hooks\PageLayoutView
*/
class PluginRenderer implements \TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface {
protected PreviewService $previewService;
public function init() {
......
......@@ -31,7 +31,6 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
*
*/
class PreviewRenderer implements PreviewRendererInterface {
public const RETURNTYPE_ARR = 'array';
/**
......
......@@ -27,7 +27,6 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
* small helper class, aslong as we use PageLayout hook + Previewrenderer....
*/
class PreviewService {
public const RETURNTYPE_ARR = 'array';
public function getPluginView(array $row): StandaloneView {
......@@ -73,7 +72,7 @@ class PreviewService {
];
}
$titles = GeneralUtility::trimExplode("\n",$this->passVDefOnKeyToTemplate($pluginConfiguration, 'titles'));
$titles = GeneralUtility::trimExplode("\n", $this->passVDefOnKeyToTemplate($pluginConfiguration, 'titles'));
// Remove first item if it is empty to mimic what is actually saved to the DB and frontend behaviour.
// This gets done automatically on a second save of the plugin anyways but it should happen every time.
if ($titles[0] === '') {
......@@ -101,16 +100,15 @@ class PreviewService {
* @return array|mixed|string
*/
private function passVDefOnKeyToTemplate(array $conf, string $key, string $returnType = '') {
if(isset($conf[$key])) {
if (isset($conf[$key])) {
return $conf[$key]['vDEF'];
}
// check if we got a possible returntype:
if($returnType === self::RETURNTYPE_ARR) {
if ($returnType === self::RETURNTYPE_ARR) {
return [];
}
return '';
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment