1 | <?php |
||
26 | class ImageTwigExtension extends AbstractImageTwigExtension { |
||
27 | |||
28 | /** |
||
29 | * Service name. |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | const SERVICE_NAME = "wbw.bootstrap.twig.extension.css.image"; |
||
34 | |||
35 | /** |
||
36 | * Encode an URI into base 64. |
||
37 | * |
||
38 | * @param string|null $uri The URI. |
||
39 | * @return string Returns the URI encoded into base 64. |
||
40 | * @throws ExceptionInterface Throws an exception if an error occurs |
||
41 | */ |
||
42 | private function base64Encode(?string $uri): string { |
||
57 | |||
58 | /** |
||
59 | * Displays a Bootstrap image "Base 64". |
||
60 | * |
||
61 | * @param array $args The arguments. |
||
62 | * @return string Returns the Bootstrap base 64 image. |
||
63 | * @throws ExceptionInterface Throws an exception if an error occurs |
||
64 | */ |
||
65 | public function bootstrapImageBase64Function(array $args = []): string { |
||
71 | |||
72 | /** |
||
73 | * Get the Twig functions. |
||
74 | * |
||
75 | * @return TwigFunction[] Returns the Twig functions. |
||
76 | */ |
||
77 | public function getFunctions(): array { |
||
83 | } |
||
84 |