Conditions | 5 |
Paths | 5 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function configureFields(\ReflectionClass $class, DatagridMapper $datagridMapper): void |
||
19 | { |
||
20 | foreach ($class->getProperties() as $property) { |
||
21 | foreach ($this->getPropertyAnnotations($property) as $annotation) { |
||
22 | if ($annotation instanceof DatagridAssociationField) { |
||
23 | $datagridMapper->add( |
||
24 | $property->getName() . '.' . $annotation->field, |
||
25 | ...$annotation->getSettings() |
||
|
|||
26 | ); |
||
27 | |||
28 | continue; |
||
29 | } |
||
30 | |||
31 | if ($annotation instanceof DatagridField) { |
||
32 | $datagridMapper->add($property->getName(), ...$annotation->getSettings()); |
||
33 | } |
||
38 |