src/Sulu/Component/Content/Repository/ContentRepository.php
private function resolvePermissions(Row $row, UserInterface $user = null)
    {
        $permissions = [];
        if (null !== $user) {
            foreach ($user->getRoleObjects() as $role) {
                foreach (array_filter(explode(' ', $row->getValue(sprintf('role%s', $role->getId())))) as $permission) {
                    $permissions[$role->getId()][$permission] = true;
                }
            }
        }

        return $permissions;
    }
private function resolvePermissions(Row $row, UserInterface $user = null)
    {
        $permissions = [];
        if (null !== $user) {
            foreach ($user->getRoleObjects() as $role) {
                foreach (array_filter(explode(' ', $row->getValue(sprintf('role%s', $role->getId())))) as $permission) {
                    $permissions[$role->getId()][$permission] = true;
                }
            }
        }

        return $permissions;
    }
private function resolvePermissions ( Row $ row , UserInterface $ user = null ) { $ permissions = [ ] ; if ( null !== $ user ) { foreach ( $ user -> getRoleObjects ( ) as $ role ) { foreach ( array_filter ( explode ( ' ' , $ row -> getValue ( sprintf ( 'role%s' , $ role -> getId ( ) ) ) ) ) as $ permission ) { $ permissions [ $ role -> getId ( ) ] [ $ permission ] = true ; } } } return $ permissions ; }
Resolves permissions for given user.

@param Row $row
@param UserInterface $user

@return array
Resolves permissions for given user .