RouteGeneratorInterface.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /*
  3. * This file is part of the Sonata Project 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. namespace Sonata\AdminBundle\Route;
  11. use Sonata\AdminBundle\Admin\AdminInterface;
  12. /**
  13. * @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
  14. */
  15. interface RouteGeneratorInterface
  16. {
  17. /**
  18. * @param AdminInterface $admin
  19. * @param string $name
  20. * @param array $parameters
  21. * @param bool $absolute
  22. *
  23. * @return string
  24. */
  25. public function generateUrl(AdminInterface $admin, $name, array $parameters = array(), $absolute = false);
  26. /**
  27. * @param AdminInterface $admin
  28. * @param string $name
  29. * @param array $parameters
  30. * @param bool $absolute
  31. *
  32. * @return array
  33. */
  34. public function generateMenuUrl(AdminInterface $admin, $name, array $parameters = array(), $absolute = false);
  35. /**
  36. * @param string $name
  37. * @param array $parameters
  38. * @param bool $absolute
  39. *
  40. * @return string
  41. */
  42. public function generate($name, array $parameters = array(), $absolute = false);
  43. /**
  44. * @param AdminInterface $admin
  45. * @param string $name
  46. *
  47. * @return bool
  48. */
  49. public function hasAdminRoute(AdminInterface $admin, $name);
  50. }