| Total Complexity | 4 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class GridExtension extends AbstractExtension |
||
| 16 | { |
||
| 17 | public function __construct( |
||
| 18 | private GridRendererInterface $gridRenderer, |
||
| 19 | private CellRendererInterface $cellRenderer, |
||
| 20 | ) { |
||
| 21 | } |
||
| 22 | |||
| 23 | public function getFunctions(): array |
||
| 24 | { |
||
| 25 | return [ |
||
| 26 | new TwigFunction('lag_admin_grid', [$this, 'renderGrid'], ['is_safe' => ['html']]), |
||
| 27 | new TwigFunction('lag_admin_grid_cell', [$this, 'renderCell'], ['is_safe' => ['html']]), |
||
| 28 | ]; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function renderGrid(Grid $grid, Operation $operation): string |
||
| 34 | } |
||
| 35 | |||
| 36 | public function renderCell(Cell $cell): string |
||
| 39 | } |
||
| 40 | } |
||
| 41 |