psr12 fixes for new PHP_CodeSniffer (#4795)
[openemr.git] / interface / super / rules / library / RuleCriteriaSex.php
blobbb4f652fa9404b622390b7155d2b0dbed3ef8a3a
1 <?php
3 /**
4 * interface/super/rules/controllers/edit/helper/common.php
6 * @package OpenEMR
7 * @link https://www.open-emr.org
8 * @author Aron Racho <aron@mi-squared.com>
9 * @author Brady Miller <brady.g.miller@gmail.com>
10 * @copyright Copyright (c) 2010-2011 Aron Racho <aron@mi-squared.com>
11 * @copyright Copyright (c) 2019 Brady Miller <brady.g.miller@gmail.com>
12 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
15 /**
16 * Description of RuleCriteriaSex
18 * @author aron
20 class RuleCriteriaSex extends RuleCriteria
22 var $value;
24 function __construct($value)
26 $this->value = $value;
29 function getRequirements()
31 return xl_list_label($this->value);
34 function getTitle()
36 return xl("Sex");
39 function getView()
41 return "sex.php";
44 function getOptions()
46 return getListOptionsArray('sex');
49 function getDbView()
51 $dbView = parent::getDbView();
53 $dbView->method = "sex";
54 $dbView->methodDetail = "";
55 $dbView->value = $this->value;
56 return $dbView;
59 function updateFromRequest()
61 parent::updateFromRequest();
63 $sex = _post("fld_sex");
64 $this->value = $sex;