protected function _isChecked($data)
    {
        if (array_key_exists('checked', $data)) {
            return (bool)$data['checked'];
        }

        return (string)$data['val'] === (string)$data['value'];
    }
protected function _isChecked($data)
    {
        if (array_key_exists('checked', $data)) {
            return (bool)$data['checked'];
        }

        return (string)$data['val'] === (string)$data['value'];
    }
protected function _isChecked ( $ data ) { if ( array_key_exists ( 'checked' , $ data ) ) { return ( bool ) $ data [ 'checked' ] ; } return ( string ) $ data [ 'val' ] === ( string ) $ data [ 'value' ] ; }
Check whether or not the checkbox should be checked.

@param array $data Data to look at and determine checked state.
@return bool
Check whether or not the checkbox should be checked .