public function matches($expectedvalue = false) {

        $ischecked = $this->field->isChecked();

        // Any non-empty value provided means that it should be checked.
        if (!empty($expectedvalue) && $ischecked) {
            return true;
        } else if (empty($expectedvalue) && !$ischecked) {
            return true;
        }

        return false;
    }
public function matches($expectedvalue = false) {

        $ischecked = $this->field->isChecked();

        // Any non-empty value provided means that it should be checked.
        if (!empty($expectedvalue) && $ischecked) {
            return true;
        } else if (empty($expectedvalue) && !$ischecked) {
            return true;
        }

        return false;
    }
public function matches ( $ expectedvalue = false ) { $ ischecked = $ this -> field -> isChecked ( ) ; // Any non-empty value provided means that it should be checked. if ( ! empty ( $ expectedvalue ) && $ ischecked ) { return true ; } else if ( empty ( $ expectedvalue ) && ! $ ischecked ) { return true ; } return false ; }
Is it enabled?

@param string $expectedvalue Anything !empty() is considered checked.
@return bool
Is it enabled?