}
/**
- * If the return Properties are set in a hierarchy, traverse the hierarchy to get
- * the return values
- *
- * @return void
+ * If the return Properties are set in a hierarchy, traverse the hierarchy to get the return values.
*/
public function addHierarchicalElements() {
if (empty($this->_returnProperties['location'])) {
}
/**
- * If the return Properties are set in a hierarchy, traverse the hierarchy to get
- * the return values
- *
- * @return void
+ * If the return Properties are set in a hierarchy, traverse the hierarchy to get the return values.
*/
public function addMultipleElements() {
if (empty($this->_returnProperties['website'])) {
}
/**
+ * Get where values from the parameters.
+ *
* @param string $name
- * @param $grouping
+ * @param mixed $grouping
*
- * @return null
+ * @return mixed
*/
- public function &getWhereValues($name, $grouping) {
+ public function getWhereValues($name, $grouping) {
$result = NULL;
foreach ($this->_params as $values) {
if ($values[0] == $name && $values[3] == $grouping) {
}
/**
- * @param $relative
- * @param $from
- * @param $to
+ * Fix date values.
+ *
+ * @param bool $relative
+ * @param string $from
+ * @param string $to
*/
public static function fixDateValues($relative, &$from, &$to) {
if ($relative) {
}
/**
- * @param $formValues
+ * Convert form values to array for this object.
+ *
+ * @param array $formValues
* @param int $wildcard
* @param bool $useEquals
*
}
/**
+ * Fix values from query from/to something no-one cared enough to document.
+ *
* @param int $id
- * @param $values
+ * @param array $values
* @param int $wildcard
* @param bool $useEquals
*
*
* @return array|null
*/
- public static function &fixWhereValues($id, &$values, $wildcard = 0, $useEquals = FALSE, $apiEntity = NULL) {
+ public static function fixWhereValues($id, &$values, $wildcard = 0, $useEquals = FALSE, $apiEntity = NULL) {
// skip a few search variables
static $skipWhere = NULL;
static $likeNames = NULL;
}
/**
- * @param $values
+ * Get the where clause for a single field.
+ *
+ * @param array $values
*/
public function whereClauseSingle(&$values) {
// do not process custom fields or prefixed contact ids or component params
}
/**
- * Given a list of conditions in params generate the required.
- * where clause
+ * Given a list of conditions in params generate the required where clause.
*
* @return string
*/
}
if ($this->_customQuery) {
- // Added following if condition to avoid the wrong value diplay for 'myaccount' / any UF info.
+ // Added following if condition to avoid the wrong value display for 'my account' / any UF info.
// Hope it wont affect the other part of civicrm.. if it does please remove it.
if (!empty($this->_customQuery->_where)) {
$this->_where = CRM_Utils_Array::crmArrayMerge($this->_where, $this->_customQuery->_where);
}
/**
- * @param $values
+ * Generate where clause for any parameters not already handled.
+ *
+ * @param array $values
*
* @throws Exception
*/
/**
* WHERE / QILL clause for deleted_contacts
*
- * @param $values
- *
- * @return void
+ * @param array $values
*/
public function deletedContacts($values) {
list($_, $_, $value, $grouping, $_) = $values;
* Where / qill clause for contact_type
*
* @param $values
- *
- * @return void
*/
public function contactType(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* Where / qill clause for contact_sub_type
*
* @param $values
- *
- * @return void
*/
public function contactSubType(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* Where / qill clause for groups
*
* @param $values
- *
- * @return void
*/
public function group(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* Where / qill clause for cms users
*
* @param $values
- *
- * @return void
*/
public function ufUser(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
/**
* All tag search specific.
*
- * @param $values
- *
- * @return void
+ * @param array $values
*/
public function tagSearch(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
/**
* Where / qill clause for tag
*
- * @param $values
- *
- * @return void
+ * @param array $values
*/
public function tag(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
/**
* Where/qill clause for notes
*
- * @param $values
- *
- * @return void
+ * @param array $values
*/
public function notes(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
/**
* Where / qill clause for sort_name
*
- * @param $values
- *
- * @return void
+ * @param array $values
*/
public function sortName(&$values) {
list($fieldName, $op, $value, $grouping, $wildcard) = $values;
/**
* Where / qill clause for email
*
- * @param $values
- *
- * @return void
+ * @param array $values
*/
public function email(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
/**
* Where / qill clause for phone number
*
- * @param $values
- *
- * @return void
+ * @param array $values
*/
public function phone_numeric(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
/**
* Where / qill clause for phone type/location
*
- * @param $values
- *
- * @return void
+ * @param array $values
*/
public function phone_option_group($values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
}
/**
- * Where / qill clause for street_address
+ * Where / qill clause for street_address.
*
- * @param $values
- *
- * @return void
+ * @param array $values
*/
public function street_address(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
}
/**
- * Where / qill clause for street_unit
- *
- * @param $values
+ * Where / qill clause for street_unit.
*
- * @return void
+ * @param array $values
*/
public function street_number(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
}
/**
- * Where / qill clause for sorting by character
- *
- * @param $values
+ * Where / qill clause for sorting by character.
*
- * @return void
+ * @param array $values
*/
public function sortByCharacter(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
}
/**
- * Where / qill clause for including contact ids
- *
- * @return void
+ * Where / qill clause for including contact ids.
*/
public function includeContactIDs() {
if (!$this->_includeContactIds || empty($this->_params)) {
}
/**
- * Where / qill clause for postal code
- *
- * @param $values
+ * Where / qill clause for postal code.
*
- * @return void
+ * @param array $values
*/
public function postalCode(&$values) {
// skip if the fields dont have anything to do with postal_code
}
/**
- * Where / qill clause for location type
+ * Where / qill clause for location type.
*
- * @param $values
+ * @param array $values
* @param null $status
*
- * @return void
+ * @return string
*/
public function locationType(&$values, $status = NULL) {
list($name, $op, $value, $grouping, $wildcard) = $values;
}
/**
- * Where / qill clause for county (if present)
+ * Where / qill clause for county (if present).
*
- * @param $values
+ * @param array $values
* @param null $status
*
- * @return void
+ * @return string
*/
public function county(&$values, $status = NULL) {
list($name, $op, $value, $grouping, $wildcard) = $values;
}
/**
- * Where / qill clause for state/province AND country (if present)
+ * Where / qill clause for state/province AND country (if present).
*
- * @param $values
+ * @param array $values
* @param null $status
*
- * @return void
+ * @return string
*/
public function stateProvince(&$values, $status = NULL) {
list($name, $op, $value, $grouping, $wildcard) = $values;
}
/**
- * Where / qill clause for change log
- *
- * @param $values
+ * Where / qill clause for change log.
*
- * @return void
+ * @param array $values
*/
public function changeLog(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
}
/**
- * Where / qill clause for relationship
- *
- * @param $values
+ * Where / qill clause for relationship.
*
- * @return void
+ * @param array $values
*/
public function relationship(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
}
/**
- * @param $values
+ * Build query for a date field.
+ *
+ * @param array $values
* @param string $tableName
* @param string $fieldName
* @param string $dbFieldName
- * @param $fieldTitle
+ * @param string $fieldTitle
* @param bool $appendTimeStamp
*/
public function dateQueryBuilder(
}
/**
- * Builds the necessary structures for all fields that are similar to option value lookups.
+ * Builds the necessary structures for all fields that are similar to option value look-ups.
*
* @param string $name
* the name of the field.
* @param string $dataType
* The data type for this element.
* @param bool $useIDsOnly
- *
- * @return void
- * adds the where clause and qill to the query object
*/
public function optionValueQuery(
$name,
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * Delegate query functions based on hook system
+ * Delegate query functions based on hook system.
*/
class CRM_Contact_BAO_Query_Hook {
}
/**
- * Get or build the list of search objects (via hook)
+ * Get or build the list of search objects (via hook).
*
* @return array
* Array of CRM_Contact_BAO_Query_Interface objects
}
/**
- * @param $query
+ * Alter search query.
+ *
+ * @param string $query
* @param string $fnName
*/
public function alterSearchQuery(&$query, $fnName) {
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Contact_BAO_RelationshipType extends CRM_Contact_DAO_RelationshipType {
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * Business object for Saved searches
- *
+ * Business object for Saved searches.
*/
class CRM_Contact_BAO_SavedSearch extends CRM_Contact_DAO_SavedSearch {
/**
* Class constructor.
- *
- * @return \CRM_Contact_BAO_SavedSearch CRM_Contact_BAO_SavedSearch
*/
public function __construct() {
parent::__construct();
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Contact_BAO_SearchCustom {
/**
+ * Get details.
+ *
* @param int $csID
* @param int $ssID
* @param int $gID
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * BAO object for crm_email table
+ * BAO object for crm_email table.
*/
class CRM_Contact_BAO_SubscriptionHistory extends CRM_Contact_DAO_SubscriptionHistory {
/**
* Class constructor.
- *
- * @return \CRM_Contact_DAO_SubscriptionHistory
- */
- /**
*/
public function __construct() {
parent::__construct();
}
/**
- * Erase a contact's subscription history records
+ * Erase a contact's subscription history records.
*
* @param int $id
* The contact id.
- *
- * @return void
*/
public static function deleteContact($id) {
$history = new CRM_Contact_BAO_SubscriptionHistory();
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
*
* Typically the first form will display the search criteria and it's results
*
- * The second form is used to process search results with the asscociated actions
- *
+ * The second form is used to process search results with the associated actions.
*/
class CRM_Contact_Controller_Search extends CRM_Core_Controller {
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
/**
* Build all the data structures needed to build the form.
- *
- * @return void
*/
public function preProcess() {
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'add');
}
/**
- * Set default values for the form. Note that in edit/view mode
- * the default values are retrieved from the database
- *
+ * Set default values for the form.
*
- * @return void
+ * Note that in edit/view mode the default values are retrieved from the database
*/
public function setDefaultValues() {
$defaults = $this->_values;
- $params = array();
if ($this->_action & CRM_Core_Action::ADD) {
if (array_key_exists('TagsAndGroups', $this->_editOptions)) {
* add the rules (mainly global rules) for form.
* All local rules are added near the element
*
- * @return void
* @see valid_date
*/
public function addRules() {
/**
* Build the form object.
- *
- * @return void
*/
public function buildQuickForm() {
//load form for child blocks
/**
* Form submission of new/edit contact is processed.
- *
- *
- * @return void
*/
public function postProcess() {
// check if dedupe button, if so return.
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class generates form components for custom data
+ * This class generates form components for custom data.
*
* It delegates the work to lower level subclasses and integrates the changes
* back in. It also uses a lot of functionality with the CRM API's, so any change
* made here could potentially affect the API etc. Be careful, be aware, use unit tests.
- *
*/
class CRM_Contact_Form_CustomData extends CRM_Core_Form {
/**
* Pre processing work done here.
*
- * gets session variables for table name, id of entity in table, type of entity and stores them.
- *
- * @param
- *
- * @return void
+ * Gets session variables for table name, id of entity in table, type of entity and stores them.
*/
public function preProcess() {
$this->_cdType = CRM_Utils_Array::value('type', $_GET);
/**
* Build the form object.
- *
- * @return void
*/
public function buildQuickForm() {
if ($this->_cdType || $this->_multiRecordDisplay == 'single') {
/**
* Process the user submitted custom data values.
- *
- *
- * @return void
*/
public function postProcess() {
// Get the form values and groupTree
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class generates form components for DedupeRules
- *
+ * This class generates form components for DedupeRules.
*/
class CRM_Contact_Form_DedupeFind extends CRM_Admin_Form {
/**
* Build the form object.
- *
- * @return void
*/
public function buildQuickForm() {
/**
* Process the form submission.
- *
- *
- * @return void
*/
public function postProcess() {
$values = $this->exportValues();
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class generates form components for DedupeRules
- *
+ * This class generates form components for DedupeRules.
*/
class CRM_Contact_Form_DedupeRules extends CRM_Admin_Form {
const RULES_COUNT = 5;
/**
* Pre processing.
- *
- * @return void
*/
public function preProcess() {
// Ensure user has permission to be here
/**
* Build the form object.
- *
- * @return void
*/
public function buildQuickForm() {
$this->addField('title', array('label' => ts('Rule Name')), TRUE);
/**
* Process the form submission.
- *
- *
- * @return void
*/
public function postProcess() {
$values = $this->exportValues();
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class is to build the form for adding Group
+ * This class is to build the form for adding Group.
*/
class CRM_Contact_Form_Domain extends CRM_Core_Form {
/**
* Build the form object.
- *
- * @return void
*/
public function buildQuickForm() {
$this->addField('name', array('label' => ts('Organization Name')), TRUE);
/**
* Add local and global form rules.
- *
- *
- * @return void
*/
public function addRules() {
$this->addFormRule(array('CRM_Contact_Form_Domain', 'formRule'));
/**
* Process the form when submitted.
- *
- * @return void
*/
public function postProcess() {
$params = $this->exportValues();
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class is used to build address block
+ * This class is used to build address block.
*/
class CRM_Contact_Form_Edit_Address {
* False, if we want to skip the address sharing features.
* @param bool $inlineEdit
* True when edit used in inline edit.
- *
- * @return void
- *
*/
public static function buildQuickForm(&$form, $addressBlockCount = NULL, $sharing = TRUE, $inlineEdit = FALSE) {
// passing this via the session is AWFUL. we need to fix this
/**
* Check for correct state / country mapping.
*
- * @param $fields
- * @param $files
- * @param $self
+ * @param array $fields
+ * @param array $files
+ * @param CRM_Core_Form $self
*
* @return array|bool
* if no errors
- *
*/
public static function formRule($fields, $files, $self) {
$errors = array();
* Defaults associated array.
* @param CRM_Core_Form $form
* Form object.
- *
*/
public static function setDefaultValues(&$defaults, &$form) {
$addressValues = array();
}
}
-
/**
+ * Store required custom data info.
+ *
* @param CRM_Core_Form $form
- * @param $groupTree
+ * @param array $groupTree
*/
public static function storeRequiredCustomDataInfo(&$form, $groupTree) {
if (CRM_Utils_System::getClassName($form) == 'CRM_Contact_Form_Contact') {
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * form helper class for an Communication Preferences object
+ * Form helper class for an Communication Preferences object.
*/
class CRM_Contact_Form_Edit_CommunicationPreferences {
/**
- * Greetings
+ * Greetings.
+ *
* @var array
*/
static $greetings = array();
*
* @param CRM_Core_Form $form
* Reference to the form object.
- *
- * @return void
*/
public static function buildQuickForm(&$form) {
// since the pcm - preferred communication method is logically
* The input form values.
* @param array $files
* The uploaded files if any.
- * @param $self
+ * @param CRM_Contact_Form_Edit_CommunicationPreferences $self
*
* @return bool|array
* true if no errors, else array of errors
}
/**
- * Set default values for the form. Note that in edit/view mode
- * the default values are retrieved from the database
- *
+ * Set default values for the form.
*
* @param CRM_Core_Form $form
- * @param $defaults
- *
- * @return void
+ * @param array $defaults
*/
public static function setDefaultValues(&$form, &$defaults) {
}
/**
- * set array of greeting fields.
- *
- * @param $contactType
+ * Set array of greeting fields.
*
- * @return void
+ * @param string $contactType
*/
public static function getGreetingFields($contactType) {
if (empty(self::$greetings[$contactType])) {
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * form helper class for an Demographics object
+ *Form helper class for an Demographics object.
*/
class CRM_Contact_Form_Edit_CustomData {
* Build all the data structures needed to build the form.
*
* @param CRM_Core_Form $form
- *
- * @return void
*/
public static function preProcess(&$form) {
$form->_type = CRM_Utils_Request::retrieve('type', 'String', CRM_Core_DAO::$_nullObject);
*
* @param CRM_Core_Form $form
* Reference to the form object.
- *
- * @return void
*/
public static function buildQuickForm(&$form) {
if (!empty($form->_submitValues)) {
*
*
* @param CRM_Core_Form $form
- * @param $defaults
- *
- * @return void
+ * @param array $defaults
*/
public static function setDefaultValues(&$form, &$defaults) {
$defaults += CRM_Custom_Form_CustomData::setDefaultValues($form);
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * form helper class for an Demographics object
+ * Form helper class for an Demographics object.
*/
class CRM_Contact_Form_Edit_Demographics {
*
* @param CRM_Core_Form $form
* Reference to the form object.
- *
- * @return void
*/
public static function buildQuickForm(&$form) {
$form->addField('gender_id', array('entity' => 'contact', 'type' => 'Radio', 'allowClear' => TRUE));
*
*
* @param CRM_Core_Form $form
- * @param $defaults
- *
- * @return void
+ * @param array $defaults
*/
public static function setDefaultValues(&$form, &$defaults) {
}
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * form helper class for an Email object
+ * Form helper class for an Email object.
*/
class CRM_Contact_Form_Edit_Email {
* Block number to build.
* @param bool $blockEdit
* Is it block edit.
- *
- * @return void
*/
public static function buildQuickForm(&$form, $blockCount = NULL, $blockEdit = FALSE) {
// passing this via the session is AWFUL. we need to fix this
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * Auxiliary class to provide support to the Contact Form class. Does this by implementing
- * a small set of static methods
+ * Auxiliary class to provide support to the Contact Form class.
*
+ * Does this by implementing a small set of static methods.
*/
class CRM_Contact_Form_Edit_Household {
/**
- * This function provides the HTML form elements that are specific.
- * to the Household Contact Type
+ * This function provides the HTML form elements that are specific to the Household Contact Type.
*
* @param CRM_Core_Form $form
* Form object.
* @param int $inlineEditMode
* ( 1 for contact summary.
* top bar form and 2 for display name edit )
- *
- * @return void
*/
public static function buildQuickForm(&$form, $inlineEditMode = NULL) {
$form->applyFilter('__ALL__', 'trim');
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * form helper class for an IM object
+ * Form helper class for an IM object.
*/
class CRM_Contact_Form_Edit_IM {
* Block number to build.
* @param bool $blockEdit
* Is it block edit.
- *
- * @return void
*/
public static function buildQuickForm(&$form, $blockCount = NULL, $blockEdit = FALSE) {
if (!$blockCount) {