| 1 | <?php |
||
| 11 | class MenuExtension extends Twig_Extension |
||
| 12 | { |
||
| 13 | protected $builder; |
||
| 14 | |||
| 15 | function __construct(MenuBuilder $builder) |
||
| 19 | |||
| 20 | public function getFunctions() |
||
| 30 | |||
| 31 | public function get($machineName, $locale = null) |
||
| 35 | |||
| 36 | public function render(Twig_Environment $twig, $machineName, $locale = null) |
||
| 42 | |||
| 43 | public function getName() |
||
| 47 | } |
||
| 48 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.