4 * OnsiteActivityViewCriteria.php
7 * @link https://www.open-emr.org
8 * @author Jerry Padgett <sjpadgett@gmail.com>
9 * @copyright Copyright (c) 2016-2017 Jerry Padgett <sjpadgett@gmail.com>
10 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
13 /** import supporting libraries */
14 require_once("DAO/OnsiteActivityViewCriteriaDAO.php");
17 * The OnsiteActivityViewCriteria class extends OnsiteActivityViewDAOCriteria and is used
18 * to query the database for objects and collections
21 * @package Openemr::Model
22 * @author ClassBuilder
25 class OnsiteActivityViewCriteria
extends OnsiteActivityViewCriteriaDAO
28 * GetFieldFromProp returns the DB column for a given class property
30 * If any fields that are not part of the table need to be supported
31 * by this Criteria class, they can be added inside the switch statement
34 * @see Criteria::GetFieldFromProp()
37 public function GetFieldFromProp($propname)
42 return 'my_db_column_1';
44 return 'my_db_column_2';
46 return parent::GetFieldFromProp($propname);
52 * For custom query logic, you may override OnPrepare and set the $this->_where to whatever
53 * sql code is necessary. If you choose to manually set _where then Phreeze will not touch
54 * your where clause at all and so any of the standard property names will be ignored
56 * @see Criteria::OnPrepare()
61 if ($this->MyCustomField == "special value")
63 // _where must begin with "where"
64 $this->_where = "where db_field ....";