public function getDoctrineEntityProperty($item, $key)
{
$properties = explode('.', $key);
$value = $item;
$accessor = PropertyAccessHelper::getAccessor();
while ($property = array_shift($properties)) {
if (!is_object($value) && !$value) {
if ($this->datagrid->strict_entity_property) {
throw new DataGridException(sprintf('Target Property [%s] is not an object or is empty, trying to get [%s]', $value, str_replace('.', '->', $key)));
}
return NULL;
}
$value = $accessor->getValue($value, $property);
}
return $value;
}