*/
class CRM_Member_BAO_Query {
+ /**
+ * @return array
+ */
static function &getFields() {
$fields = CRM_Member_BAO_Membership::exportableFields();
return $fields;
/**
* if membership are involved, add the specific membership fields
*
+ * @param $query
+ *
* @return void
* @access public
*/
}
}
+ /**
+ * @param $query
+ */
static function where(&$query) {
$grouping = NULL;
foreach (array_keys($query->_params) as $id) {
}
}
+ /**
+ * @param $values
+ * @param $query
+ */
static function whereClauseSingle(&$values, &$query) {
list($name, $op, $value, $grouping, $wildcard) = $values;
switch ($name) {
}
else {
$status = implode(',', array_keys($value));
- if (count($value) > 1) {
+ if (count($value) > 0) {
$op = 'IN';
$status = "({$status})";
}
}
else {
$mType = implode(',', array_keys($value));
- if (count($value) > 1) {
+ if (count($value) > 0) {
$op = 'IN';
$mType = "({$mType})";
}
}
}
+ /**
+ * @param $name
+ * @param $mode
+ * @param $side
+ *
+ * @return null|string
+ */
static function from($name, $mode, $side) {
$from = NULL;
switch ($name) {
return $from;
}
+ /**
+ * @param $mode
+ * @param bool $includeCustomFields
+ *
+ * @return array|null
+ */
static function defaultReturnProperties($mode,
$includeCustomFields = TRUE
) {
return $properties;
}
+ /**
+ * @param $form
+ */
static function buildSearchForm(&$form) {
foreach (CRM_Member_PseudoConstant::membershipType() as $id => $Name) {
$form->_membershipType = &$form->addElement('checkbox', "member_membership_type_id[$id]", NULL, $Name);
$form->setDefaults(array('member_test' => 0));
}
+ /**
+ * @param $row
+ * @param $id
+ */
static function searchAction(&$row, $id) {}
+ /**
+ * @param $tables
+ */
static function tableNames(&$tables) {
//add membership table
if (!empty($tables['civicrm_membership_log']) || !empty($tables['civicrm_membership_status']) || CRM_Utils_Array::value('civicrm_membership_type', $tables)) {