Skip to content

Commit

Permalink
TASK: Avoid dupliacate entry
Browse files Browse the repository at this point in the history
Resolves: #3243
  • Loading branch information
sabbelasichon committed Jan 23, 2024
1 parent e6c925f commit 93c71df
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,16 @@ protected function refactorColumn(?DOMElement $configElement): void
if ($renderModeDomElement instanceof DOMElement) {
$renderMode = $renderModeDomElement->nodeValue;
switch ($renderMode) {
case 'tree':
case 'tree' :
$renderTypeName = 'selectTree';
break;
case 'singlebox':
case 'singlebox' :
$renderTypeName = 'selectSingleBox';
break;
case 'checkbox':
case 'checkbox' :
$renderTypeName = 'selectCheckBox';
break;
default:
default :
$renderTypeName = null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,34 +53,34 @@ public function change(string $condition): ?string
}

switch ($type) {
case 'TSFE':
case 'TSFE' :
$conditions[$key][] = $this->refactorTsfe($property, $operator, $value);
break;
case 'GP':
case 'GP' :
$conditions[$key][] = $this->refactorGetPost($property, $operator, $value);
break;
case 'LIT':
case 'LIT' :
$conditions[$key][] = sprintf('"%s" %s "%s"', $value, self::OPERATOR_MAPPING[$operator], $property);
break;
case 'ENV':
case 'ENV' :
$conditions[$key][] = $this->createEnvCondition($property, $operator, $value);
break;
case 'IENV':
case 'IENV' :
$conditions[$key][] = $this->createIndependentCondition($property, $operator, $value);
break;
case 'BE_USER':
case 'BE_USER' :
$conditions[$key][] = $this->createBackendUserCondition($property, $operator, $value);
break;
case '_GET':
case '_GET' :
$conditions[$key][] = $this->refactorGet($property, $operator, $value);
break;
case 'GPmerged':
case 'GPmerged' :
$conditions[$key][] = $this->refactorGetPost($property, $operator, $value);
break;
case '_POST':
case '_POST' :
$conditions[$key][] = $this->refactorPost($property, $operator, $value);
break;
default:
default :
$conditions[$key][] = $condition;
break;
}
Expand Down
4 changes: 4 additions & 0 deletions src/Rector/v11/v4/MigrateFileFolderConfigurationRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ protected function refactorColumn(Expr $columnName, Expr $columnTca): void
return;
}

if ($this->hasKey($configArray, 'fileFolderConfig')) {
return;
}

$fileFolderConfig = new Array_();

$fileFolder = $this->extractArrayItemByKey($configArray, 'fileFolder');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,24 @@ return [
'fileFolder_extList' => 'svg',
'fileFolder_recursions' => 1,
]
]
],
"iconSelector" => [
"label" => "Icon auswählen",
"description" => "",
"config" => [
"type" => "select",
"items" => [["", ""]],
"renderType" => "selectSingle",
"fileFolder" => "EXT:site_package/Modules/GlobalTemplates/Assets/icons/selectable_icons_be/",
"fileFolder_extList" => "svg",
"fileFolder_recursions" => 0,
"fieldWizard" => [
"selectIcons" => [
"disabled" => false,
],
],
],
],
],
];

Expand All @@ -34,7 +51,22 @@ return [
'renderType' => 'selectSingle',
'fileFolderConfig' => ['folder' => 'EXT:my_ext/Resources/Public/Icons', 'allowedExtensions' => 'svg', 'depth' => 1],
]
]
],
"iconSelector" => [
"label" => "Icon auswählen",
"description" => "",
"config" => [
"type" => "select",
"items" => [["", ""]],
"renderType" => "selectSingle",
"fieldWizard" => [
"selectIcons" => [
"disabled" => false,
],
],
'fileFolderConfig' => ['folder' => "EXT:site_package/Modules/GlobalTemplates/Assets/icons/selectable_icons_be/", 'allowedExtensions' => "svg", 'depth' => 0],
],
],
],
];

Expand Down

0 comments on commit 93c71df

Please sign in to comment.