public function getACL($entity, $create = true)
    {
        $acl = null;
        $oid = $this->getEntityObjectId($entity);
        try {
            $acl = $this->aclProvider->findAcl($oid);
        } catch (NotAllAclsFoundException $e) {
            $acl = $e->getPartialResult();
        } catch (AclNotFoundException $e) {
            if($create){
                $acl = $this->aclProvider->createAcl($oid);
            }
        }

        return $acl;
    }
public function getACL($entity, $create = true)
    {
        $acl = null;
        $oid = $this->getEntityObjectId($entity);
        try {
            $acl = $this->aclProvider->findAcl($oid);
        } catch (NotAllAclsFoundException $e) {
            $acl = $e->getPartialResult();
        } catch (AclNotFoundException $e) {
            if($create){
                $acl = $this->aclProvider->createAcl($oid);
            }
        }

        return $acl;
    }
public function getACL ( $ entity , $ create = true ) { $ acl = null ; $ oid = $ this -> getEntityObjectId ( $ entity ) ; try { $ acl = $ this -> aclProvider -> findAcl ( $ oid ) ; } catch ( NotAllAclsFoundException $ e ) { $ acl = $ e -> getPartialResult ( ) ; } catch ( AclNotFoundException $ e ) { if ( $ create ) { $ acl = $ this -> aclProvider -> createAcl ( $ oid ) ; } } return $ acl ; }
Get ACL object manager.

@param      $entity
@param bool $create
@return Acl | null
@throws \Exception
@throws \Symfony\Component\Security\Acl\Exception\AclAlreadyExistsException
Get ACL object manager .