public function reverseTransform($data)
    {
        $sidParts = explode(':', $data['sid']);
        if(strtoupper($sidParts[0]) == 'R') {
            /* is rolebased */
            $sid = new RoleSecurityIdentity($sidParts[1]);
        } else {
            if(3 == count($sidParts)) {
                /* has 3 sidParts */
                $class = $sidParts[2];
            } else {
                if($this->isLdapUser($sidParts[1])) {
                    /* is LDAP user*/
                    $class = 'Mapbender\LdapIntegrationBundle\Entity\LdapUser';
                } else {
                    /* is not a LDAP user*/
                    $class = 'FOM\UserBundle\Entity\User';
                }
            }
            $sid = new UserSecurityIdentity($sidParts[1], $class);
        }

        $maskBuilder = new MaskBuilder();
        foreach($data['permissions'] as $bit => $permission) {
            if(true === $permission) {
                $maskBuilder->add(1 << ($bit - 1));
            }
        }

        return array(
            'sid' => $sid,
            'mask' => $maskBuilder->get());
    }
public function reverseTransform($data)
    {
        $sidParts = explode(':', $data['sid']);
        if(strtoupper($sidParts[0]) == 'R') {
            /* is rolebased */
            $sid = new RoleSecurityIdentity($sidParts[1]);
        } else {
            if(3 == count($sidParts)) {
                /* has 3 sidParts */
                $class = $sidParts[2];
            } else {
                if($this->isLdapUser($sidParts[1])) {
                    /* is LDAP user*/
                    $class = 'Mapbender\LdapIntegrationBundle\Entity\LdapUser';
                } else {
                    /* is not a LDAP user*/
                    $class = 'FOM\UserBundle\Entity\User';
                }
            }
            $sid = new UserSecurityIdentity($sidParts[1], $class);
        }

        $maskBuilder = new MaskBuilder();
        foreach($data['permissions'] as $bit => $permission) {
            if(true === $permission) {
                $maskBuilder->add(1 << ($bit - 1));
            }
        }

        return array(
            'sid' => $sid,
            'mask' => $maskBuilder->get());
    }
public function reverseTransform ( $ data ) { $ sidParts = explode ( ':' , $ data [ 'sid' ] ) ; if ( strtoupper ( $ sidParts [ 0 ] ) == 'R' ) { /* is rolebased */ $ sid = new RoleSecurityIdentity ( $ sidParts [ 1 ] ) ; } else { if ( 3 == count ( $ sidParts ) ) { /* has 3 sidParts */ $ class = $ sidParts [ 2 ] ; } else { if ( $ this -> isLdapUser ( $ sidParts [ 1 ] ) ) { /* is LDAP user*/ $ class = 'Mapbender\LdapIntegrationBundle\Entity\LdapUser' ; } else { /* is not a LDAP user*/ $ class = 'FOM\UserBundle\Entity\User' ; } } $ sid = new UserSecurityIdentity ( $ sidParts [ 1 ] , $ class ) ; } $ maskBuilder = new MaskBuilder ( ) ; foreach ( $ data [ 'permissions' ] as $ bit => $ permission ) { if ( true === $ permission ) { $ maskBuilder -> add ( 1 << ( $ bit - 1 ) ) ; } } return array ( 'sid' => $ sid , 'mask' => $ maskBuilder -> get ( ) ) ; }
Transforms an ACEType result into an ACE

@param object $data
@return ace
Transforms an ACEType result into an ACE