Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
BooleanFilterSetting.inc.php
1 <?php
2 
17 import('lib.pkp.classes.filter.FilterSetting');
18 import('lib.pkp.classes.form.validation.FormValidatorBoolean');
19 
28  function BooleanFilterSetting($name, $displayName, $validationMessage) {
29  parent::FilterSetting($name, $displayName, $validationMessage, FORM_VALIDATOR_OPTIONAL_VALUE);
30  }
31 
32 
33  //
34  // Implement abstract template methods from FilterSetting
35  //
39  function &getCheck(&$form) {
40  $check = new FormValidatorBoolean($form, $this->getName(), $this->getValidationMessage());
41  return $check;
42  }
43 }
44 ?>
Class that describes a configurable filter setting.
BooleanFilterSetting($name, $displayName, $validationMessage)
Class that describes a configurable filter setting which must be either true or false.
Form validation check that checks if the value can be interpreted as a boolean value. An empty field is considered &#39;false&#39;, a value of &#39;1&#39; is considered &#39;true&#39;.