mirror of
https://github.com/jbcr/core.git
synced 2026-03-30 04:42:25 +02:00
Don't show old fields in a set if they're removed from the definition
This commit is contained in:
committed by
Bob den Otter
parent
101d4304bb
commit
2af998d504
@@ -83,7 +83,10 @@ class SetField extends Field implements FieldInterface, FieldParentInterface, Li
|
||||
{
|
||||
$fieldsFromDefinition = $this->getFieldsFromDefinition();
|
||||
|
||||
return array_merge($fieldsFromDefinition, $this->getDefaultValue(), $this->getValue());
|
||||
// Values from the database, but not of fields that are no longer in the definition.
|
||||
$value = array_intersect_key($this->getValue(), $fieldsFromDefinition);
|
||||
|
||||
return array_merge($fieldsFromDefinition, $this->getDefaultValue(), $value);
|
||||
}
|
||||
|
||||
private function getFieldsFromDefinition(): array
|
||||
|
||||
Reference in New Issue
Block a user