$params['activity_type_id'] = $this->_activityTypeId;
}
- if (!empty($params['hidden_custom']) &&
- !isset($params['custom'])
- ) {
- $customFields = CRM_Core_BAO_CustomField::getFields('Activity', FALSE, FALSE,
- $this->_activityTypeId
- );
- $customFields = CRM_Utils_Array::crmArrayMerge($customFields,
- CRM_Core_BAO_CustomField::getFields('Activity', FALSE, FALSE,
- NULL, NULL, TRUE
- )
- );
+ if (!empty($params['hidden_custom']) && !isset($params['custom'])) {
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$this->_activityId,
'Activity'
}
//process custom data.
- $customFields = CRM_Core_BAO_CustomField::getFields('Campaign', FALSE, FALSE,
- CRM_Utils_Array::value('campaign_type_id', $params)
- );
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$form->_campaignId,
'Campaign'
// get additional custom activity profile field data
// to save with new signature activity record
$surveyInfo = $this->bao->getSurveyInfo($this->_surveyId);
- $customActivityFields = CRM_Core_BAO_CustomField::getFields('Activity', FALSE, FALSE,
- $surveyInfo['activity_type_id']
- );
- $customActivityFields = CRM_Utils_Array::crmArrayMerge($customActivityFields,
- CRM_Core_BAO_CustomField::getFields('Activity', FALSE, FALSE,
- NULL, NULL, TRUE
- )
- );
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
NULL,
// 3. format activity custom data
if (!empty($params['hidden_custom'])) {
- $customFields = CRM_Core_BAO_CustomField::getFields('Activity', FALSE, FALSE, $this->_activityTypeId);
- $customFields = CRM_Utils_Array::crmArrayMerge($customFields,
- CRM_Core_BAO_CustomField::getFields('Activity', FALSE, FALSE,
- NULL, NULL, TRUE
- )
- );
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$this->_activityId,
'Activity'
$valueIdDefaults = [];
$groupTreeValueId = CRM_Core_BAO_CustomGroup::formatGroupTree($groupTree, $this->_copyValueId, $this);
CRM_Core_BAO_CustomGroup::setDefaults($groupTreeValueId, $valueIdDefaults, FALSE, FALSE, $this->get('action'));
- $tableId = $groupTreeValueId[$this->_groupID]['table_id'];
foreach ($valueIdDefaults as $valueIdElementName => $value) {
// build defaults for COPY action for new record saving
$valueIdElementNamePieces = explode('_', $valueIdElementName);
return $customDefaultValue;
}
- $groupTree = CRM_Core_BAO_CustomGroup::getTree($this->_contactType,
- NULL,
- $this->_tableID,
- $this->_groupID,
- $this->_contactSubType
- );
-
if (empty($_POST['hidden_custom_group_count'])) {
// custom data building in edit mode (required to handle multi-value)
$groupTree = CRM_Core_BAO_CustomGroup::getTree($this->_contactType, NULL, $this->_tableID,
$defaults = [];
$contactObj = CRM_Contact_BAO_Contact::retrieve($contactParams, $defaults);
- $modeUpdate = $modeFill = FALSE;
-
- if ($onDuplicate == CRM_Import_Parser::DUPLICATE_UPDATE) {
- $modeUpdate = TRUE;
- }
-
- if ($onDuplicate == CRM_Import_Parser::DUPLICATE_FILL) {
- $modeFill = TRUE;
- }
+ $modeFill = ($onDuplicate == CRM_Import_Parser::DUPLICATE_FILL);
$groupTree = CRM_Core_BAO_CustomGroup::getTree($params['contact_type'], NULL, $cid, 0, NULL);
CRM_Core_BAO_CustomGroup::setDefaults($groupTree, $defaults, FALSE, FALSE);
$statusId = CRM_Core_DAO::getFieldValue('CRM_Event_BAO_Participant', $participantID, 'status_id', 'id');
$status = CRM_Core_DAO::getFieldValue('CRM_Event_BAO_ParticipantStatusType', $statusId, 'name', 'id');
- $status = CRM_Core_DAO::getFieldValue('CRM_Event_BAO_ParticipantStatusType', $statusId, 'name', 'id');
if ($status == 'Transferred') {
$transferId = CRM_Core_DAO::getFieldValue('CRM_Event_BAO_Participant', $participantID, 'transferred_to_contact_id', 'id');
$pid = CRM_Core_DAO::getFieldValue('CRM_Event_BAO_Participant', $transferId, 'id', 'contact_id');
$this->assign('transferId', $transferId);
$this->assign('transferName', $transferName);
}
- $participantStatuses = CRM_Event_PseudoConstant::participantStatus();
// CRM-20879: Show 'Transfer or Cancel' option beside 'Change fee selection'
// only if logged in user have 'edit event participants' permission and
$eventNameCustomDataTypeID = array_search('ParticipantEventName', $customDataType);
$eventTypeCustomDataTypeID = array_search('ParticipantEventType', $customDataType);
$allRoleIDs = explode(CRM_Core_DAO::VALUE_SEPARATOR, $values[$participantID]['role_id']);
- $groupTree = [];
$finalTree = [];
foreach ($allRoleIDs as $k => $v) {
$ids['note']['id'] = $this->_noteId;
}
- // build custom data getFields array
- $customFieldsGrantType = CRM_Core_BAO_CustomField::getFields('Grant', FALSE, FALSE,
- CRM_Utils_Array::value('grant_type_id', $params)
- );
- $customFields = CRM_Utils_Array::crmArrayMerge($customFieldsGrantType,
- CRM_Core_BAO_CustomField::getFields('Grant', FALSE, FALSE, NULL, NULL, TRUE)
- );
+ // build custom data array
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($params,
$this->_id,
'Grant'
if (!empty($formValues['hidden_custom'])) {
$params['hidden_custom'] = 1;
- $customFields = CRM_Core_BAO_CustomField::getFields('Pledge');
$params['custom'] = CRM_Core_BAO_CustomField::postProcess($formValues,
$this->_id,
'Pledge'