diff --git a/core/Crud/Field/Field.php b/core/Crud/Field/Field.php index 2155f84..aaac0eb 100644 --- a/core/Crud/Field/Field.php +++ b/core/Crud/Field/Field.php @@ -45,11 +45,9 @@ abstract class Field protected function getValue($entity, array $options) { - $propertyAccessor = PropertyAccess::createPropertyAccessorBuilder() - ->getPropertyAccessor() - ; - if (null !== $options['property']) { + $propertyAccessor = PropertyAccess::createPropertyAccessorBuilder()->getPropertyAccessor(); + $value = $propertyAccessor->getValue($entity, $options['property']); } elseif (null !== $options['property_builder']) { $value = call_user_func($options['property_builder'], $entity, $options);