| @@ 48-60 (lines=13) @@ | ||
| 45 | return $this->markupManager->getEngineByTag($tag)->parse($content); |
|
| 46 | } |
|
| 47 | ||
| 48 | public function addFilters(/*iterable*/ $filters) |
|
| 49 | { |
|
| 50 | /** @var AbstractTwigExtension|TwigFilterInterface $filter */ |
|
| 51 | foreach ($filters as $filter) |
|
| 52 | { |
|
| 53 | if (Service::hasRunTimeFlag(RuntimeStatus::IN_SAFE_MODE) && $filter::disableInSafeMode()) |
|
| 54 | { |
|
| 55 | continue; |
|
| 56 | } |
|
| 57 | ||
| 58 | $this->filters[] = $filter::get(); |
|
| 59 | } |
|
| 60 | } |
|
| 61 | ||
| 62 | public function addFunctions(/*iterable*/ $functions) |
|
| 63 | { |
|
| @@ 62-74 (lines=13) @@ | ||
| 59 | } |
|
| 60 | } |
|
| 61 | ||
| 62 | public function addFunctions(/*iterable*/ $functions) |
|
| 63 | { |
|
| 64 | /** @var AbstractTwigExtension|TwigFunctionInterface $fxn */ |
|
| 65 | foreach ($functions as $fxn) |
|
| 66 | { |
|
| 67 | if (Service::hasRunTimeFlag(RuntimeStatus::IN_SAFE_MODE) && $fxn::disableInSafeMode()) |
|
| 68 | { |
|
| 69 | continue; |
|
| 70 | } |
|
| 71 | ||
| 72 | $this->functions[] = $fxn::get(); |
|
| 73 | } |
|
| 74 | } |
|
| 75 | ||
| 76 | public function getFilters() |
|
| 77 | { |
|