src/Kunstmaan/AdminBundle/Helper/Security/Acl/Permission/PermissionAdmin.php
private function getObjectAceIndex(AclInterface $acl, $role)
    {
        $objectAces = $acl->getObjectAces();
        /* @var $ace AuditableEntryInterface */
        foreach ($objectAces as $index => $ace) {
            $securityIdentity = $ace->getSecurityIdentity();
            if ($securityIdentity instanceof RoleSecurityIdentity) {
                if ($securityIdentity->getRole() == $role) {
                    return $index;
                }
            }
        }

        return false;
    }
private function getObjectAceIndex(AclInterface $acl, $role)
    {
        $objectAces = $acl->getObjectAces();
        /* @var $ace AuditableEntryInterface */
        foreach ($objectAces as $index => $ace) {
            $securityIdentity = $ace->getSecurityIdentity();
            if ($securityIdentity instanceof RoleSecurityIdentity) {
                if ($securityIdentity->getRole() == $role) {
                    return $index;
                }
            }
        }

        return false;
    }
private function getObjectAceIndex ( AclInterface $ acl , $ role ) { $ objectAces = $ acl -> getObjectAces ( ) ; /* @var $ace AuditableEntryInterface */ foreach ( $ objectAces as $ index => $ ace ) { $ securityIdentity = $ ace -> getSecurityIdentity ( ) ; if ( $ securityIdentity instanceof RoleSecurityIdentity ) { if ( $ securityIdentity -> getRole ( ) == $ role ) { return $ index ; } } } return false ; }
Get current object ACE index for specified role.

@param AclInterface $acl  The AclInterface
@param string       $role The role

@return bool|int
Get current object ACE index for specified role .