@@ 138-143 (lines=6) @@ | ||
135 | ||
136 | } elseif ($component instanceof Forms\Container) { |
|
137 | if (($classMetadata->hasField($name) || $classMetadata->hasAssociation($name)) && $value = $classMetadata->getFieldValue($entity, $name)) { |
|
138 | if (is_object($value) && $this->isEntity($value)) { |
|
139 | $this->bindEntity($component, $value, $erase); |
|
140 | ||
141 | } else { |
|
142 | $component->setValues($value, $erase); |
|
143 | } |
|
144 | ||
145 | } else { |
|
146 | $methodName = 'get' . ucfirst($name); |
|
@@ 149-154 (lines=6) @@ | ||
146 | $methodName = 'get' . ucfirst($name); |
|
147 | ||
148 | if (method_exists($entity, $methodName) && $value = call_user_func([$entity, $methodName])) { |
|
149 | if (is_object($value) && $this->isEntity($value)) { |
|
150 | $this->bindEntity($component, $value, $erase); |
|
151 | ||
152 | } else { |
|
153 | $component->setValues($value, $erase); |
|
154 | } |
|
155 | ||
156 | } else { |
|
157 | if ($erase) { |