}
/**
- * Send the sms message to a specific contact
+ * Send the sms message to a specific contact.
*
* @param int $toID
* The contact id of the recipient.
}
/**
- * Send the message to a specific contact
+ * Send the message to a specific contact.
*
* @param string $from
* The name and email of the sender.
//Set defaults for autocomplete and contact reference options
$this->_defaults['autocompleteContactSearch'] = array(
- '1' => 1,
- ) + $autoSearchFields;
+ '1' => 1,
+ ) + $autoSearchFields;
$this->_defaults['autocompleteContactReference'] = array(
- '1' => 1,
- ) + $cRSearchFields;
+ '1' => 1,
+ ) + $cRSearchFields;
// we can handle all the ones defined in the metadata here. Others to be converted
foreach ($this->_settings as $setting => $group) {
}
/**
+ * Common Process.
+ *
+ * @todo Document what I do.
+ *
* @param array $params
*/
public function commonProcess(&$params) {
}
/**
- * Build the form object
- *
- *
- * @return void
+ * Build the form object.
*/
public function buildQuickForm() {
if ($this->_search) {
public function createDefaultCrudLink($crudLinkSpec) {
switch ($crudLinkSpec['action']) {
case CRM_Core_Action::VIEW:
+
return array(
'title' => $this->display_name,
'path' => 'civicrm/contact/view',
* @return array
* array of importable Fields
*/
- static function importableFields(
+ public static function importableFields(
$contactType = 'Individual',
$status = FALSE,
$showAll = FALSE,
if (!$fields) {
$fields = CRM_Contact_DAO_Contact::export();
- // the fields are meant for contact types
- if (in_array($contactType, array('Individual', 'Household', 'Organization', 'All'))) {
+ // The fields are meant for contact types.
+ if (in_array($contactType, array(
+ 'Individual',
+ 'Household',
+ 'Organization',
+ 'All',
+ )
+ )) {
$fields = array_merge($fields, CRM_Core_OptionValue::getFields('', $contactType));
}
// add current employer for individuals
$returnProperties = self::makeHierReturnProperties($fields, $contactId);
- // We don't know the contents of return properties, but we need the lower level ids of the contact
- // so add a few fields.
+ // We don't know the contents of return properties, but we need the lower
+ // level ids of the contact so add a few fields.
$returnProperties['first_name'] =
$returnProperties['organization_name'] =
$returnProperties['household_name'] =
}
/**
- * 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() {
return $this->_defaults;
}
/**
- * Build the form object
+ * Build the form object.
*/
public function buildQuickForm() {
$this->addDefaultButtons(ts('Confirm Action'));
/**
* Replace ids of household members in $this->_contactIds with the id of their household.
- * CRM-8338
- *
*
- * @return void
+ * CRM-8338
*/
public function mergeContactIdsByHousehold() {
if (empty($this->_contactIds)) {
protected $_customSearchClass;
/**
- * Class constructor
+ * Class constructor.
*
* @param $customSearchClass
* @param array $formValues
/**
* Given the current formValues, gets the query in local language.
*
- * @param array $formValues submitted formValues
- *
* @return array
* which contains an array of strings
*/
}
/**
+ * Get summary.
+ *
* @return mixed
*/
public function getSummary() {
}
/**
+ * Do nothing.
+ *
* @return null
*/
public function alphabetQuery() {
}
/**
- * @return mixed
+ * Get template file name.
+ *
+ * @return string
*/
public function getTemplateFileName() {
// there is only one form here, so should be quite easy
protected $_uploadDir;
/**
- * Class constructor
+ * Class constructor.
*
* @param object $stateMachine
* Reference to state machine object.
}
/**
+ * Real perform.
+ *
* @todo document what I do.
*
* @param CRM_Core_Form $page
WHERE contact1.contact_type = 'Individual'
AND " . self::internalFilters($rg);
return array(
- "civicrm_contact.{$rg->name}.{$rg->threshold}" => $query
+ "civicrm_contact.{$rg->name}.{$rg->threshold}" => $query,
);
}
}
-
-;
public $_templates = NULL;
/**
- * Build all the data structures needed to build the form
+ * Build all the data structures needed to build the form.
*/
public function preProcess() {
CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this);
$this->addRule('title', ts('This Title already exists in Database.'), 'objectExists', array(
'CRM_SMS_DAO_Provider',
- $this->_id
+ $this->_id,
));
$this->add('text', 'username', ts('Username'),