AdminAclManipulatorInterface.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. * @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
  17. */
  18. interface AdminAclManipulatorInterface
  19. {
  20. /**
  21. * Batch configure the ACLs for all objects handled by an Admin.
  22. *
  23. * @param OutputInterface $output
  24. * @param AdminInterface $admin
  25. */
  26. public function configureAcls(OutputInterface $output, AdminInterface $admin);
  27. /**
  28. * Add the class ACE's to the admin ACL.
  29. *
  30. * @param OutputInterface $output
  31. * @param AclInterface $acl
  32. * @param AclSecurityHandlerInterface $securityHandler
  33. * @param array $roleInformation
  34. *
  35. * @return bool TRUE if admin class ACEs are added, FALSE if not
  36. */
  37. public function addAdminClassAces(OutputInterface $output, AclInterface $acl, AclSecurityHandlerInterface $securityHandler, array $roleInformation = array());
  38. }