AdminAclManipulatorInterface.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /*
  3. * This file is part of the Sonata project.
  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\Util;
  11. use Symfony\Component\Security\Acl\Model\AclInterface;
  12. use Symfony\Component\Console\Output\OutputInterface;
  13. use Sonata\AdminBundle\Admin\AdminInterface;
  14. use Sonata\AdminBundle\Security\Handler\AclSecurityHandlerInterface;
  15. interface AdminAclManipulatorInterface
  16. {
  17. /**
  18. * Batch configure the ACLs for all objects handled by an Admin
  19. *
  20. * @param \Symfony\Component\Console\Output\OutputInterface $output
  21. * @param \Sonata\AdminBundle\Admin\AdminInterface $admin
  22. *
  23. * @return void
  24. */
  25. function configureAcls(OutputInterface $output, AdminInterface $admin);
  26. /**
  27. * Add the class ACE's to the admin ACL
  28. *
  29. * @param \Symfony\Component\Console\Output\OutputInterface $output
  30. * @param \Symfony\Component\Security\Acl\Model\AclInterface $acl
  31. * @param \Sonata\AdminBundle\Security\Handler\AclSecurityHandlerInterface $securityHandler
  32. * @param array $roleInformation
  33. *
  34. * @return boolean TRUE if admin class ACEs are added, FALSE if not
  35. */
  36. function addAdminClassAces(OutputInterface $output, AclInterface $acl, AclSecurityHandlerInterface $securityHandler, array $roleInformation = array());
  37. }