Total Complexity | 3 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | trait GridFieldStateAware |
||
13 | { |
||
14 | /** |
||
15 | * @var GridFieldStateManagerInterface |
||
16 | */ |
||
17 | protected $stateManager; |
||
18 | |||
19 | /** |
||
20 | * @param GridFieldStateManagerInterface $manager |
||
21 | * @return self |
||
22 | */ |
||
23 | public function setStateManager(GridFieldStateManagerInterface $manager): self |
||
24 | { |
||
25 | $this->stateManager = $manager; |
||
26 | |||
27 | return $this; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Fallback on the direct Injector access, but allow a custom implementation |
||
32 | * to be applied |
||
33 | * |
||
34 | * @return GridFieldStateManagerInterface |
||
35 | */ |
||
36 | public function getStateManager(): GridFieldStateManagerInterface |
||
39 | } |
||
40 | } |
||
41 |