/**
* Fetch object based on array of properties
*
- * @param array $params (reference ) an assoc array of name/value pairs
- * @param array $defaults (reference ) an assoc array to hold the flattened values
+ * @param array $params
+ * (reference ) an assoc array of name/value pairs.
+ * @param array $defaults
+ * (reference ) an assoc array to hold the flattened values.
*
- * @return object CRM_Core_DAO_Mapping object on success, otherwise null
+ * @return object CRM_Core_DAO_Mapping object on success, otherwise NULL
* @static
*/
public static function retrieve(&$params, &$defaults) {
/**
* Delete the mapping
*
- * @param int $id mapping id
+ * @param int $id
+ * Mapping id.
*
* @return boolean
* @static
* contact object. the params array could contain additional unused name/value
* pairs
*
- * @param array $params an array of name/value pairs
+ * @param array $params
+ * An array of name/value pairs.
*
- * @return object CRM_Core_DAO_Mapper object on success, otherwise null
+ * @return object CRM_Core_DAO_Mapper object on success, otherwise NULL
* @static
*/
public static function add($params) {
/**
* Get the list of mappings
*
- * @param string $mappingTypeId mapping type id
+ * @param string $mappingTypeId
+ * Mapping type id.
*
* @return array $mapping array of mapping name
* @static
/**
* Get the mapping fields
*
- * @param int $mappingId mapping id
+ * @param int $mappingId
+ * Mapping id.
*
* @return array $mappingFields array of mapping fields
* @static
/**
* Check Duplicate Mapping Name
*
- * @param $nameField string mapping Name
- * @param $mapTypeId string mapping Type
+ * @param string $nameField
+ * mapping Name.
+ * @param string $mapTypeId
+ * mapping Type.
*
* @return boolean
*/
/**
* Function returns associated array of elements, that will be passed for search
*
- * @param int $smartGroupId smart group id
+ * @param int $smartGroupId
+ * Smart group id.
*
- * @return array $returnFields associated array of elements@static
+ * @return array $returnFields associated array of elements
+ * @static
*/
public static function getFormattedFields($smartGroupId) {
$returnFields = array();
* Build the mapping form
*
* @param CRM_Core_Form $form
- * @param string $mappingType (Export/Import/Search Builder)
+ * @param string $mappingType
+ * (Export/Import/Search Builder).
* @param int $mappingId
* @param int $columnNo
- * @param int $blockCount (no of blocks shown)
- * @param null $exportMode
+ * @param int $blockCount
+ * (no of blocks shown).
+ * @param NULL $exportMode
*
* @return void
* @static
if (array_key_exists('note', $fields['Contact'])) {
$noteTitle = $fields['Contact']['note']['title'];
$fields['Contact']['note']['title'] = $noteTitle . ': ' . ts('Body and Subject');
- $fields['Contact']['note_body'] = array( 'title' => $noteTitle . ': ' . ts('Body Only'), 'name' => 'note_body' );
- $fields['Contact']['note_subject'] = array( 'title' => $noteTitle . ': ' . ts('Subject Only'), 'name' => 'note_subject' );
+ $fields['Contact']['note_body'] = array('title' => $noteTitle . ': ' . ts('Body Only'), 'name' => 'note_body');
+ $fields['Contact']['note_subject'] = array('title' => $noteTitle . ': ' . ts('Subject Only'), 'name' => 'note_subject');
}
}
// FIX ME: For now let's not expose custom data related to relationship
$relationshipCustomFields = array();
//$relationshipCustomFields = self::getRelationTypeCustomGroupData( $id );
- //asort( $relationshipCustomFields ) ;
+ //asort($relationshipCustomFields);
$relationshipType = new CRM_Contact_BAO_RelationshipType();
$relationshipType->id = $id;
$js .= implode(', ', $elements);
$js .= "]";
$js .= "
- for(var i=0;i<nullArray.length;i++) {
+ for (var i=0;i<nullArray.length;i++) {
if ( {$formName}['mapper['+nullArray[i][0]+']['+nullArray[i][1]+']['+nullArray[i][2]+']'] ) {
{$formName}['mapper['+nullArray[i][0]+']['+nullArray[i][1]+']['+nullArray[i][2]+']'].style.display = '';
}
$js .= implode(', ', $elements);
$js .= "]";
$js .= "
- for(var i=0;i<noneArray.length;i++) {
+ for (var i=0;i<noneArray.length;i++) {
if ( {$formName}['mapper['+noneArray[i][0]+']['+noneArray[i][1]+']['+noneArray[i][2]+']'] ) {
{$formName}['mapper['+noneArray[i][0]+']['+noneArray[i][1]+']['+noneArray[i][2]+']'].style.display = 'none';
}
* Function returns all custom fields with group title and
* field label
*
- * @param int $relationshipTypeId related relationship type id
+ * @param int $relationshipTypeId
+ * Related relationship type id.
*
* @return array all custom field titles
*/
/**
* Function returns all Custom group Names
*
- * @param int $customfieldId related file id
+ * @param int $customfieldId
+ * Related file id.
*
- * @return null|string $customGroupName all custom group names@static
+ * @return null|string $customGroupName all custom group names
+ * @static
*/
public static function getCustomGroupName($customfieldId) {
if ($customFieldId = CRM_Core_BAO_CustomField::getKeyID($customfieldId)) {
/**
* Function returns associated array of elements, that will be passed for search
*
- * @param array $params associated array of submitted values
- * @param bool $row row no of the fields
+ * @param array $params
+ * Associated array of submitted values.
+ * @param bool $row
+ * Row no of the fields.
*
*
- * @return array $returnFields formatted associated array of elements@static
+ * @return array $returnFields formatted associated array of elements
+ * @static
*/
public static function formattedFields(&$params, $row = FALSE) {
$fields = array();
'Multi-Select',
'AdvMulti-Select',
'Multi-Select State/Province',
- 'Multi-Select Country'
+ 'Multi-Select Country',
);
// override the operator to handle separator ( note: this might have some performance issues )
}
// CRM-14983: verify if values are comma separated convert to array
- if (!is_array($value) && (strpos($value,',') !== false || strstr($value, '(')) && empty($isCustomField) && $params['operator'][$key][$k] == 'IN') {
+ if (!is_array($value) && (strpos($value,',') !== FALSE || strstr($value, '(')) && empty($isCustomField) && $params['operator'][$key][$k] == 'IN') {
preg_match('#\((.*?)\)#', $value, $match);
$tmpArray = explode(',', $match[1]);
$value = array_combine(array_values($tmpArray),array_values($tmpArray));
/**
* Save the mapping field info for search builder / export given the formvalues
*
- * @param array $params asscociated array of formvalues
- * @param int $mappingId mapping id
+ * @param array $params
+ * Asscociated array of formvalues.
+ * @param int $mappingId
+ * Mapping id.
*
- * @return null
+ * @return NULL
* @static
*/
public static function saveMappingFields(&$params, $mappingId) {
}
}
}
-