| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping {
/**
- * Class constructor
+ * Class constructor.
*/
public function __construct() {
parent::__construct();
}
/**
- * Fetch object based on array of properties
+ * Fetch object based on array of properties.
*
* @param array $params
* (reference ) an assoc array of name/value pairs.
}
/**
- * Delete the mapping
+ * Delete the mapping.
*
* @param int $id
* Mapping id.
*
- * @return boolean
+ * @return bool
*/
public static function del($id) {
// delete from mapping_field table
}
/**
- * Takes an associative array and creates a contact object
+ * Takes an associative array and creates a contact object.
*
* The function extract all the params it needs to initialize the create a
* contact object. the params array could contain additional unused name/value
}
/**
- * Get the list of mappings
+ * Get the list of mappings.
*
* @param string $mappingTypeId
* Mapping type id.
}
/**
- * Get the mapping fields
+ * Get the mapping fields.
*
* @param int $mappingId
* Mapping id.
}
/**
- * Check Duplicate Mapping Name
+ * Check Duplicate Mapping Name.
*
* @param string $nameField
* mapping Name.
* @param string $mapTypeId
* mapping Type.
*
- * @return boolean
+ * @return bool
*/
public static function checkMapping($nameField, $mapTypeId) {
$mapping = new CRM_Core_DAO_Mapping();
}
/**
- * Build the mapping form
+ * Build the mapping form.
*
* @param CRM_Core_Form $form
* @param string $mappingType
foreach (array(
'groups',
'tags',
- 'notes'
+ 'notes',
) as $value) {
unset($fields['Individual'][$value]);
unset($fields['Household'][$value]);
$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'
+ 'name' => 'note_subject',
);
}
}
$csRelationships = array();
if ($mappingType == 'Export') {
- $subTypeRelationshipTypes =
- CRM_Contact_BAO_Relationship::getContactRelationshipType(NULL, NULL, NULL, $val['parent'],
+ $subTypeRelationshipTypes
+ = CRM_Contact_BAO_Relationship::getContactRelationshipType(NULL, NULL, NULL, $val['parent'],
FALSE, 'label', TRUE, $subType);
foreach ($subTypeRelationshipTypes as $key => $var) {
/**
- * Function returns all Custom group Names
+ * Function returns all Custom group Names.
*
* @param int $customfieldId
* Related file id.
0,
);
}
-
-
return $fields;
}
$mappingFields->delete();
if (empty($params['mapper'])) {
- return;
+ return NULL;
}
//save record in mapping field table
}
}
}
+
}