本文整理汇总了PHP中CRM_Core_Error::reset方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_Error::reset方法的具体用法?PHP CRM_Core_Error::reset怎么用?PHP CRM_Core_Error::reset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_Error
的用法示例。
在下文中一共展示了CRM_Core_Error::reset方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: civicrm_contact_format_create
/**
* @todo Move this to ContactFormat.php
* @deprecated
*/
function civicrm_contact_format_create(&$params)
{
_civicrm_initialize();
CRM_Core_DAO::freeResult();
// return error if we have no params
if (empty($params)) {
return civicrm_create_error('Input Parameters empty');
}
$error = _civicrm_required_formatted_contact($params);
if (civicrm_error($error)) {
return $error;
}
$error = _civicrm_validate_formatted_contact($params);
if (civicrm_error($error)) {
return $error;
}
//get the prefix id etc if exists
require_once 'CRM/Contact/BAO/Contact.php';
CRM_Contact_BAO_Contact::resolveDefaults($params, TRUE);
require_once 'CRM/Import/Parser.php';
if (CRM_Utils_Array::value('onDuplicate', $params) != CRM_Import_Parser::DUPLICATE_NOCHECK) {
CRM_Core_Error::reset();
$error = _civicrm_duplicate_formatted_contact($params);
if (civicrm_error($error)) {
return $error;
}
}
$contact = CRM_Contact_BAO_Contact::create($params, CRM_Utils_Array::value('fixAddress', $params));
_civicrm_object_to_array($contact, $contactArray);
return $contactArray;
}
示例2: _civicrm_api3_deprecated_create_participant_formatted
/**
* @deprecated - this is part of the import parser not the API & needs to be moved on out
*
* @param array $params
* @param $onDuplicate
*
* @return array|bool
* <type>
*/
function _civicrm_api3_deprecated_create_participant_formatted($params, $onDuplicate)
{
require_once 'CRM/Event/Import/Parser.php';
if ($onDuplicate != CRM_Import_Parser::DUPLICATE_NOCHECK) {
CRM_Core_Error::reset();
$error = _civicrm_api3_deprecated_participant_check_params($params, TRUE);
if (civicrm_error($error)) {
return $error;
}
}
require_once "api/v3/Participant.php";
return civicrm_api3_participant_create($params);
}
示例3: civicrm_create_participant_formatted
/**
*
* @param <type> $params
* @param <type> $onDuplicate
* @return <type>
*/
function civicrm_create_participant_formatted(&$params, $onDuplicate)
{
_civicrm_initialize();
// return error if we have no params
if (empty($params)) {
return civicrm_create_error('Input Parameters empty');
}
require_once 'CRM/Event/Import/Parser.php';
if ($onDuplicate != CRM_Event_Import_Parser::DUPLICATE_NOCHECK) {
CRM_Core_Error::reset();
$error = civicrm_participant_check_params($params);
if (civicrm_error($error)) {
return $error;
}
}
return civicrm_participant_create($params);
}