| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function transformValue($value) |
||
| 16 | { |
||
| 17 | $namespace = 'field_'; |
||
| 18 | $groupName = $this->getBuilder()->getName(); |
||
| 19 | |||
| 20 | if ($groupName) { |
||
| 21 | // remove field_ or group_ if already at the begining of the key |
||
| 22 | $value = preg_replace('/^field_|^group_/', '', $value); |
||
| 23 | $namespace .= str_replace(' ', '_', $groupName).'_'; |
||
| 24 | } |
||
| 25 | return strtolower($namespace.$value); |
||
| 26 | } |
||
| 27 | } |
||
| 28 |