RouteGeneratorInterface.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. interface RouteGeneratorInterface
  13. {
  14. /**
  15. * @param \Sonata\AdminBundle\Admin\AdminInterface $admin
  16. * @param string $name
  17. * @param array $parameters
  18. * @param bool $absolute
  19. *
  20. * @return string
  21. */
  22. public function generateUrl(AdminInterface $admin, $name, array $parameters = array(), $absolute = false);
  23. /**
  24. * @param \Sonata\AdminBundle\Admin\AdminInterface $admin
  25. * @param string $name
  26. * @param array $parameters
  27. * @param bool $absolute
  28. *
  29. * @return string
  30. */
  31. public function generateMenuUrl(AdminInterface $admin, $name, array $parameters = array(), $absolute = false);
  32. /**
  33. * @param string $name
  34. * @param array $parameters
  35. * @param bool $absolute
  36. *
  37. * @return string
  38. */
  39. public function generate($name, array $parameters = array(), $absolute = false);
  40. /**
  41. * @param AdminInterface $admin
  42. * @param string $name
  43. *
  44. * @return bool
  45. */
  46. public function hasAdminRoute(AdminInterface $admin, $name);
  47. }