| Total Complexity | 4 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | final class UrlAutoConverterTwigExtension extends AbstractExtension |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * {@inheritdoc} |
||
| 21 | */ |
||
| 22 | public function getFilters() |
||
| 23 | { |
||
| 24 | return [ |
||
| 25 | new TwigFilter('converturls', [$this, 'convertLinks'], [ |
||
| 26 | 'is_safe' => ['html'], |
||
| 27 | ]), |
||
| 28 | ]; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param string $text |
||
| 33 | * @param array $options |
||
| 34 | * |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | public function convertLinks(string $text, array $options = []): string |
||
| 58 | } |
||
| 59 | } |
||
| 60 |