1 | <?php |
||
13 | class CollectionHumanizerExtension extends AbstractHumanizerExtension |
||
14 | { |
||
15 | /** |
||
16 | * {@inheritdoc} |
||
17 | */ |
||
18 | 45 | public function getFilters() |
|
19 | 1 | { |
|
20 | 1 | return [ |
|
21 | 45 | new Twig_SimpleFilter( |
|
22 | 45 | 'oxford', |
|
23 | 31 | function ($collection, $limit = null) { |
|
24 | 3 | return CollectionHumanizer::oxford( |
|
25 | 2 | $collection, |
|
26 | 2 | $limit, |
|
27 | 3 | $this->translator->getLocale() |
|
28 | 1 | ); |
|
29 | 30 | } |
|
30 | 15 | ), |
|
31 | 15 | ]; |
|
32 | } |
||
33 | |||
34 | 15 | public function getName() |
|
38 | } |
||
39 |