| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function inLoop(PluginArgument $arg) |
||
| 29 | { |
||
| 30 | $node = $arg->getNode(); |
||
| 31 | if (!$node instanceof Element) { |
||
| 32 | return; |
||
| 33 | } |
||
| 34 | |||
| 35 | $translation = $arg->getTranslation(); |
||
| 36 | // unset the last node translation then merge current one |
||
| 37 | $nodeTranslation = $this->createNodeTranslation($node, $arg->getSpec()); |
||
| 38 | $translation->unsetKeys(array_keys($this->lastNodeTranslation)); |
||
| 39 | $this->lastNodeTranslation = $nodeTranslation->getArrayCopy(); |
||
| 40 | $translation->merge($this->lastNodeTranslation); |
||
| 41 | } |
||
| 42 | } |
||
| 43 |