AdminAclManipulatorInterface.php 1.5 KB

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