Skip to content

Commit

Permalink
SW-25311 - Add Upgrade.md notice
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Mar 24, 2020
1 parent fe173c9 commit b428927
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions UPGRADE-5.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,29 @@ This changelog references changes done in Shopware 5.6 patch versions.
### Changes

* Changed `\Shopware\Components\DependencyInjection\Compiler\PluginResourceCompilerPass` to work correctly with multiple plugins
* Changed `\Shopware_Controllers_Backend_AttributeData` to support translating attribute store values
* Example:
```php
$crudService->update(
's_articles_attributes',
'my_column',
'combobox',
[
'displayInBackend' => true,
'arrayStore' => [
['key' => 1, 'value' => 'Value 1'],
],
]
);
```
* Translation
```ini
[en_GB]
s_articles_attributes_my_column_options_store_1 = "Item 1 EN"

[de_DE]
s_articles_attributes_my_column_options_store_1 = "Item 1 DE"
```

## 5.6.5

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ private function translateColumns(array $columns): void
$arrayStore = json_decode($column->getArrayStore(), true);
if (!empty($arrayStore)) {
foreach ($arrayStore as &$option) {
$optionKey = sprintf('%s_options_store_%s', $key, strtolower($option['key']));
$option['value'] = $snippets->get($optionKey, $option['value'], true);
$optionKey = sprintf('%soptions_store_%s', $key, strtolower($option['key']));
$option['value'] = $snippets->get($optionKey, $option['value']);
}
unset($option);
$column->setArrayStore(json_encode($arrayStore));
Expand Down

0 comments on commit b428927

Please sign in to comment.