RouteGeneratorInterface.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /*
  3. * This file is part of the Sonata package.
  4. *
  5. * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. *
  10. */
  11. namespace Sonata\AdminBundle\Route;
  12. use Sonata\AdminBundle\Admin\AdminInterface;
  13. interface RouteGeneratorInterface
  14. {
  15. /**
  16. * @param \Sonata\AdminBundle\Admin\AdminInterface $admin
  17. * @param string $name
  18. * @param array $parameters
  19. * @param bool $absolute
  20. *
  21. * @return string
  22. */
  23. public function generateUrl(AdminInterface $admin, $name, array $parameters = array(), $absolute = false);
  24. /**
  25. * @param \Sonata\AdminBundle\Admin\AdminInterface $admin
  26. * @param string $name
  27. * @param array $parameters
  28. * @param bool $absolute
  29. *
  30. * @return string
  31. */
  32. public function generateMenuUrl(AdminInterface $admin, $name, array $parameters = array(), $absolute = false);
  33. /**
  34. * @param string $name
  35. * @param array $parameters
  36. * @param bool $absolute
  37. *
  38. * @return string
  39. */
  40. public function generate($name, array $parameters = array(), $absolute = false);
  41. }