| Total Complexity | 5 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | final class Activator implements ActivatorInterface |
||
| 23 | { |
||
| 24 | const KEY = 'translation_bundle.edit_in_place.enabled'; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var Session |
||
| 28 | */ |
||
| 29 | private $session; |
||
| 30 | |||
| 31 | public function __construct(Session $session) |
||
| 32 | { |
||
| 33 | $this->session = $session; |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Enable the Edit In Place mode. |
||
| 38 | */ |
||
| 39 | public function activate(): void |
||
| 40 | { |
||
| 41 | $this->session->set(self::KEY, true); |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Disable the Edit In Place mode. |
||
| 46 | */ |
||
| 47 | public function deactivate(): void |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * {@inheritdoc} |
||
| 54 | */ |
||
| 55 | public function checkRequest(Request $request = null): bool |
||
| 62 | } |
||
| 63 | } |
||
| 64 |