public function decodeMask($mask, Tool $tool)
    {
        $decoders = $this->maskRepo->findMaskDecodersByTool($tool);
        $perms = [];

        foreach ($decoders as $decoder) {
            $perms[$decoder->getName()] = ($mask & $decoder->getValue()) ?
                true :
                false;
        }

        return $perms;
    }
public function decodeMask($mask, Tool $tool)
    {
        $decoders = $this->maskRepo->findMaskDecodersByTool($tool);
        $perms = [];

        foreach ($decoders as $decoder) {
            $perms[$decoder->getName()] = ($mask & $decoder->getValue()) ?
                true :
                false;
        }

        return $perms;
    }
public function decodeMask ( $ mask , Tool $ tool ) { $ decoders = $ this -> maskRepo -> findMaskDecodersByTool ( $ tool ) ; $ perms = [ ] ; foreach ( $ decoders as $ decoder ) { $ perms [ $ decoder -> getName ( ) ] = ( $ mask & $ decoder -> getValue ( ) ) ? true : false ; } return $ perms ; }
Returns an array containing the permission for a mask and a tool.

@param int                                    $mask
@param \Claroline\CoreBundle\Entity\Tool\Tool $tool

@return array
Returns an array containing the permission for a mask and a tool .