public function getNextrasEntityProperty(Nextras\Orm\Entity\Entity $item, $key)
{
$properties = explode('.', $key);
$value = $item;
while ($property = array_shift($properties)) {
if (!isset($value->{$property})) {
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 = $value->{$property};
}
return $value;
}