| Total Complexity | 3 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 7 | class MappedProperty extends AbstractProperty |
||
| 8 | { |
||
| 9 | public function __construct( |
||
| 10 | string $name, |
||
| 11 | ?string $propertyPath, |
||
| 12 | ?string $label = null, |
||
| 13 | ?string $template = '@LAGAdmin/grid/properties/mapped.html.twig', |
||
| 14 | bool $mapped = true, |
||
| 15 | bool $sortable = true, |
||
| 16 | bool $translation = false, |
||
| 17 | ?string $translationDomain = 'admin', |
||
| 18 | array $attr = [], |
||
| 19 | array $headerAttr = [], |
||
| 20 | private array $map = [], |
||
| 21 | ) { |
||
| 22 | parent::__construct( |
||
| 23 | $name, |
||
| 24 | $propertyPath, |
||
| 25 | $label, |
||
| 26 | $template, |
||
| 27 | $mapped, |
||
| 28 | $sortable, |
||
| 29 | $translation, |
||
| 30 | $translationDomain, |
||
| 31 | $attr, |
||
| 32 | $headerAttr, |
||
| 33 | ); |
||
| 34 | } |
||
| 35 | |||
| 36 | public function getMap(): array |
||
| 37 | { |
||
| 38 | return $this->map; |
||
| 39 | } |
||
| 40 | |||
| 41 | public function withMap(array $map): self |
||
| 47 | } |
||
| 48 | } |
||
| 49 |