[Serializer] ObjectNormalizer: add missing parameters
This commit is contained in:
parent
330c09b390
commit
58ac241c1d
@ -68,14 +68,14 @@ class ObjectNormalizer extends AbstractObjectNormalizer
|
|||||||
$attributeName = lcfirst(substr($name, 2));
|
$attributeName = lcfirst(substr($name, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null !== $attributeName && $this->isAllowedAttribute($object, $attributeName)) {
|
if (null !== $attributeName && $this->isAllowedAttribute($object, $attributeName, $format, $context)) {
|
||||||
$attributes[$attributeName] = true;
|
$attributes[$attributeName] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// properties
|
// properties
|
||||||
foreach ($reflClass->getProperties(\ReflectionProperty::IS_PUBLIC) as $reflProperty) {
|
foreach ($reflClass->getProperties(\ReflectionProperty::IS_PUBLIC) as $reflProperty) {
|
||||||
if ($reflProperty->isStatic() || !$this->isAllowedAttribute($object, $reflProperty->name)) {
|
if ($reflProperty->isStatic() || !$this->isAllowedAttribute($object, $reflProperty->name, $format, $context)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user