AdminAclManipulatorInterface.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. * @return void
  23. */
  24. function configureAcls(OutputInterface $output, AdminInterface $admin);
  25. /**
  26. * Add the class ACE's to the admin ACL
  27. *
  28. * @param \Symfony\Component\Console\Output\OutputInterface $output
  29. * @param \Symfony\Component\Security\Acl\Model\AclInterface $acl
  30. * @param \Sonata\AdminBundle\Security\Handler\AclSecurityHandlerInterface $securityHandler
  31. * @param array $roleInformation
  32. * @return boolean TRUE if admin class ACEs are added, FALSE if not
  33. */
  34. function addAdminClassAces(OutputInterface $output, AclInterface $acl, AclSecurityHandlerInterface $securityHandler, array $roleInformation = array());
  35. }