Skip to content
Snippets Groups Projects
Commit 6fbdf10c authored by Matthias Adrowski's avatar Matthias Adrowski
Browse files

[TASK] ECS

parent 98f2d520
No related branches found
No related tags found
1 merge request!3Feature upgrade to typo3 11
...@@ -36,7 +36,6 @@ use TYPO3\CMS\Fluid\View\StandaloneView; ...@@ -36,7 +36,6 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
* @deprecated All of this class will be removed when PageLayoutView support is dropped * @deprecated All of this class will be removed when PageLayoutView support is dropped
*/ */
class PluginRenderer implements PageLayoutViewDrawItemHookInterface { class PluginRenderer implements PageLayoutViewDrawItemHookInterface {
protected PreviewService $previewService; protected PreviewService $previewService;
public function init() { public function init() {
...@@ -62,7 +61,6 @@ class PluginRenderer implements PageLayoutViewDrawItemHookInterface { ...@@ -62,7 +61,6 @@ class PluginRenderer implements PageLayoutViewDrawItemHookInterface {
&$itemContent, &$itemContent,
array &$row array &$row
): void { ): void {
$this->init(); $this->init();
trigger_error( trigger_error(
'Using the old style of rendering backend previews is deprecated and will not longer work when TYPO3 10' 'Using the old style of rendering backend previews is deprecated and will not longer work when TYPO3 10'
......
...@@ -26,7 +26,6 @@ use TYPO3\CMS\Fluid\View\StandaloneView; ...@@ -26,7 +26,6 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
* PreviewService, to get Views while we have to duplicate previewCode * PreviewService, to get Views while we have to duplicate previewCode
*/ */
class PreviewService { class PreviewService {
public const RETURNTYPE_ARR = 'array'; public const RETURNTYPE_ARR = 'array';
public function getPluginView(array $row): StandaloneView { public function getPluginView(array $row): StandaloneView {
...@@ -45,7 +44,7 @@ class PreviewService { ...@@ -45,7 +44,7 @@ class PreviewService {
$templateData = [ $templateData = [
'vimeoId' => $this->passVDefOnKeyToTemplate($pluginConfiguration, 'settings.id'), 'vimeoId' => $this->passVDefOnKeyToTemplate($pluginConfiguration, 'settings.id'),
'maxResults' => $this->passVDefOnKeyToTemplate($pluginConfiguration, 'settings.maxResults'), 'maxResults' => $this->passVDefOnKeyToTemplate($pluginConfiguration, 'settings.maxResults'),
'showTitle' => (int) ($this->passVDefOnKeyToTemplate($pluginConfiguration, 'settings.showTitle') ?? 1), 'showTitle' => (int) ($this->passVDefOnKeyToTemplate($pluginConfiguration, 'settings.showTitle') ?? 1),
'showDescription' => (int) ($this->passVDefOnKeyToTemplate($pluginConfiguration, 'settings.showDescription') ?? 1), 'showDescription' => (int) ($this->passVDefOnKeyToTemplate($pluginConfiguration, 'settings.showDescription') ?? 1),
'disableLightbox' => $this->passVDefOnKeyToTemplate($pluginConfiguration, 'settings.disableLightbox'), 'disableLightbox' => $this->passVDefOnKeyToTemplate($pluginConfiguration, 'settings.disableLightbox'),
...@@ -68,16 +67,15 @@ class PreviewService { ...@@ -68,16 +67,15 @@ class PreviewService {
* @return array|mixed|string * @return array|mixed|string
*/ */
private function passVDefOnKeyToTemplate(array $conf, string $key, string $returnType = '') { private function passVDefOnKeyToTemplate(array $conf, string $key, string $returnType = '') {
if(isset($conf[$key])) { if (isset($conf[$key])) {
return $conf[$key]['vDEF']; return $conf[$key]['vDEF'];
} }
// check if we got a possible returntype: // check if we got a possible returntype:
if($returnType === self::RETURNTYPE_ARR) { if ($returnType === self::RETURNTYPE_ARR) {
return []; return [];
} }
return ''; return '';
} }
} }
<?php <?php
defined('TYPO3') or die(); defined('TYPO3') or die();
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
'sg_vimeo', 'sg_vimeo',
......
<?php <?php
defined('TYPO3') or die(); defined('TYPO3') or die();
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['sgvimeo_vimeo'] = 'pi_flexform'; $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['sgvimeo_vimeo'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment