| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 19 | public function __construct(SchemaInterface $schema) |
||
| 20 | { |
||
| 21 | $titleSingular = $this->getInflector()->entityTitleSingular($schema->name()); |
||
| 22 | $titlePlural = $this->getInflector()->entityTitlePlural($schema->name()); |
||
| 23 | $hasFilter = $schema->hasAction(Action::FILTER); |
||
| 24 | $headers = \array_reduce($schema->attributes(), function (array $result, SchemaAttributeInterface $property) { |
||
| 25 | $result[ |
||
| 26 | $this->getInflector()->camelProperty($property->name()) |
||
| 27 | ] = $this->getInflector()->propertyTitle($property->name()); |
||
| 28 | |||
| 29 | return $result; |
||
| 30 | }, []); |
||
| 31 | |||
| 32 | parent::__construct(\compact('titleSingular', 'titlePlural', 'headers', 'hasFilter')); |
||
| 33 | } |
||
| 45 |