RouteGeneratorInterface.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 array
  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. /**
  42. * @param AdminInterface $admin
  43. * @param string $name
  44. *
  45. * @return bool
  46. */
  47. public function hasAdminRoute(AdminInterface $admin, $name);
  48. }