AdminAclManipulatorInterface.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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\Util;
  11. use Sonata\AdminBundle\Admin\AdminInterface;
  12. use Sonata\AdminBundle\Security\Handler\AclSecurityHandlerInterface;
  13. use Symfony\Component\Console\Output\OutputInterface;
  14. use Symfony\Component\Security\Acl\Model\AclInterface;
  15. /**
  16. * Interface AdminAclManipulatorInterface.
  17. *
  18. * @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
  19. */
  20. interface AdminAclManipulatorInterface
  21. {
  22. /**
  23. * Batch configure the ACLs for all objects handled by an Admin.
  24. *
  25. * @param OutputInterface $output
  26. * @param AdminInterface $admin
  27. */
  28. public function configureAcls(OutputInterface $output, AdminInterface $admin);
  29. /**
  30. * Add the class ACE's to the admin ACL.
  31. *
  32. * @param OutputInterface $output
  33. * @param AclInterface $acl
  34. * @param AclSecurityHandlerInterface $securityHandler
  35. * @param array $roleInformation
  36. *
  37. * @return bool TRUE if admin class ACEs are added, FALSE if not
  38. */
  39. public function addAdminClassAces(OutputInterface $output, AclInterface $acl, AclSecurityHandlerInterface $securityHandler, array $roleInformation = array());
  40. }