Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed inheritance of classificationstore values in data grid. #716

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Service/GridData/DataObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public static function getData(AbstractObject $object, array $fields = null, str
}

// because the key for the classification store has not a direct getter, you have to check separately if the data is inheritable
if (str_starts_with($key, '~') && empty($data[$key])) {
if (str_starts_with($key, '~') && empty($data[$key]['value'])) {
$type = $keyParts[1];

if ($type === 'classificationstore') {
Expand Down Expand Up @@ -348,7 +348,8 @@ protected static function getInheritedData(Concrete $object, string $key, string
return [];
}

if ($inheritedValue = self::getStoreValueForObject($parent, $key, $requestedLanguage)) {
$inheritedValue = self::getStoreValueForObject($parent, $key, $requestedLanguage);
if (!empty($inheritedValue['value'])) {
return [
'parent' => $parent,
'value' => $inheritedValue,
Expand Down
Loading