| @@ 42-45 (lines=4) @@ | ||
| 39 | foreach ($this->fields as $field) { |
|
| 40 | $value = null; |
|
| 41 | // if name starts with a underscore, it is a custom field, not mapped to the entity |
|
| 42 | if (substr($field->getName(), 0, 1) != '_') { |
|
| 43 | // get raw value from object |
|
| 44 | $value = $accessor->getValue($this->entity, $field->getName()); |
|
| 45 | } |
|
| 46 | // if the field required an entity to be rendered, we set it |
|
| 47 | if ($field instanceof EntityFieldInterface) { |
|
| 48 | $field->setEntity($this->entity); |
|
| @@ 167-170 (lines=4) @@ | ||
| 164 | ->getPropertyAccessor(); |
|
| 165 | $value = null; |
|
| 166 | // if name starts with a underscore, it is a custom field, not mapped to the entity |
|
| 167 | if (substr($field->getName(), 0, 1) != '_') { |
|
| 168 | // get raw value from object |
|
| 169 | $value = $accessor->getValue($entity, $field->getName()); |
|
| 170 | } |
|
| 171 | if ($field instanceof EntityFieldInterface) { |
|
| 172 | $field->setEntity($entity); |
|
| 173 | } |
|