| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 23 | public function register() |
||
| 24 | { |
||
| 25 | $this->getContainer()->share('twig', function () { |
||
| 26 | $loader = new Twig_Loader_Filesystem( |
||
| 27 | $this->getContainer()->get('baseDir').'/views' |
||
| 28 | ); |
||
| 29 | |||
| 30 | return new Twig_Environment($loader, [ |
||
| 31 | 'autoescape' => false |
||
| 32 | ]); |
||
| 33 | }); |
||
| 34 | |||
| 35 | $this->getContainer()->share('paginatorBuilder', function () { |
||
| 36 | return new PaginatorBuilder( |
||
| 37 | $this->getContainer()->get('twig'), |
||
| 38 | $this->getContainer()->get('config')['pagination']['perPage'] |
||
| 39 | ); |
||
| 40 | }); |
||
| 41 | } |
||
| 42 | } |
||
| 43 |