1 | <?php |
||
25 | class QuoteTwigExtension extends AbstractTwigExtension { |
||
26 | |||
27 | use QuoteManagerTrait; |
||
28 | |||
29 | /** |
||
30 | * Service name. |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | const SERVICE_NAME = "webeweb.core.twig.extension.quote"; |
||
35 | |||
36 | /** |
||
37 | * Constructor. |
||
38 | * |
||
39 | * @param Environment $twigEnvironment The Twig environment. |
||
40 | * @param QuoteManager $quoteManager The quote manager. |
||
41 | */ |
||
42 | public function __construct(Environment $twigEnvironment, QuoteManager $quoteManager) { |
||
46 | |||
47 | /** |
||
48 | * Get the Twig functions. |
||
49 | * |
||
50 | * @return TwigFunction[] Returns the Twig functions. |
||
51 | */ |
||
52 | public function getFunctions() { |
||
58 | |||
59 | /** |
||
60 | * Displays a quote author. |
||
61 | * |
||
62 | * @param array $args The arguments. |
||
63 | * @return string Returns the quote author. |
||
64 | */ |
||
65 | public function quoteAuthorFunction(array $args = []) { |
||
68 | |||
69 | /** |
||
70 | * Displays a quote content. |
||
71 | * |
||
72 | * @param array $args The arguments. |
||
73 | * @return string Returns the quote content. |
||
74 | */ |
||
75 | public function quoteContentFunction(array $args = []) { |
||
78 | } |
||
79 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.