| 1 | <?php |
||
| 6 | trait RenderCellCollectionTrait |
||
| 7 | { |
||
| 8 | |||
| 9 | /** @var RenderCellInterface[] */ |
||
| 10 | protected $rendererList = [ |
||
| 11 | RenderCellCollectionInterface::PRIORITY_FIRST => [], |
||
| 12 | RenderCellCollectionInterface::PRIORITY_NORMAL => [], |
||
| 13 | RenderCellCollectionInterface::PRIORITY_FALLBACK => [], |
||
| 14 | ]; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Add a renderer |
||
| 18 | * |
||
| 19 | * @return $this |
||
| 20 | */ |
||
| 21 | public function addRenderer(RenderCellInterface $renderer, $priority = RenderCellCollectionInterface::PRIORITY_NORMAL) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Add a callable as a renderer |
||
| 29 | * |
||
| 30 | * @return $this |
||
| 31 | */ |
||
| 32 | public function addRendererFunction(callable $rendererFn, $priority = RenderCellCollectionInterface::PRIORITY_NORMAL) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | public function renderCell($key, $cellData, FormatterOptions $options) |
||
| 59 | } |
||
| 60 |