Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | public function val($field, $options = []) |
||
37 | { |
||
38 | $val = parent::val($field, $options); |
||
39 | if ($val === null) { |
||
40 | $parts = explode('.', $field); |
||
41 | $entity = $this->entity($parts); |
||
42 | |||
43 | if ($entity instanceof Data) { |
||
44 | $key = array_pop($parts); |
||
45 | $val = $entity->get($key); |
||
46 | } |
||
47 | } |
||
48 | |||
49 | return $val; |
||
50 | } |
||
51 | } |
||
52 |