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