| Total Complexity | 5 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | trait ControllerTrait |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @return Request|null |
||
| 17 | */ |
||
| 18 | public function getRequest() |
||
| 19 | { |
||
| 20 | return $this->container->get('request_stack')->getCurrentRequest(); |
||
| 21 | } |
||
| 22 | |||
| 23 | public function getBreadCrumb(): BreadcrumbBlockService |
||
| 24 | { |
||
| 25 | return $this->container->get('breadcrumb'); |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @return MenuFactoryInterface |
||
| 30 | */ |
||
| 31 | public function getMenuFactory() |
||
| 32 | { |
||
| 33 | return $this->container->get('knp_menu.factory'); |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param string $message |
||
| 38 | * |
||
| 39 | * @return NotFoundHttpException |
||
| 40 | */ |
||
| 41 | public function abort($message = '') |
||
| 42 | { |
||
| 43 | return new NotFoundHttpException($message); |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Translator shortcut. |
||
| 48 | * |
||
| 49 | * @param string $variable |
||
| 50 | * |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | public function trans($variable) |
||
| 59 | } |
||
| 60 | } |
||
| 61 |