<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
*/
require_once 'CRM/Contact/Form/Search/Custom/Base.php';
+
+/**
+ * Class org_civicrm_search_basic
+ */
class org_civicrm_search_basic extends CRM_Contact_Form_Search_Custom_BaseimplementsCRM_Contact_Form_Search_Interface {
protected $_query;
+ /**
+ * @param $formValues
+ */
function __construct(&$formValues) {
parent::__construct($formValues);
return;
}
+ /**
+ * @param CRM_Core_Form $form
+ */
function buildForm(&$form) {
//@todo FIXME - using the CRM_Core_DAO::VALUE_SEPARATOR creates invalid html - if you can find the form
$form->assign('elements', array('sort_name', 'contact_type', 'group', 'tag'));
}
+ /**
+ * @return CRM_Contact_DAO_Contact
+ */
function count() {
return $this->_query->searchQuery(0, 0, NULL, TRUE);
}
+ /**
+ * @param int $offset
+ * @param int $rowCount
+ * @param null $sort
+ * @param bool $includeContactIDs
+ *
+ * @return CRM_Contact_DAO_Contact
+ */
function all($offset = 0, $rowCount = 0, $sort = NULL,
$includeContactIDs = FALSE
) {
);
}
+ /**
+ * @return string
+ */
function from() {
return $this->_query->_fromClause;
}
+ /**
+ * @param bool $includeContactIDs
+ *
+ * @return string
+ */
function where($includeContactIDs = FALSE) {
if ($whereClause = $this->_query->whereClause()) {
return $whereClause;
return ' (1) ';
}
+ /**
+ * @return string
+ */
function templateFile() {
return 'CRM/Contact/Form/Search/Basic.tpl';
}