Advertisement
Guest User

Untitled

a guest
May 24th, 2015
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Dav\BasicCmsBundle\Twig\Extension;
  4.  
  5. use Doctrine\ORM\EntityManager;
  6.  
  7. class WebsiteStructureExtension extends \Twig_Extension
  8. {
  9. protected $manager;
  10.  
  11. public function __construct(EntityManager $manager)
  12. {
  13. $this->manager = $manager;
  14. }
  15.  
  16. public function getFunctions()
  17. {
  18. return array(
  19. new \Twig_SimpleFunction('generateWebsiteStructure', array(
  20. $this, 'getWebsiteStructure'
  21. ))
  22. );
  23. }
  24.  
  25. public function getName()
  26. {
  27. return 'websiteStructure';
  28. }
  29.  
  30. public function getWebsiteStructure()
  31. {
  32.  
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement