*
* @return boolean
* true if yes, else false
- * @static
*/
public static function check($str, $contactID = NULL) {
if ($contactID == NULL) {
*
* @return string
* The WHERE clause, or 0 on failure
- * @static
*/
public static function permissionClause(
&$tables, $operation,
* @return string|null
* WHERE-style clause to filter results,
* or null if $table or $id is null
- * @static
*/
public static function getClause($table, $id, &$tables) {
$table = CRM_Utils_Type::escape($table, 'String');
*
* @return array
* Array of assoc. arrays of ACL rules
- * @static
*/
public static function &getACLs($contact_id = NULL, $group_id = NULL, $aclRoles = FALSE) {
$results = array();
*
* @return array
* Array of assoc. arrays of ACL rules
- * @static
*/
public static function &getACLRoles($contact_id = NULL, $group_id = NULL) {
$contact_id = CRM_Utils_Type::escape($contact_id, 'Integer');
*
* @return array
* Assoc array of ACL rules
- * @static
*/
public static function &getGroupACLs($contact_id, $aclRoles = FALSE) {
$contact_id = CRM_Utils_Type::escape($contact_id, 'Integer');
*
* @return array
* Array of assoc. arrays of ACL rules
- * @static
*/
public static function &getGroupACLRoles($contact_id) {
$contact_id = CRM_Utils_Type::escape($contact_id, 'Integer');
*
* @return array
* Assoc array of ACL rules
- * @static
*/
public static function &getAllByContact($contact_id) {
$result = array();
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
// note this also resets any ACL cache
* @param int $aclId
* ID of the ACL record to be deleted.
*
- * @static
*/
public static function del($aclId) {
// delete all entries from the acl cache
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_ACL_DAO_EntityRole', $id, 'is_active', $is_active);
* @param int $entityRoleId
* ID of the EntityRole record to be deleted.
*
- * @static
*/
public static function del($entityRoleId) {
$entityDAO = new CRM_ACL_DAO_EntityRole();
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* Browse all acls
*
* @return void
- * @static
*/
public function browse() {
// get all acl's sorted by weight
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* Browse all acls
*
* @return void
- * @static
*/
public function browse() {
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* Browse all acls
*
* @return void
- * @static
*/
public function browse() {
* Static field for all the activity information that we can potentially export
*
* @var array
- * @static
*/
static $_exportableFields = NULL;
* Static field for all the activity information that we can potentially import
*
* @var array
- * @static
*/
static $_importableFields = NULL;
* @return array
* (reference) $values the relevant data object values of open activities
*
- * @static
*/
public static function &getActivities($input) {
//step 1: Get the basic activity data
*
* @return array
* Array of component id and name.
- * @static
**/
public static function activityComponents() {
$components = array();
* @return int
* count of activities
*
- * @static
*/
public static function &getActivitiesCount($input) {
$input['count'] = TRUE;
* @return int
* count of activities
*
- * @static
*/
public static function getActivitySQLClause($input) {
$params = array();
*
* @return array
* ( sent, activityId) if any email is sent and activityId
- * @static
*/
static function sendEmail(
&$contactDetails,
*
* @return bool|PEAR_Error
* true on success or PEAR_Error object
- * @static
*/
static function sendSMSMessage(
$toID,
*
* @return boolean
* true if successfull else false.
- * @static
*/
static function sendMessage(
$from,
*
* @return array
* array of importable Fields
- * @static
*/
public static function &importableFields($status = FALSE) {
if (!self::$_importableFields) {
* @param int $targetContactID
*
* @return bool
- * @static
*/
static function addActivity(
&$activity,
* @return string|bool
* if file exists returns $activityTypeFile activity filename otherwise false.
*
- * @static
*/
public static function getFileForActivityTypeId($activityTypeId, $crmDir = 'Activity') {
$activityTypes = CRM_Case_PseudoConstant::caseActivityType(FALSE, TRUE);
*
* @return array
* array of exportable Fields
- * @static
*/
public static function &exportableFields($name = 'Activity') {
if (!isset(self::$_exportableFields[$name])) {
*
* @param CRM_Core_Form $form
* @return void
- * @static
*/
public static function buildSearchForm(&$form) {
$activityOptions = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE);
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
// skip form rule if deleting
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields) {
if (!isset($fields['with_contact']) &&
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields) {
return TRUE;
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields) {
$errors = array();
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
- * @static
*/
static $_columnHeaders;
* This defines two actions- View and Edit.
*
* @var array
- * @static
*/
static $_links = NULL;
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
- * @static
*/
static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
- * @static
*/
static $_properties = array(
* The task array
*
* @var array
- * @static
*/
static $_tasks = NULL;
* The optional task array
*
* @var array
- * @static
*/
static $_optionalTasks = NULL;
*
* @return array
* the set of tasks for a group of contacts
- * @static
*/
public static function &tasks() {
if (!(self::$_tasks)) {
*
* @return array
* the set of task titles
- * @static
*/
public static function &taskTitles() {
self::tasks();
*
* @return array
* the set of tasks for a group of activity
- * @static
*/
public static function getTask($value) {
self::tasks();
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
*
* @return bool|array
* true if no errors, else an array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields) {
$errors = array();
* The option group name
*
* @var array
- * @static
*/
protected $_gName;
* The option group name in display format (capitalized, without underscores...etc)
*
* @var array
- * @static
*/
protected $_gLabel;
*
* @return array
* array of errors / empty array.
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
* @return array
* if errors then list of errors to be posted back to the form,
* true otherwise
- * @static
*/
public static function formRule($fields) {
$errors = array();
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $options) {
$errors = array();
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields) {
$errors = array();
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $options) {
$errors = array();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields) {
if ($fields['outBound_option'] == CRM_Mailing_Config::OUTBOUND_OPTION_SMTP) {
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($values) {
$errors = array();
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* Browse all event templates.
*
* @return void
- * @static
*/
public function browse() {
//get all event templates.
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
*
*
* @return void
- * @static
*/
public function browse() {
$mapper = CRM_Extension_System::singleton()->getMapper();
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* @param null $action
*
* @return void
- * @static
*/
public function browse($action = NULL) {
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* @param null $action
*
* @return void
- * @static
*/
public function browse($action = NULL) {
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* @param null $action
*
* @return void
- * @static
*/
public function browse($action = NULL) {
// Get list of configured Label Formats
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* Browse all mail settings.
*
* @return void
- * @static
*/
public function browse() {
//get all mail settings.
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The option group name
*
* @var array
- * @static
*/
static $_gName = NULL;
* The option group name in display format (capitalized, without underscores...etc)
*
* @var array
- * @static
*/
static $_gLabel = NULL;
* The option group id
*
* @var array
- * @static
*/
static $_gId = NULL;
* A boolean determining if you can add options to this group in the GUI
*
* @var boolean
- * @static
*/
static $_isLocked = FALSE;
*
*
* @return void
- * @static
*/
public function browse() {
if (!self::$_gName) {
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* @param null $action
*
* @return void
- * @static
*/
public function browse($action = NULL) {
// get all custom groups sorted by weight
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* @param null $action
*
* @return void
- * @static
*/
public function browse($action = NULL) {
// Get list of configured PDF Page Formats
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
private static $_stringActionLinks;
private static $_customizeActionLinks;
*
*
* @return void
- * @static
*/
public function browse() {
$permission = FALSE;
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* @param null $action
*
* @return void
- * @static
*/
public function browse($action = NULL) {
// Get list of configured reminders
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* @param CRM_Core_Form $form
*
* @return void
- * @static
*/
public static function buildBadges(&$params, &$form) {
// get name badge layout info
*
* @return CRM_Core_DAO_PrintLabel|null
* object on success, null otherwise
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$printLabel = new CRM_Core_DAO_PrintLabel();
* @return Object
* DAO object on success, null otherwise
*
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_PrintLabel', $id, 'is_active', $is_active);
* @param array $params
* Reference array contains the values submitted by the form.
*
- * @static
*
* @return object
*/
* @param int $printLabelId
* ID of the name label to be deleted.
*
- * @static
*/
public static function del($printLabelId) {
$printLabel = new CRM_Core_DAO_PrintLabel();
*
* @return array
* list of labels
- * @static
*/
public static function getList() {
$printLabel = new CRM_Core_DAO_PrintLabel();
*
* @return array
* associated array of decoded elements
- * @static
*/
static public function getDecodedData($jsonData) {
return json_decode($jsonData, TRUE);
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
*
* @return array
* CRM_Batch_BAO_Batch object on success, null otherwise
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$batch = new CRM_Batch_DAO_Batch();
*
* @return int
* $profileId profile id
- * @static
*/
public static function getProfileId($batchTypeId) {
//retrieve the profile specific to batch type
*
* @return string
* batch name
- * @static
*/
public static function generateBatchName() {
$sql = "SELECT max(id) FROM civicrm_batch";
*
* @return void
*
- * @static
*/
public static function exportFinancialBatch($batchIds, $exportFormat) {
if (empty($batchIds)) {
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($params, $files, $self) {
$errors = array();
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Campaign_DAO_Campaign
- * @static
*/
public static function create(&$params) {
if (empty($params)) {
/**
* Retrieve campaigns for dashboard.
*
- * @static
*/
public static function getCampaignSummary($params = array(), $onlyCount = FALSE) {
$campaigns = array();
/**
* Get the campaign count.
*
- * @static
*/
public static function getCampaignCount() {
return (int) CRM_Core_DAO::singleValueQuery('SELECT COUNT(*) FROM civicrm_campaign');
* Campaign id.
*
* @return array
- * @static
*/
public static function getCampaignGroups($campaignId) {
static $campaignGroups;
*
* @return CRM_Campaign_DAO_Campaign|null
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Campaign_DAO_Campaign', $id, 'is_active', $is_active);
/**
* Get Petition Details for dashboard.
*
- * @static
*/
public static function getPetitionSummary($params = array(), $onlyCount = FALSE) {
//build the limit and order clause.
/**
* Get the petition count.
*
- * @static
*/
public static function getPetitionCount() {
$whereClause = 'WHERE ( 1 )';
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Campaign_BAO_Petition
- * @static
*/
public function createSignature(&$params) {
if (empty($params)) {
* @param int $surveyId
*
* @return array
- * @static
*/
public static function getPetitionSignatureTotalbyCountry($surveyId) {
$countries = array();
* @param int $surveyId
*
* @return array
- * @static
*/
public static function getPetitionSignatureTotal($surveyId) {
$surveyInfo = CRM_Campaign_BAO_Petition::getSurveyInfo((int) $surveyId);
* @param int $status_id
*
* @return array
- * @static
*/
public static function getPetitionSignature($surveyId, $status_id = NULL) {
* @param int $contactId
*
* @return array
- * @static
*/
public static function checkSignature($surveyId, $contactId) {
* @throws Exception
* @return void
* @access public
- * @static
*/
public static function sendEmail($params, $sendEmailMode) {
* Static field for all the campaign fields
*
* @var array
- * @static
*/
static $_campaignFields = NULL;
*
* @return array
* self::$_campaignFields an associative array of campaign fields
- * @static
*/
public static function &getFields() {
if (!isset(self::$_campaignFields)) {
*
* @param CRM_Core_Form $form
* @return void
- * @static
*/
public static function buildSearchForm(&$form) {
* @param array $criteria
* An array.
* @return $voterClause as a string
- * @static
*/
/**
* @param array $params
* @param array $params
*
* @return CRM_Survey_DAO_Survey
- * @static
*/
public static function create(&$params) {
if (empty($params)) {
/**
* Retrieve surveys for dashboard.
*
- * @static
*/
public static function getSurveySummary($params = array(), $onlyCount = FALSE) {
//build the limit and order clause.
/**
* Get the survey count.
*
- * @static
*/
public static function getSurveyCount() {
return (int) CRM_Core_DAO::singleValueQuery('SELECT COUNT(*) FROM civicrm_survey');
* @param bool $includePetition
* Include or exclude petitions.
*
- * @static
*/
public static function getSurveys($onlyActive = TRUE, $onlyDefault = FALSE, $forceAll = FALSE, $includePetition = FALSE) {
$cacheKey = 0;
* Get Surveys activity types
*
*
- * @static
*/
static function getSurveyActivityType(
$returnColumn = 'label',
* an array of survey type id.
*
* @return array
- * @static
*/
public static function getSurveyCustomGroups($surveyTypes = array()) {
$customGroups = array();
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Campaign_DAO_Survey', $id, 'is_active', $is_active);
* Survey id.
*
* @return mixed|null
- * @static
*/
public static function del($id) {
if (!$id) {
*
* @return array
* array of contact info.
- * @static
*/
public static function voterDetails($voterIds, $returnProperties = array()) {
$voterDetails = array();
*
* @return array
* array of survey activity.
- * @static
*/
static function voterActivityDetails(
$surveyId, $voterIds, $interviewerId = NULL,
*
* @return array
* An array of survey activity.
- * @static
*/
static function getSurveyActivities(
$surveyId,
*
* @return array
* Survey related contact ids.
- * @static
*/
public static function getSurveyVoterInfo($surveyId, $interviewerId = NULL, $statusIds = array()) {
$voterIds = array();
* @param string $valueColumnName
* @return array
* an array of option groups.
- * @static
*/
public static function getResultSets($valueColumnName = 'title') {
$resultSets = array();
* @param int $activityId
* Activity id.
* @return boolean
- * @static
*/
public static function isSurveyActivity($activityId) {
$isSurveyActivity = FALSE;
* Survey id.
* @return array
* an array of option values
- * @static
*/
public static function getResponsesOptions($surveyId) {
$responseOptions = array();
* @param string $extraULName
* @return array|string
* $url array of permissioned links
- * @static
*/
public static function buildPermissionLinks($surveyId, $enclosedInUL = FALSE, $extraULName = 'more') {
$menuLinks = array();
* The option group name
*
* @var string
- * @static
*/
protected $_gName;
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
*
* @return boolean
* True on success
- * @static
*/
public static function confirm($contact_id, $subscribe_id, $hash, $activity_id, $petition_id) {
$se = CRM_Mailing_Event_BAO_Subscribe::verify($contact_id, $subscribe_id, $hash);
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The option group name
*
* @var array
- * @static
*/
protected $_gName;
* The option group name in display format (capitalized, without underscores...etc)
*
* @var array
- * @static
*/
protected $_GName;
* The option group id
*
* @var array
- * @static
*/
protected $_gid = NULL;
*
*
* @return void
- * @static
*/
public function browse() {
$campaingCompId = CRM_Core_Component::getComponentID('CiviCampaign');
/**
* Activity types
* @var array
- * @static
*/
private static $activityType;
/**
* Campaign Type
* @var array
- * @static
*/
private static $campaignType = array();
/**
* Campaign Status
* @var array
- * @static
*/
private static $campaignStatus = array();
/**
* Engagement Level
- * @static
*/
private static $engagementLevel;
*
* @return array
* array reference of all survey activity types.
- * @static
*/
public static function &activityType($returnColumn = 'name') {
$cacheKey = $returnColumn;
*
* The static array campaignType is returned
*
- * @static
*
* @return array
* array reference of all campaign types.
*
* The static array campaignStatus is returned
*
- * @static
*
* @return array
* array reference of all campaign status.
*
* The static array Engagement Level is returned
*
- * @static
*
* @return array
* array reference of all Engagement Level.
* Flush given pseudoconstant so it can be reread from db
* next time it's requested.
*
- * @static
*
* @param bool|string $name pseudoconstant to be flushed
*/
* This defines two actions- View and Edit.
*
* @var array
- * @static
*/
static $_links = NULL;
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
- * @static
*/
static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
- * @static
*/
static $_properties = array(
'contact_id',
* The task array
*
* @var array
- * @static
*/
static $_tasks = NULL;
* The optional task array
*
* @var array
- * @static
*/
static $_optionalTasks = NULL;
*
* @return array
* the set of tasks for a group of voters.
- * @static
*/
public static function &tasks() {
if (!(self::$_tasks)) {
*
* @return array
* the set of task titles
- * @static
*/
public static function &taskTitles() {
self::tasks();
*
* @return array
* the set of tasks for a group of voters.
- * @static
*/
public static function getTask($value) {
self::tasks();
* Static field for all the case information that we can potentially export
*
* @var array
- * @static
*/
static $_exportableFields = NULL;
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Case_BAO_Case
- * @static
*/
public static function add(&$params) {
$caseDAO = new CRM_Case_DAO_Case();
* The array that holds all the db ids.
*
* @return CRM_Case_BAO_Case|null the found object or null
- * @static
*/
public static function &getValues(&$params, &$values, &$ids) {
$case = new CRM_Case_BAO_Case();
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Case_BAO_Case
- * @static
*/
public static function &create(&$params) {
$transaction = new CRM_Core_Transaction();
* (reference) the array that holds all the db ids.
*
* @return CRM_Case_BAO_Case
- * @static
*/
public static function retrieve(&$params, &$defaults, &$ids) {
$case = CRM_Case_BAO_Case::getValues($params, $defaults, $ids);
* @param array $params
* (reference ) an assoc array of name/value pairs.
*
- * @static
*/
public static function processCaseActivity(&$params) {
$caseActivityDAO = new CRM_Case_DAO_CaseActivity();
* Activity id.
*
* @return string|null
- * @static
*/
public static function getCaseSubject($activityId) {
$caseActivity = new CRM_Case_DAO_CaseActivity();
*
* @return string
* case type
- * @static
*/
public static function getCaseType($caseId, $colName = 'title') {
$query = "
*
* @return bool
* is successful
- * @static
*/
public static function deleteCase($caseId, $moveToTrash = FALSE) {
CRM_Utils_Hook::pre('delete', 'Case', $caseId, CRM_Core_DAO::$_nullArray);
* Action.
*
* @return void
- * @static
*/
public static function enableDisableCaseRelationships($caseId, $enable) {
$contactIds = self::retrieveContactIdsByCaseId($caseId);
* Id of the activity.
*
* @return void
- * @static
*/
public static function deleteCaseActivity($activityId) {
$case = new CRM_Case_DAO_CaseActivity();
* @return array
* case role / relationships
*
- * @static
*/
public static function getCaseRoles($contactID, $caseID, $relationshipID = NULL) {
$query = '
* @return array
* Array of case activities
*
- * @static
*/
public static function getCaseActivity($caseID, &$params, $contactID, $context = NULL, $userID = NULL, $type = NULL) {
$values = array();
* @return array
* array of return properties
*
- * @static
*/
public static function getRelatedContacts($caseID, $skipDetails = FALSE) {
$values = array();
* Array of scheduled activity type and date
*
*
- * @static
*/
public static function getNextScheduledActivity($cases, $type = 'upcoming') {
$session = CRM_Core_Session::singleton();
*
* @return array
* array of exportable Fields
- * @static
*/
public static function &exportableFields() {
if (!self::$_exportableFields) {
* Id of the case to restore.
*
* @return bool
- * @static
*/
public static function restoreCase($caseId) {
//restore activities
* @return array
* case activities due dates
*
- * @static
*/
public static function getCaseActivityDates($caseID, $criteriaParams = array(), $latestDate = FALSE) {
$values = array();
* @return void
* on success creates activity and case activity
*
- * @static
*/
public static function createCaseRoleActivity($caseId, $relationshipId, $relContactId = NULL, $contactId = NULL) {
if (!$caseId || !$relationshipId || empty($relationshipId)) {
* @return array
* array of contact on success otherwise empty
*
- * @static
*/
public static function getCaseManagerContact($caseType, $caseId) {
if (!$caseType || !$caseId) {
* @param bool $changeClient
*
* @return int|NULL
- * @static
*/
static function mergeCases(
$mainContactId, $mainCaseId = NULL, $otherContactId = NULL,
* Info of the activity.
*
* @return void
- * @static
*/
public static function buildPermissionLinks(&$tplParams, $activityParams) {
$activityTypeId = CRM_Core_DAO::getFieldValue('CRM_Activity_DAO_Activity', $activityParams['source_record_id'],
* Do we need to check component enabled.
*
* @return boolean
- * @static
*/
public static function checkPermission($activityId, $operation, $actTypeId = NULL, $contactId = NULL, $checkComponent = TRUE) {
$allow = FALSE;
*
* @return array
* associated array with client ids
- * @static
*/
public static function getCaseClients($caseId) {
$clients = array();
* Static field for all the case information that we can potentially export
*
* @var array
- * @static
*/
static $_exportableFields = NULL;
* @throws CRM_Core_Exception
*
* @return CRM_Case_BAO_CaseType
- * @static
*/
public static function add(&$params) {
$caseTypeDAO = new CRM_Case_DAO_CaseType();
* The case-type defintion expressed as an array-tree.
* @return string
* XML
- * @static
*/
public static function convertDefinitionToXML($name, $definition) {
$xmlFile = '<?xml version="1.0" encoding="utf-8" ?>' . "\n\n<CaseType>\n";
*
* @return array
* the definition of the case-type, expressed as PHP array-tree
- * @static
*/
public static function convertXmlToDefinition($xml) {
// build PHP array based on definition
* Output values of the object.
*
* @return CRM_Case_BAO_CaseType|null the found object or null
- * @static
*/
public static function &getValues(&$params, &$values) {
$caseType = new CRM_Case_BAO_CaseType();
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Case_BAO_CaseType
- * @static
*/
public static function &create(&$params) {
$transaction = new CRM_Core_Transaction();
* in a hierarchical manner
*
* @return CRM_Case_BAO_CaseType
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$caseType = CRM_Case_BAO_CaseType::getValues($params, $defaults);
* @param CRM_Core_Form $form
*
* @return void
- * @static
*/
public static function buildSearchForm(&$form) {
$config = CRM_Core_Config::singleton();
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
// skip form rule if deleting
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($values, $files, $form) {
return TRUE;
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($values, $files, $form) {
return TRUE;
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($values, $files, $form) {
return TRUE;
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($values, $files, $form) {
$errors = array();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields, $files, $form) {
if ($form->_context == 'caseActivity') {
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($values, $files, $form) {
return TRUE;
* Posted values of the form.
*
* @return void
- * @static
*/
public static function formRule($fields) {
$errors = array();
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
public $_permission = NULL;
*
* @return array
* (reference) of action links
- * @static
*/
static
public function &links() {
/**
* Case statues
* @var array
- * @static
*/
static $caseStatus = array();
/**
* Redaction rules
* @var array
- * @static
*/
static $redactionRule;
/**
* Case type
* @var array
- * @static
*/
static $caseType = array();
/**
* Encounter Medium
* @var array
- * @static
*/
static $encounterMedium = array();
/**
* Activity type
* @var array
- * @static
*/
static $activityTypeList = array();
*
* @return array
* array reference of all case statues
- * @static
*/
public static function caseStatus($column = 'label', $onlyActive = TRUE, $condition = NULL, $fresh = FALSE) {
$cacheKey = "{$column}_" . (int) $onlyActive;
*
* @return array
* array reference of all redaction rules
- * @static
*/
public static function redactionRule($filter = NULL) {
*
* @return array
* array reference of all case type
- * @static
*/
public static function caseType($column = 'title', $onlyActive = TRUE) {
if ($onlyActive) {
*
* @return array
* array reference of all Encounter Medium.
- * @static
*/
public static function encounterMedium($column = 'label', $onlyActive = TRUE) {
$cacheKey = "{$column}_" . (int) $onlyActive;
*
* @param bool $all
*
- * @static
*
* @return array
* array reference of all activity types.
* Flush given pseudoconstant so it can be reread from db
* next time it's requested.
*
- * @static
*
* @param bool|string $name pseudoconstant to be flushed
*/
* This defines two actions- View and Edit.
*
* @var array
- * @static
*/
static $_links = NULL;
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
- * @static
*/
static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
- * @static
*/
static $_properties = array(
'contact_id',
* The task array
*
* @var array
- * @static
*/
static $_tasks = NULL;
* The optional task array
*
* @var array
- * @static
*/
static $_optionalTasks = NULL;
*
* @return array
* the set of tasks for a group of contacts
- * @static
*/
public static function &tasks() {
if (!self::$_tasks) {
*
* @return array
* the set of task titles
- * @static
*/
public static function &taskTitles() {
self::tasks();
*
* @return array
* the set of optional tasks for a group of contacts
- * @static
*/
public static function &optionalTaskTitle() {
$tasks = array();
*
* @return array
* the set of tasks for a group of contacts
- * @static
*/
public static function getTask($value) {
self::tasks();
* Static field for all the contact information that we can potentially import
*
* @var array
- * @static
*/
static $_importableFields = array();
* Static field for all the contact information that we can potentially export
*
* @var array
- * @static
*/
static $_exportableFields = NULL;
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Contact_BAO_Contact
- * @static
*/
public static function add(&$params) {
$contact = new CRM_Contact_DAO_Contact();
*
* @throws Exception
* @return CRM_Contact_BAO_Contact
- * @static
*/
public static function &create(&$params, $fixAddress = TRUE, $invokeHooks = TRUE, $skipDelete = FALSE) {
$contact = NULL;
*
* @return array
* the displayName and contactImage for this contact
- * @static
*/
public static function getDisplayAndImage($id, $type = FALSE) {
//CRM-14276 added the * on the civicrm_contact table so that we have all the contact info available
* True if we want to resolve the values in the reverse direction (value -> name).
*
* @return void
- * @static
*/
public static function resolveDefaults(&$defaults, $reverse = FALSE) {
// hack for birth_date
* For location in microformat.
*
* @return CRM_Contact_BAO_Contact
- * @static
*/
public static function &retrieve(&$params, &$defaults, $microformat = FALSE) {
if (array_key_exists('contact_id', $params)) {
*
* @return null|string
* display name of the contact if found
- * @static
*/
public static function displayName($id) {
$displayName = NULL;
*
* @return boolean
* true if contact deleted, false otherwise
- * @static
*/
public static function deleteContact($id, $restore = FALSE, $skipUndelete = FALSE) {
* i.e. is_delete = 0
*
* @return void
- * @static
*/
public static function contactTrashRestore($contact, $restore = FALSE) {
$op = ($restore ? 'restore' : 'trash');
* contact_type if $id found else null ""
*
*
- * @static
*/
public static function getContactType($id) {
return CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $id, 'contact_type');
* contact_sub_type if $id found else null ""
*
*
- * @static
*/
public static function getContactSubType($id, $implodeDelimiter = NULL) {
$subtype = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $id, 'contact_sub_type');
* @return array
*
*
- * @static
*/
public static function getContactTypes($id) {
$params = array('id' => $id);
*
* @return array
* array of importable Fields
- * @static
*/
static function importableFields(
$contactType = 'Individual',
*
* @return array
* array of exportable Fields
- * @static
*/
public static function &exportableFields($contactType = 'Individual', $status = FALSE, $export = FALSE, $search = FALSE, $withMultiRecord = FALSE) {
if (empty($contactType)) {
* Fields array.
*
* @return $values array contains the contact details
- * @static
*/
public static function getHierContactDetails($contactId, &$fields) {
$params = array(array('contact_id', '=', $contactId, 0, 0));
*
* @return array
* a hierarchical property tree if appropriate
- * @static
*/
public static function &makeHierReturnProperties($fields, $contactId = NULL) {
$locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id');
*
* @return int
* $locationType location_type_id
- * @static
*/
public static function getPrimaryLocationType($contactId, $skipDefaultPriamry = FALSE, $block = NULL) {
if ($block) {
*
* @return array
* Array of display_name, email if found, do_not_email or (null,null,null)
- * @static
*/
public static function getContactDetails($id) {
// check if the contact type
*
* @return int
* contact id created/edited
- * @static
*/
static function createProfileContact(
&$params,
*
* @return object
* $dao contact details
- * @static
*/
public static function &matchContactOnEmail($mail, $ctype = NULL) {
$strtolower = function_exists('mb_strtolower') ? 'mb_strtolower' : 'strtolower';
*
* @return object
* $dao contact details
- * @static
*/
public static function &matchContactOnOpenId($openId, $ctype = NULL) {
$strtolower = function_exists('mb_strtolower') ? 'mb_strtolower' : 'strtolower';
*
* @return string
* >email email address if present else null
- * @static
*/
public static function getPrimaryEmail($contactID) {
// fetch the primary email
*
* @return string
* >openid OpenID if present else null
- * @static
*/
public static function getPrimaryOpenId($contactID) {
// fetch the primary OpenID
* Output values of the object.
*
* @return CRM_Contact_BAO_Contact|null the found object or null
- * @static
*/
public static function getValues(&$params, &$values) {
$contact = new CRM_Contact_BAO_Contact();
*
* @return int
* total number in database
- * @static
*/
public static function getCountComponent($component, $contactId, $tableName = NULL) {
$object = NULL;
* Use default greeting values.
*
* @return void
- * @static
*/
public static function processGreetings(&$contact, $useDefaults = FALSE) {
if ($useDefaults) {
*
* @return array
* loc block ids which fulfill condition.
- * @static
*/
public static function getLocBlockIds($contactId, $criteria = array(), $condOperator = 'AND') {
$locBlockIds = array();
*
* @return array
* Array of context menu for logged in user.
- * @static
*/
public static function contextMenu($contactId = NULL) {
$menu = array(
*
* @return string|null
* the found display name or null.
- * @static
*/
public static function getMasterDisplayName($masterAddressId = NULL, $contactId = NULL) {
$masterDisplayName = NULL;
*
* @link https://issues.civicrm.org/jira/browse/CRM-15602
* @see triggerInfo
- * @static
*/
public static function generateTimestampTriggers(&$info, $reqTableName, $relatedTableNames, $contactRefColumn) {
// Safety
*
* @return bool
* true if present else false.
- * @static
*/
public static function checkDomainContact($contactId) {
if (!$contactId)
*
* @return array
* Array of display_name, email, location type and location id if found, or (null,null,null, null)
- * @static
*/
public static function getEmailDetails($id, $isPrimary = TRUE, $locationTypeID = NULL) {
$primaryClause = NULL;
*
* @return array
* tuple of display_name and sms if found, or (null,null)
- * @static
*/
public static function getPhoneDetails($id, $type = NULL) {
if (!$id) {
*
* @return null|string
* display name of the contact if found
- * @static
*/
public static function &getMapInfo($ids, $locationTypeID = NULL, $imageUrlOnly = FALSE) {
$idString = ' ( ' . implode(',', $ids) . ' ) ';
*
* @return boolean
* true if the user has permission, false otherwise
- * @static
*/
public static function allow($id, $type = CRM_Core_Permission::VIEW) {
$tables = array();
* Should we force a recompute.
*
* @return void
- * @static
*/
public static function cache($userID, $type = CRM_Core_Permission::VIEW, $force = FALSE) {
static $_processed = array();
* Contact id.
*
* @return boolean
- * @static
*/
static function hasContactsInCache(
$type = CRM_Core_Permission::VIEW,
* @return bool
* true if logged in user has permission to view
* selected contact record else false
- * @static
*/
public static function relationship($selectedContactID, $contactID = NULL) {
$session = CRM_Core_Session::singleton();
* If profile overlay class should be added.
*
* @return string
- * @static
*/
public static function getImage($contactType, $urlOnly = FALSE, $contactId = NULL, $addProfileOverlay = TRUE) {
static $imageInfo = array();
* @return bool
* true if mix contact array else false
*
- * @static
*/
public static function checkContactType(&$contactIds) {
if (empty($contactIds)) {
*
* @return array
* ( $cs, $ts, $live )
- * @static
*/
public static function generateChecksum($entityId, $ts = NULL, $live = NULL, $hash = NULL, $entityType = 'contact', $hashSize = NULL) {
// return a warning message if we dont get a entityId
*
* @return boolean
* true if valid, else false
- * @static
*/
public static function validChecksum($contactID, $inputCheck) {
*
* @return int
* max locations for the contact
- * @static
*/
public static function maxLocations($contactId) {
$contactLocations = array();
* @param int $previousEmployerID
* @param bool $newContact
*
- * @static
*/
public static function createCurrentEmployerRelationship($contactID, $organization, $previousEmployerID = NULL, $newContact = FALSE) {
//if organization name is passed. CRM-15368,CRM-15547
* @param int $previousEmpID
*
* @throws CiviCRM_API3_Exception
- * @static
*/
public static function currentEmployerRelatedMembership($contactID, $employerID, $relationshipParams, $duplicate = FALSE, $previousEmpID = NULL) {
$ids = array();
* @param string $title
* fieldset title.
*
- * @static
*/
public static function buildOnBehalfForm(&$form, $contactType, $countryID, $stateID, $title) {
*
* @return array
* returns array with links to contact view
- * @static
*/
public static function formatContactIDSToLinks($contactIDs, $addViewLink = TRUE, $addEditLink = TRUE, $originalId = NULL) {
$contactLinks = array();
*
* @return array
* array of contact info.
- * @static
*/
public static function contactDetails($componentIds, $componentName, $returnProperties = array()) {
$contactDetails = array();
* This is associated array which contains submitted form values.
*
* @return void
- * @static
*/
public static function processSharedAddress(&$address) {
if (!is_array($address)) {
*
* @return array
* associated array of contact names
- * @static
*/
public static function getAddressShareContactNames(&$addresses) {
$contactNames = array();
* The contactID that was edited / deleted.
*
* @return void
- * @static
*/
public static function clearContactCaches($contactID = NULL) {
// clear acl cache if any.
* @param string $className
*
* @return void
- * @static
*/
public static function processGreetingTemplate(&$templateString, $contactDetails, $contactID, $className) {
CRM_Utils_Token::replaceGreetingTokens($templateString, $contactDetails, $contactID, $className, TRUE);
*
* @return CRM_Contact_BAO_ContactType|null
* object on success, null otherwise
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$contactType = new CRM_Contact_DAO_ContactType();
*
* @return array
* Array of basic contact types information.
- * @static
*/
public static function &basicTypeInfo($all = FALSE) {
static $_cache = NULL;
*
* @return array
* Array of basic contact types
- * @static
*/
public static function basicTypes($all = FALSE) {
return array_keys(self::basicTypeInfo($all));
*
* @return array
* Array of sub type information
- * @static
*/
public static function &subTypeInfo($contactType = NULL, $all = FALSE, $ignoreCache = FALSE, $reset = FALSE) {
static $_cache = NULL;
* @return array
* all subtypes OR list of subtypes associated to
* a given basic contact type
- * @static
*/
public static function subTypes($contactType = NULL, $all = FALSE, $columnName = 'name', $ignoreCache = FALSE) {
if ($columnName == 'name') {
*
* @return array
* list of subtypes with name as 'subtype-name' and 'label' as value
- * @static
*/
public static function subTypePairs($contactType = NULL, $all = FALSE, $labelPrefix = '- ', $ignoreCache = FALSE) {
$subtypes = self::subTypeInfo($contactType, $all, $ignoreCache);
*
* @return array
* Array of basic types + all subtypes.
- * @static
*/
public static function contactTypes($all = FALSE) {
return array_keys(self::contactTypeInfo($all));
*
* @return array
* Array of basic types + all subtypes.
- * @static
*/
public static function contactTypeInfo($all = FALSE, $reset = FALSE) {
static $_cache = NULL;
*
* @return array
* Array of basictypes with name as 'built-in name' and 'label' as value
- * @static
*/
public static function contactTypePairs($all = FALSE, $typeName = NULL, $delimiter = NULL) {
$types = self::contactTypeInfo($all);
*
* @return boolean
* true if subType, false otherwise.
- * @static
*/
public static function isaSubType($subType, $ignoreCache = FALSE) {
return in_array($subType, self::subTypes(NULL, TRUE, 'name', $ignoreCache));
*
* @param array /string $subType contact subType.
* @return array/string of basicTypes.
- * @static
*/
public static function getBasicType($subType) {
static $_cache = NULL;
*
* @return array
* Array of suppressed subTypes.
- * @static
*/
public static function suppressSubTypes(&$subTypes, $ignoreCache = FALSE) {
$subTypes = array_diff($subTypes, self::subTypes(NULL, TRUE, 'name', $ignoreCache));
*
* @return boolean
* true if contact extends, false otherwise.
- * @static
*/
public static function isExtendsContactType($subType, $contactType, $ignoreCache = FALSE, $columnName = 'name') {
if (!is_array($subType)) {
*
* @return array
* of contactTypes
- * @static
*/
public static function getCreateNewList() {
$shortCuts = array();
* ID of the Contact Subtype to be deleted.
*
* @return bool
- * @static
*/
public static function del($contactTypeId) {
* An assoc array of name/value pairs.
*
* @return object
- * @static
*/
public static function add(&$params) {
*
* @return Object
* DAO object on success, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
$params = array('id' => $id);
* Subtype.
*
* @return boolean
- * @static
*/
public static function isAllowEdit($contactId, $subType = NULL) {
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Contact_BAO_Group
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$group = new CRM_Contact_DAO_Group();
* Group id.
*
* @return NULL
- * @static
*/
public static function discard($id) {
CRM_Utils_Hook::pre('delete', 'Group', $id, CRM_Core_DAO::$_nullArray);
*
* @return array
* this array contains the list of members for this group id
- * @static
*/
public static function &getMember($groupID, $useCache = TRUE) {
$params = array(array('group', 'IN', array($groupID => 1), 0, 0));
*
* @return string
* the permission that the user has (or NULL)
- * @static
*/
public static function checkPermission($id) {
$allGroups = CRM_Core_PseudoConstant::allGroup();
*
* @return CRM_Contact_BAO_Group|NULL
* The new group BAO (if created)
- * @static
*/
public static function &create(&$params) {
*
* @return CRM_Contact_BAO_Group|NULL
* The new group BAO (if created)
- * @static
*/
public static function createSmartGroup(&$params) {
if (!empty($params['formValues'])) {
*
* @return CRM_Core_DAO|null
* DAO object on success, NULL otherwise
- * @static
*/
public static function setIsActive($id, $isActive) {
return CRM_Core_DAO::setFieldValue('CRM_Contact_DAO_Group', $id, 'is_active', $isActive);
* @param bool $excludeHidden exclude hidden groups.
*
* @return string
- * @static
*/
public static function groupTypeCondition($groupType = NULL, $excludeHidden = TRUE) {
$value = NULL;
*
* @return array
* ( smartGroupId, ssId ) smart group id and saved search id
- * @static
*/
public static function createHiddenSmartGroup($params) {
$ssId = CRM_Utils_Array::value('saved_search_id', $params);
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Contact_BAO_Group
- * @static
*/
public static function add(&$params) {
* (reference ) an assoc array of name/value pairs.
*
* @return boolean
- * @static
*/
public static function dataExists(&$params) {
// return if no data present
*
* @return array
* (reference) the values that could be potentially assigned to smarty
- * @static
*/
public static function getValues(&$params, &$values) {
if (empty($params)) {
*
* @return array
* (total, added, notAdded) count of contacts added to group
- * @static
*/
static function addContactsToGroup(
$contactIds,
*
* @return array
* (total, removed, notRemoved) count of contacts removed to group
- * @static
*/
static function removeContactsFromGroup(
&$contactIds,
*
* @return array
* this array has key-> group id and value group title
- * @static
*/
public static function getGroupList($contactId = 0, $visibility = FALSE) {
$group = new CRM_Contact_DAO_Group();
*
* @return object
* of group contact
- * @static
*/
public static function getMembershipDetail($contactId, $groupID, $method = 'Email') {
$leftJoin = $where = $orderBy = NULL;
*
*
* @return groupID
- * @static
*/
public static function getGroupId($groupContactID) {
$dao = new CRM_Contact_DAO_GroupContact();
* @param string $method
*
* @return void
- * @static
*/
public static function create(&$params, $contactId, $visibility = FALSE, $method = 'Admin') {
$contactIds = array();
*
* @return void
*
- * @static
*/
public static function mergeGroupContact($mainContactId, $otherContactId) {
$params = array(
*
* @return array
* (total, added, notAdded) count of contacts added to group
- * @static
*/
static function bulkAddContactsToGroup(
$contactIDs,
*
* @return string
* the sql query which lists the groups that need to be refreshed
- * @static
*/
public static function groupRefreshedClause($groupIDClause = NULL, $includeHiddenGroups = FALSE) {
$smartGroupCacheTimeout = self::smartGroupCacheTimeout();
*
* @return string
* the sql query which lists the groups that need to be refreshed
- * @static
*/
public static function shouldGroupBeRefreshed($groupID, $includeHiddenGroups = FALSE) {
$query = self::groupRefreshedClause("g.id = %1", $includeHiddenGroups);
* run the function exactly once for all groups.
*
* @return void
- * @static
*/
public static function remove($groupID = NULL, $onceOnly = TRUE) {
static $invoked = FALSE;
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Contact_DAO_GroupOrganization
- * @static
*/
public static function add(&$params) {
$formattedValues = array();
* (reference ) an assoc array of name/value pairs.
*
* @return void
- * @static
*/
public static function formatValues(&$params, &$formatedValues) {
if (!empty($params['group_organization'])) {
* (reference ) an assoc array of name/value pairs.
*
* @return boolean
- * @static
*/
public static function dataExists($params) {
// return if no data present
* @param int $contactID
*
* @return boolean
- * @static
*/
public static function hasGroupAssociated($contactID) {
$orgID = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_GroupOrganization',
*
* @return Object
* DAO object on success
- * @static
*/
public static function updatePrimaryContact($primaryContactId, $contactId) {
$queryString = "UPDATE civicrm_contact
* Contact object.
*
* @return CRM_Contact_BAO_Contact
- * @static
*/
public static function format(&$params, &$contact) {
if (!self::dataExists($params)) {
* (reference ) an assoc array of name/value pairs.
*
* @return boolean
- * @static
*/
public static function dataExists(&$params) {
if ($params['contact_type'] == 'Individual') {
* The default set of return properties
*
* @var array
- * @static
*/
static $_defaultReturnProperties = NULL;
* The default set of hier return properties
*
* @var array
- * @static
*/
static $_defaultHierReturnProperties;
* The relationship type direction
*
* @var array
- * @static
*/
static $_relType;
* The activity role
*
* @var array
- * @static
*/
static $_activityRole;
* during activity search.
*
* @var array
- * @static
*/
static $_considerCompActivities;
* during activity search.
*
* @var array
- * @static
*/
static $_withContactActivitiesOnly;
* Track open panes, useful in advance search
*
* @var array
- * @static
*/
public static $_openedPanes = array();
* The tables which have a dependency on location and/or address
*
* @var array
- * @static
*/
static $_dependencies = array(
'civicrm_state_province' => 1,
* @param bool $strict
*
* @return string
- * @static
*/
public static function getWhereClause($params, $fields, &$tables, &$whereTables, $strict = FALSE) {
$query = new CRM_Contact_BAO_Query($params, NULL, $fields,
*
* @return string
* the from clause
- * @static
*/
public static function fromClause(&$tables, $inner = NULL, $right = NULL, $primaryLocation = TRUE, $mode = 1) {
* @return bool|array
* false if string does not match the pattern
* array of numeric values if string does match the pattern
- * @static
*/
public static function parseSearchBuilderString($string, $dataType = 'Integer') {
$string = trim($string);
* Singleton function used to manage this object
*
* @return object
- * @static
*/
public static function singleton() {
static $singleton = NULL;
* "we are moving away from the $ids param "
*
* @return CRM_Contact_BAO_Relationship
- * @static
*/
public static function createMultiple(&$params, $ids = array()) {
$valid = $invalid = $duplicate = $saved = 0;
* The array that holds all the db ids.
*
* @return CRM_Contact_BAO_Relationship
- * @static
*/
public static function add(&$params, $ids = array(), $contactId = NULL) {
$relationshipId =
*
* @return array
* array of defaults for creating relationship
- * @static
*/
public static function getdefaults() {
return array(
* (reference ) an assoc array of name/value pairs.
*
* @return boolean
- * @static
*/
public static function dataExists(&$params) {
// return if no data present
* If set only subtype which is passed by $contactSubType.
* related relationshiptypes get return
*
- * @static
*
* @return array
* array reference of all relationship types with context to current contact.
*
* @return null
*
- * @static
*/
public static function del($id) {
// delete from relationship table
* @param $action
*
* @return null
- * @static
*/
public static function disableEnableRelationship($id, $action) {
$relationship = self::clearCurrentEmployer($id, $action);
* Id of the contact to delete.
*
* @return void
- * @static
*/
public static function deleteContact($contactId) {
$relationship = new CRM_Contact_DAO_Relationship();
* $returns returns the contact ids in the realtionship
*
* @return \CRM_Contact_DAO_Relationship
- * @static
*/
public static function getContactIds($id) {
$relationship = new CRM_Contact_DAO_Relationship();
*
* @return boolean
* true if it is valid relationship else false
- * @static
*/
public static function checkRelationshipType($contact_a, $contact_b, $relationshipTypeId) {
$relationshipType = new CRM_Contact_DAO_RelationshipType();
*
* @return string
* @access public
- * @static
*/
public static function checkValidRelationship($params, $ids, $contactId) {
$errors = '';
*
* @return boolean
* true if record exists else false
- * @static
*/
public static function checkDuplicateRelationship(&$params, $id, $contactId = 0, $relationshipId = 0) {
$relationshipTypeId = CRM_Utils_Array::value('relationship_type_id', $params);
* @throws CiviCRM_API3_Exception
* @return Object
* DAO object on success, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
// as both the create & add functions have a bunch of logic in them that
*
* @return array
* (reference) the values that could be potentially assigned to smarty
- * @static
*/
public static function &getValues(&$params, &$values) {
if (empty($params)) {
* return string the query for this diretion
*
* @return array
- * @static
*/
public static function makeURLClause($contactId, $status, $numRelationship, $count, $relationshipId, $direction, $params = array()) {
$select = $from = $where = '';
* @param array $params
*
* @return array|int
- * @static
*/
static function getRelationship(
$contactId = NULL,
*
* @param bool $active
*
- * @static
*/
public static function relatedMemberships($contactId, &$params, $ids, $action = CRM_Core_Action::ADD, $active = TRUE) {
// Check the end date and set the status of the relationship
* Helper function to check whether to delete the membership or
* not.
*
- * @static
*/
public static function isDeleteRelatedMembership($relTypeIds, $contactId, $mainRelatedContactId, $relTypeId, $relIds) {
if (in_array($relTypeId, $relTypeIds)) {
*
* @return array
* array of the current employer
- * @static
*/
public static function getCurrentEmployer($contactIds) {
$contacts = implode(',', $contactIds);
* @param string $name
* employers sort name.
*
- * @static
*
* @return array
* array of employers.
* one or more relationship type id's.
* @param string $name
*
- * @static
*
* @return array
* Array of contacts
*
* @see CRM_Dedupe_Merger::cpTables()
*
- * @static
*/
public static function mergeRelationships($mainId, $otherId, &$sqls) {
// Delete circular relationships
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Contact_BAO_RelationshipType
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$relationshipType = new CRM_Contact_DAO_RelationshipType();
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Contact_DAO_RelationshipType', $id, 'is_active', $is_active);
* The array that holds all the db ids.
*
* @return CRM_Contact_DAO_RelationshipType
- * @static
*/
public static function add(&$params, &$ids) {
//to change name, CRM-3336
*
* @throws CRM_Core_Exception
* @return mixed
- * @static
*/
public static function del($relationshipTypeId) {
// make sure relationshipTypeId is an integer
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Contact_BAO_SavedSearch
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$savedSearch = new CRM_Contact_DAO_SavedSearch();
*
* @return array
* the values of the posted saved search
- * @static
*/
public static function &getFormValues($id) {
$fv = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_SavedSearch', $id, 'form_values');
*
* @return string
* the where clause for this saved search
- * @static
*/
public static function whereClause($id, &$tables, &$whereTables) {
$params = self::getSearchParams($id);
*
* @return string
* the name of the saved search
- * @static
*/
public static function getName($id, $value = 'name') {
$group = new CRM_Contact_DAO_Group();
*
* @return object
* $history The new history object
- * @static
*/
public static function &create(&$params) {
$history = new CRM_Contact_BAO_SubscriptionHistory();
* The contact id.
*
* @return void
- * @static
*/
public static function deleteContact($id) {
$history = new CRM_Contact_BAO_SubscriptionHistory();
*
* @return bool
* email/openId
- * @static
*/
public static function formRule($fields, &$errors, $contactId = NULL) {
$config = CRM_Core_Config::singleton();
*
* @return boolean
* true if data exists, false otherwise
- * @static
*/
public static function blockDataExists(&$fields) {
if (!is_array($fields)) {
*
* @return array
* as array of sucess/fails for each address block
- * @static
*/
public function parseAddress(&$params) {
$parseSuccess = $parsedFields = array();
*
* @return null|string
* $statusMsg string status message for all address blocks.
- * @static
*/
public static function parseAddressStatusMsg($parseResult) {
$statusMsg = NULL;
*
* @return string
* ordinal number for given number.
- * @static
*/
public static function ordinalNumber($number) {
if (empty($number)) {
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields) {
// check for state/country mapping
*
* @return void
*
- * @static
*/
public static function buildQuickForm(&$form, $addressBlockCount = NULL, $sharing = TRUE, $inlineEdit = FALSE) {
// passing this via the session is AWFUL. we need to fix this
* @return array|bool
* if no errors
*
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
* @param CRM_Core_Form $form
* Form object.
*
- * @static
*/
public static function setDefaultValues(&$defaults, &$form) {
$addressValues = array();
/**
* Greetings
* @var array
- * @static
*/
static $greetings = array();
* Reference to the form object.
*
* @return void
- * @static
*/
public static function buildQuickForm(&$form) {
// since the pcm - preferred comminication method is logically
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
//CRM-4575
* Reference to the form object.
*
* @return void
- * @static
*/
public static function buildQuickForm(&$form) {
if (!empty($form->_submitValues)) {
* Reference to the form object.
*
* @return void
- * @static
*/
public static function buildQuickForm(&$form) {
// radio button for gender
* Is it block edit.
*
* @return void
- * @static
*/
public static function buildQuickForm(&$form, $blockCount = NULL, $blockEdit = FALSE) {
// passing this via the session is AWFUL. we need to fix this
*
* @return array|bool
* $error
- * @static
*/
public static function formRule($fields, $files, $contactID = NULL) {
$errors = array();
* Is it block edit.
*
* @return void
- * @static
*/
public static function buildQuickForm(&$form, $blockCount = NULL, $blockEdit = FALSE) {
if (!$blockCount) {
*
* @return bool
* TRUE if no errors, else array of errors.
- * @static
*/
public static function formRule($fields, $files, $contactID = NULL) {
$errors = array();
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $contactID = NULL) {
$errors = array();
* build form elements
* params object $form object of the form
*
- * @static
*/
public static function buildQuickForm(&$form) {
$form->applyFilter('__ALL__', 'trim');
* Is it block edit.
*
* @return void
- * @static
*/
public static function buildQuickForm(&$form, $blockCount = NULL, $blockEdit = FALSE) {
if (!$blockCount) {
* Is it block edit.
*
* @return void
- * @static
*/
public static function buildQuickForm(&$form, $addressBlockCount = NULL, $blockEdit = FALSE) {
// passing this via the session is AWFUL. we need to fix this
*
* @param string $groupElementType
*
- * @static
*/
static function buildQuickForm(
&$form,
* @param string $groupElementType
*
* @return void
- * @static
*/
public static function setDefaults($id, &$defaults, $type = self::ALL, $fieldName = NULL, $groupElementType = 'checkbox') {
$type = (int ) $type;
* Block number to build.
*
* @return void
- * @static
*/
public static function buildQuickForm(&$form, $blockCount = NULL) {
if (!$blockCount) {
* List of errors to be posted back to the form.
*
* @return array
- * @static
*/
public static function formRule($fields, $errors) {
$hasData = $hasPrimary = $errors = array();
* List of errors to be posted back to the form.
*
* @return array
- * @static
*/
public static function formRule($fields, $errors) {
$hasData = $hasPrimary = $errors = array();
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $contactID = NULL) {
$errors = array();
* List of errors to be posted back to the form.
*
* @return array
- * @static
*/
public static function formRule($fields, $errors) {
$hasData = $hasPrimary = $errors = array();
* List of errors to be posted back to the form.
*
* @return array
- * @static
*/
public static function formRule($fields, $errors) {
$hasData = $hasPrimary = $errors = array();
*
* @param CRM_Core_Form $form
*
- * @static
*/
public static function buildQuickForm(&$form) {
$ufGroup = new CRM_Core_DAO_UFGroup();
*
* @return bool|array
* mixed true or array of errors
- * @static
*/
public static function dateRule($params) {
$errors = array();
* list of valid contexts
*
* @var array
- * @static
*/
static $_validContext = NULL;
* List of values used when we want to display other objects
*
* @var array
- * @static
*/
static $_modeValues = NULL;
* Csv - common search values
*
* @var array
- * @static
*/
static $csv = array('contact_type', 'group', 'tag');
*
* @return array
* the valid context set and the titles
- * @static
*/
public static function &validContext() {
if (!(self::$_validContext)) {
* csv - common search values
*
* @var array
- * @static
*/
static $csv = array('contact_type', 'group', 'tag');
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($values, $files, $self) {
if (!empty($values['addMore']) || !empty($values['addBlock'])) {
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($params) {
$errors = array();
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields) {
$errors = array();
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
// CRM-12929
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields) {
if (CRM_Core_BAO_UFField::checkProfileType($fields['uf_group_id'])) {
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $form) {
$errors = array();
/**
* Validation Rule
*
- * @static
*/
public static function usernameRule($params) {
$config = CRM_Core_Config::singleton();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields) {
$errors = array();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
* @param string $errorMessage
* A string containing all the error-fields, where the new errorName is concatenated.
*
- * @static
*/
public static function addToErrorMsg($errorName, &$errorMessage) {
if ($errorMessage) {
* Type of date.
* @param string $dateParam
* Index of params.
- * @static
*/
public function formatCustomDate(&$params, &$formatted, $dateType, $dateParam) {
//fix for CRM-2687
* Array of formatted data.
* @param array $contactFields
* Contact DAO fields.
- * @static
*/
public function formatCommonData($params, &$formatted, &$contactFields) {
$csType = array(
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
*
* @return array
* (reference) of action links
- * @static
*/
public static function &links() {
*
*
* @return void
- * @static
*/
public function run() {
$this->preProcess();
* The action links for notes that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The action links for comments that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_commentLinks = NULL;
*
* @return array
* (reference) of action links
- * @static
*/
public static function &links() {
if (!(self::$_links)) {
*
* @return array
* (reference) of action links
- * @static
*/
public static function &commentLinks() {
if (!(self::$_commentLinks)) {
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
*
* @return array
* (reference) of action links
- * @static
*/
public static function &links() {
if (!(self::$_links)) {
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
*
* @return array
* (reference) of action links
- * @static
*/
static
public function &links() {
* This defines two actions- View and Edit.
*
* @var array
- * @static
*/
static $_links = NULL;
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
- * @static
*/
static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
- * @static
*/
static $_properties = array(
'contact_id',
* This defines two actions- View and Edit.
*
* @var array
- * @static
*/
static $_links = NULL;
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
- * @static
*/
static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
- * @static
*/
static $_properties = array('contact_id', 'contact_type', 'display_name');
* The task array
*
* @var array
- * @static
*/
static $_tasks = NULL;
* The optional task array
*
* @var array
- * @static
*/
static $_optionalTasks = NULL;
*
* @return array
* the set of tasks for a group of contacts
- * @static
*/
public static function &taskTitles() {
self::initTasks();
*
* @return array
* the set of optional tasks for a group of contacts
- * @static
*/
public static function &optionalTaskTitle() {
$tasks = array(
* Static field for all the contribution information that we can potentially import
*
* @var array
- * @static
*/
static $_importableFields = NULL;
* Static field for all the contribution information that we can potentially export
*
* @var array
- * @static
*/
static $_exportableFields = NULL;
* The array that holds all the db ids.
*
* @return CRM_Contribute_BAO_Contribution
- * @static
*/
public static function add(&$params, $ids = array()) {
if (empty($params)) {
* The array that holds all the db ids.
*
* @return CRM_Contribute_BAO_Contribution|null the found object or null
- * @static
*/
public static function &getValues($params, &$values, &$ids) {
if (empty($params)) {
* The array that holds all the db ids.
*
* @return CRM_Contribute_BAO_Contribution
- * @static
*/
public static function create(&$params, $ids = array()) {
$dateFields = array('receive_date', 'cancel_date', 'receipt_date', 'thankyou_date');
* True if we want to resolve the values in the reverse direction (value -> name).
*
* @return void
- * @static
*/
public static function resolveDefaults(&$defaults, $reverse = FALSE) {
self::lookupValue($defaults, 'financial_type', CRM_Contribute_PseudoConstant::financialType(), $reverse);
* (reference) the array that holds all the db ids.
*
* @return CRM_Contribute_BAO_Contribution
- * @static
*/
public static function retrieve(&$params, &$defaults, &$ids) {
$contribution = CRM_Contribute_BAO_Contribution::getValues($params, $defaults, $ids);
*
* @return array
* array of importable Fields
- * @static
*/
public static function &importableFields($contactType = 'Individual', $status = TRUE) {
if (!self::$_importableFields) {
* @return mixed|null
* $results no of deleted Contribution on success, false otherwise
* @access public
- * @static
*/
public static function deleteContribution($id) {
CRM_Utils_Hook::pre('delete', 'Contribution', $id, CRM_Core_DAO::$_nullArray);
*
* @return boolean
* true if duplicate, false otherwise
- * @static
*/
public static function checkDuplicate($input, &$duplicates, $id = NULL) {
if (!$id) {
* (reference) an assoc array of name/value pairs.
*
* @return CRM_Contribute_DAO_ContributionProduct
- * @static
*/
public static function addPremium(&$params) {
$contributionProduct = new CRM_Contribute_DAO_ContributionProduct();
*
* @return array
* the list of contribution fields
- * @static
*/
public static function getContributionFields($addExtraFields = TRUE) {
$contributionFields = CRM_Contribute_DAO_Contribution::export();
/**
* Add extra fields specific to contribtion
*
- * @static
*/
public static function getSpecialContributionFields() {
$extraFields = array(
* @return array
* list of contribution fields
*
- * @static
*/
public static function getHonorContacts($honorId) {
$params = array();
*
* @return null|string
* sort name of the contact if found
- * @static
*/
public static function sortName($id) {
$id = CRM_Utils_Type::escape($id, 'Integer');
*
* @return array
* contribution id if success else NULL
- * @static
*/
public static function checkDuplicateIds($params) {
$dao = new CRM_Contribute_DAO_Contribution();
* @return array
* associated array
*
- * @static
*/
public static function getContributionDetails($exportMode, $componentIds) {
$paymentDetails = array();
*
* @return int
* address id
- * @static
*/
public static function createAddress(&$params, $billingLocationTypeID) {
$billingFields = array(
* @param int $contributionId
* @param int $contactId
*
- * @static
*/
public static function deleteAddress($contributionId = NULL, $contactId = NULL) {
$clauses = array();
*
* @return int
* pending contribution id.
- * @static
*/
public static function checkOnlinePendingContribution($componentId, $componentName) {
$contributionId = NULL;
/**
* @return array
- * @static
*/
public static function getContributionDates() {
$config = CRM_Core_Config::singleton();
* @param bool $isNotCancelled
*
* @return boolean
- * @static
*/
public static function isCancelSubscriptionSupported($contributionId, $isNotCancelled = TRUE) {
$cacheKeyString = "$contributionId";
*
* @return string
* contribution status
- * @static
*/
public static function isSubscriptionCancelled($contributionId) {
$sql = "
* @param array $financialTrxnValues
*
* @return null|object
- * @static
*/
public static function recordFinancialAccounts(&$params, $financialTrxnValues = NULL) {
$skipRecords = $update = $return = $isRelatedId = FALSE;
*
* @param null $skipTrxn
*
- * @static
*/
public static function updateFinancialAccounts(&$params, $context = NULL, $skipTrxn = NULL) {
$itemAmount = $trxnID = NULL;
* List of errors.
*
* @return bool
- * @static
*/
public static function checkStatusValidation($values, &$fields, &$errors) {
if (CRM_Utils_System::isNull($values) && !empty($fields['id'])) {
* @param int $contactId
* Contact id.
*
- * @static
*/
public static function deleteContactContribution($contactId) {
$contribution = new CRM_Contribute_DAO_Contribution();
* @param string $relationName
*
* @return array|bool
- * @static
*/
public static function validateFinancialType($financialTypeId, $relationName = 'Expense Account is') {
$expenseTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE '{$relationName}' "));
* @return array
* associated array
*
- * @static
*/
static function processConfirm(
&$form,
* @return array
* associated array
*
- * @static
*/
public static function contributionChartMonthly($param) {
if ($param) {
* @return array
* associated array
*
- * @static
*/
public static function contributionChartYearly() {
$config = CRM_Core_Config::singleton();
* @return array
* array of tax amount
*
- * @static
*/
public static function calculateTaxAmount($amount, $taxRate) {
$taxAmount = array();
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Contribute_DAO_ContributionPage
- * @static
*/
public static function &create(&$params) {
$financialTypeId = NULL;
*
* @return Object
* DAO object on success, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Contribute_DAO_ContributionPage', $id, 'is_active', $is_active);
* @param null $fieldTypes
*
* @return void
- * @static
*/
public static function sendMail($contactID, $values, $isTest = FALSE, $returnMessageText = FALSE, $fieldTypes = NULL) {
$gIds = $params = array();
* @param bool|object $autoRenewMembership is it a auto renew membership.
*
* @return void
- * @static
*/
public static function recurringNotify($type, $contactID, $pageID, $recur, $autoRenewMembership = FALSE) {
$value = array();
* @param null $fieldTypes
*
* @return void
- * @static
*/
public static function buildCustomDisplay($gid, $name, $cid, &$template, &$params, $fieldTypes = NULL) {
if ($gid) {
* The contribution page id to copy.
*
* @return CRM_Contribute_DAO_ContributionPage
- * @static
*/
public static function copy($id) {
$fieldsFix = array(
* true if payment processor supports recurring
* else false
*
- * @static
*/
public static function checkRecurPaymentProcessor($contributionPageId) {
//FIXME
* @param array $contribPageIds
* @return array
* info regarding all sections.
- * @static
*/
public static function getSectionInfo($contribPageIds = array()) {
$info = array();
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Contribute_BAO_Contribution
- * @static
* @todo move hook calls / extended logic to create - requires changing calls to call create not add
*/
public static function add(&$params) {
*
* @return boolean
* true if duplicate, false otherwise
- * @static
*/
public static function checkDuplicate($params, &$duplicates) {
$id = CRM_Utils_Array::value('id', $params);
*
* @return array
* an array of recurring ids count
- * @static
*/
public static function getCount(&$ids) {
$recurID = implode(',', $ids);
* @param int $recurId
*
* @return bool
- * @static
*/
public static function deleteRecurContribution($recurId) {
$result = FALSE;
* @param array $activityParams
*
* @return bool
- * @static
*/
public static function cancelRecurContribution($recurId, $objects, $activityParams = array()) {
if (!$recurId) {
* @return array
* list of recurring contribution fields
*
- * @static
*/
public static function getRecurContributions($contactId) {
$params = array();
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Contribute_BAO_ContributionSoft
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$contributionSoft = new CRM_Contribute_DAO_ContributionSoft();
*
* @param array $params
*
- * @static
*/
public static function del($params) {
//delete from contribution soft table
*
* @return array
* Array of soft contribution ids, amounts, and associated contact ids
- * @static
*/
public static function getSoftContribution($contributionID, $all = FALSE) {
$pcpFields = array(
* Additional filter criteria, later used in where clause.
*
* @return array
- * @static
*/
public static function getSoftContributionList($contact_id, $filter = NULL, $isTest = 0) {
$query = '
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Contribute_BAO_ManagePremium
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$premium = new CRM_Contribute_DAO_Product();
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
if (!$is_active) {
* @param array $ids
* Reference array contains the id.
*
- * @static
*
* @return object
*/
* Delete premium Types
*
* @param int $productID
- * @static
*/
public static function del($productID) {
/**
* Product information
* @var array
- * @static
*/
private static $productInfo;
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Contribute_BAO_ManagePremium
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$premium = new CRM_Contribute_DAO_Product();
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Contribute_DAO_Premium', $id, 'premiums_active ', $is_active);
*
* @param int $premiumID
*
- * @static
*/
public static function del($premiumID) {
//check dependencies
* @param int $selectedProductID
* @param null $selectedOption
*
- * @static
*/
public static function buildPremiumBlock(&$form, $pageID, $formItems = FALSE, $selectedProductID = NULL, $selectedOption = NULL) {
$form->add('hidden', "selectProduct", $selectedProductID, array('id' => 'selectProduct'));
* @param int $productID
* @param int $premiumProductID
*
- * @static
*/
public function buildPremiumPreviewBlock($form, $productID, $premiumProductID = NULL) {
if ($premiumProductID) {
*
* @param int $contributionPageID
*
- * @static
*/
public static function deletePremium($contributionPageID) {
if (!$contributionPageID) {
*
* @return array
* product and option arrays
- * @static
*/
public static function getPremiumProductInfo() {
if (!self::$productInfo) {
* Static field for all the export/import contribution fields
*
* @var array
- * @static
*/
static $_contributionFields = NULL;
*
* @return array
* self::$_contributionFields associative array of contribution fields
- * @static
*/
public static function &getFields() {
if (!self::$_contributionFields) {
* @param CRM_Core_Form $form
*
* @return void
- * @static
*/
public static function buildSearchForm(&$form) {
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
* @param object $contribution
* Contribution object.
*
- * @static
*/
public static function processPcpSoft(&$params, &$contribution) {
//add soft contribution due to pcp or Submit Credit / Debit Card Contribution by admin.
* @param array $params
*
* @return array
- * @static
*/
public static function processPcp(&$page, $params) {
$params['pcp_made_through_id'] = $page->_pcpId;
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
*
* @param CRM_Core_Form $form
*
- * @static
*/
public static function buildQuickForm(&$form) {
$form->assign('fieldSetTitle', ts('Organization Details'));
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $contributionPageId) {
$errors = array();
*
* @return bool|array
* mixed true or array of errors
- * @static
*/
public static function formRule($params) {
$errors = array();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($values, $files, $self) {
$errors = array();
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $options) {
$errors = array();
*
* @return bool|array
* mixed true or array of errors
- * @static
*/
public static function formRule($params, $files, $self) {
$errors = array();
*
* @return bool|array
* mixed true or array of errors
- * @static
*/
public static function formRule($params, $files) {
if (isset($params['imageOption'])) {
*
* @return array
* Array of errors
- * @static
*/
public static function formRule($fields, $errors, $self) {
$errors = array();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($values) {
$errors = array();
* Contact Id.
* @param CRM_Core_Form $form
* Form object.
- * @static
*/
public static function printPDF($contribIDs, &$params, $contactIds, &$form) {
// get all the details needed to generate a invoice
* @param array $params
* For invoices.
*
- * @static
*/
static public function addActivities($subject, $contactIds, $fileName, $params) {
$session = CRM_Core_Session::singleton();
* @return array
* array of common elements
*
- * @static
*/
static public function getElements($contribIds, $params, $contactIds) {
$pdfElements = array();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields) {
return TRUE;
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields) {
$seen = $errors = array();
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
*
* @param mixed $action
* Unused parameter.
- * @static
*/
public function browse($action = NULL) {
$this->_sortByCharacter = CRM_Utils_Request::retrieve('sortByCharacter',
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
*
*
* @return void
- * @static
*/
public function browse() {
// get all custom groups sorted by weight
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
/**
* @return void
- * @static
*/
public function browse() {
// get all custom groups sorted by weight
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
static $_recurLinks = NULL;
/**
* Financial types
* @var array
- * @static
*/
private static $financialType;
/**
* Financial types
* @var array
- * @static
*/
private static $financialTypeAccount;
/**
* Financial types
* @var array
- * @static
*/
private static $financialAccount;
/**
* Contribution pages
* @var array
- * @static
*/
private static $contributionPageActive = NULL;
/**
* Contribution pages
* @var array
- * @static
*/
private static $contributionPageAll = NULL;
* Payment instruments
*
* @var array
- * @static
*/
private static $paymentInstrument;
* Contribution status
*
* @var array
- * @static
*/
private static $contributionStatus;
/**
* Personal campaign pages
* @var array
- * @static
*/
private static $pcPage;
/**
* Status of personal campaign page
* @var array
- * @static
*/
private static $pcpStatus;
/**
* Contribution / financial batches
* @var array
- * @static
*/
private static $batch;
*
* @return array
* array reference of all financial types if any
- * @static
*/
public static function &financialType($id = NULL) {
if (!self::$financialType) {
*
* @return array
* array reference of all financial accounts if any
- * @static
*/
public static function &financialAccount($id = NULL, $financialAccountTypeId = NULL, $retrieveColumn = 'name', $key = 'id') {
$condition = NULL;
* Flush given pseudoconstant so it can be reread from db
* nex time it's requested.
*
- * @static
*
* @param bool|string $name pseudoconstant to be flushed
*/
*
* @return array
* array reference of all contribution pages if any
- * @static
*/
public static function &contributionPage($id = NULL, $all = FALSE) {
if ($all) {
*
* @return array
* array reference of all payment instruments if any
- * @static
*/
public static function &paymentInstrument($columnName = 'label') {
if (!isset(self::$paymentInstrument[$columnName])) {
*
* @return array
* array reference of all payment instruments if any
- * @static
*/
public static function &creditCard() {
return CRM_Core_OptionGroup::values('accept_creditcard', FALSE, FALSE, FALSE, NULL, 'label', TRUE, FALSE, 'name');
* @param int $pageID
* @return array
* array of all Premiums if any
- * @static
*/
public static function products($pageID = NULL) {
$products = array();
* @param string $columnName
* @return array
* array reference of all contribution statuses
- * @static
*/
public static function &contributionStatus($id = NULL, $columnName = 'label') {
$cacheKey = $columnName;
*
* @return array
* array reference of all pcp if any
- * @static
*/
public static function &pcPage($pageType = NULL, $id = NULL) {
if (!isset(self::$pcPage[$pageType])) {
*
* The static array pcpStatus is returned
*
- * @static
*
* @param string $column
* @return array
*
* The static array $financialTypeAccount is returned
*
- * @static
*
* @param int $financialTypeId
* @param int $relationTypeId
* @param int $id
* @return array
* array reference of all batches if any
- * @static
*/
public static function &batch($id = NULL) {
if (!self::$batch) {
* This defines two actions- View and Edit.
*
* @var array
- * @static
*/
static $_links = NULL;
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
- * @static
*/
static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
- * @static
*/
static $_properties = array(
'contact_id',
* The task array
*
* @var array
- * @static
*/
static $_tasks = NULL;
* The optional task array
*
* @var array
- * @static
*/
static $_optionalTasks = NULL;
*
* @return array
* the set of tasks for a group of contacts
- * @static
*/
public static function &tasks() {
if (!(self::$_tasks)) {
*
* @return array
* the set of task titles
- * @static
*/
public static function &taskTitles() {
self::tasks();
*
* @return array
* the set of tasks for a group of contributors
- * @static
*/
public static function getTask($value) {
self::tasks();
*
* @var array $_names type of variable name to action constant
*
- * @static
*/
static $_names = array(
'add' => self::ADD,
* The flipped version of the names array, initialized when used
*
* @var array
- * @static
*/
static $_description;
*
* @return int
* the action mask corresponding to the input string
- * @static
*/
public static function resolve($str) {
$action = 0;
*
* @return int
* the action mask corresponding to the input args
- * @static
*/
public static function map($item) {
$mask = 0;
*
* @return int
* the action mask corresponding to the input string
- * @static
*/
public static function mapItem($item) {
$mask = CRM_Utils_Array::value(trim($item), self::$_names);
*
* @return string
* the corresponding action description
- * @static
*/
public static function description($mask) {
if (!isset($_description)) {
*
* @return string
* the html string
- * @static
*/
static function formLink(
$links,
*
* @return string
* the substituted string
- * @static
*/
public static function &replace(&$str, &$values) {
foreach ($values as $n => $v) {
*
* @return int
* the mask for the above permission
- * @static
*/
public static function mask($permissions) {
$mask = NULL;
*
* @return array
* associated array of all the drop downs in the form
- * @static
*/
public static function getSelection($id = NULL) {
$mapping = self::getMapping();
*
* @return array
* (reference) reminder list
- * @static
*/
public static function &getList($namesOnly = FALSE, $entityValue = NULL, $id = NULL) {
$activity_type = CRM_Core_PseudoConstant::activityType(TRUE, TRUE);
* The array that holds all the db ids.
*
* @return CRM_Core_DAO_ActionSchedule
- * @static
*/
public static function add(&$params, $ids = array()) {
$actionSchedule = new CRM_Core_DAO_ActionSchedule();
*
* @return CRM_Core_DAO_ActionSchedule|null
* object on success, null otherwise
- * @static
*/
public static function retrieve(&$params, &$values) {
if (empty($params)) {
* @param int $id
* ID of the Reminder to be deleted.
*
- * @static
*/
public static function del($id) {
if ($id) {
*
* @return Object
* DAO object on success, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_ActionSchedule', $id, 'is_active', $is_active);
*
* @return array
* array of created address
- * @static
*/
public static function create(&$params, $fixAddress = TRUE, $entity = NULL) {
if (!isset($params['address']) || !is_array($params['address'])) {
*
* @return object
* CRM_Core_BAO_Address object on success, null otherwise
- * @static
*/
public static function add(&$params, $fixAddress) {
static $customFields = NULL;
* (reference ) an assoc array of name/value pairs.
*
* @return void
- * @static
*/
public static function fixAddress(&$params) {
if (!empty($params['billing_street_address'])) {
*
* @return boolean
*
- * @static
*/
public static function dataExists(&$params) {
//check if location type is set if not return false
*
* @return array
* array with address fields
- * @static
*/
public static function &getValues($entityBlock, $microformat = FALSE, $fieldName = 'contact_id') {
if (empty($entityBlock)) {
*
* @return array
* the array of adrress data
- * @static
*/
public static function allAddress($id, $updateBlankLocInfo = FALSE) {
if (!$id) {
*
* @return array
* the array of adrress data
- * @static
*/
public static function allEntityAddress(&$entityElements) {
$addresses = array();
*
* @return array
* parsed fields values.
- * @static
*/
public static function parseStreetAddress($streetAddress, $locale = NULL) {
$config = CRM_Core_Config::singleton();
*
* @return array
* an array of contact fields and only the enabled address options
- * @static
*/
public static function validateAddressOptions($fields) {
static $addressOptions = NULL;
*
* @return int
* count of contacts that use this shared address
- * @static
*/
public static function checkContactSharedAddress($addressId) {
$query = 'SELECT count(id) FROM civicrm_address WHERE master_id = %1';
* @param int $contactId
* Contact id.
*
- * @static
*/
public static function checkContactSharedAddressFields(&$fields, $contactId) {
if (!$contactId || !is_array($fields) || empty($fields)) {
* Associated array of address params.
*
* @return void
- * @static
*/
public static function processSharedAddress($addressId, $params) {
$query = 'SELECT id FROM civicrm_address WHERE master_id = %1';
* Associated array of submitted values.
*
* @return void
- * @static
*/
public static function processSharedAddressRelationship($masterAddressId, $params) {
if (!$masterAddressId) {
* By default false.
*
* @return string
- * @static
*/
public static function setSharedAddressDeleteStatus($addressId = NULL, $contactId = NULL, $returnStatus = FALSE) {
// check if address that is being deleted has any shared
*
* @return array
* Array of $block objects.
- * @static
*/
public static function &getValues($blockName, $params) {
if (empty($params)) {
*
* @return array
* Array of $block objects.
- * @static
*/
public static function retrieveBlock(&$block, $blockName) {
// we first get the primary location due to the order by clause
*
* @return boolean
* true if the block has data, otherwise false
- * @static
*/
public static function dataExists($blockFields, &$params) {
foreach ($blockFields as $field) {
*
* @return boolean
* true if the block exits, otherwise false
- * @static
*/
public static function blockExists($blockName, &$params) {
// return if no data present
* @return array
* formatted array of block ids
*
- * @static
*/
public static function getBlockIds($blockName, $contactId = NULL, $entityElements = NULL, $updateBlankLocInfo = FALSE) {
$allBlocks = array();
*
* @return object
* CRM_Core_BAO_Block object on success, null otherwise
- * @static
*/
public static function create($blockName, &$params, $entity = NULL, $contactId = NULL) {
if (!self::blockExists($blockName, $params)) {
* Associates array.
*
* @return void
- * @static
*/
public static function blockDelete($blockName, $params) {
$name = ucfirst($blockName);
* @param $class
*
* @throws API_Exception
- * @static
*/
public static function handlePrimary(&$params, $class) {
$table = CRM_Core_DAO_AllCoreTables::getTableForClass($class);
*
* @return void
*
- * @static
*/
public static function synchronize($is_interactive = TRUE) {
//start of schronization code
*
* @return int
* contact id that has been created
- * @static
*/
public static function create(&$params, $mail) {
$config = CRM_Core_Config::singleton();
* @return FALSE|void
* WTF
*
- * @static
*/
public static function buildForm(&$form, $gid, $emailPresent, $action = CRM_Core_Action::NONE) {
$config = CRM_Core_Config::singleton();
* @return int|bool
* uid if user exists, false otherwise
*
- * @static
*/
public static function userExists(&$contact) {
$config = CRM_Core_Config::singleton();
*
* @return object
* The data if present in cache, else null
- * @static
*/
public static function &getItem($group, $path, $componentID = NULL) {
if (self::$_cache === NULL) {
*
* @return object
* The data if present in cache, else null
- * @static
*/
public static function &getItems($group, $componentID = NULL) {
if (self::$_cache === NULL) {
* The optional component ID (so componenets can share the same name space).
*
* @return void
- * @static
*/
public static function setItem(&$data, $group, $path, $componentID = NULL) {
if (self::$_cache === NULL) {
* @param bool|\booleab $clearAll clear all caches
*
* @return void
- * @static
*/
public static function deleteGroup($group = NULL, $path = NULL, $clearAll = TRUE) {
$dao = new CRM_Core_DAO_Cache();
* Should session state be reset on completion of DB store?.
*
* @return void
- * @static
*/
public static function storeSessionToCache($names, $resetSession = TRUE) {
foreach ($names as $key => $sessionName) {
* (in the case of profile)
*
* @return void
- * @static
*/
/**
* @param bool $prevNext
*
* @return void
- * @static
*/
public static function cleanup($session = FALSE, $table = FALSE, $prevNext = FALSE) {
// clean up the session cache every $cacheCleanUpNumber probabilistically
* Associated array of civicrm variables.
*
* @return null
- * @static
*/
public static function create($params) {
self::add($params);
* Associated array of civicrm variables.
*
* @return null
- * @static
*/
public static function add(&$params) {
self::fixParams($params);
* Associated array of civicrm variables.
*
* @return null
- * @static
*/
public static function fixParams(&$params) {
// in our old civicrm.settings.php we were using ISO code for country and
* Associated array of civicrm variables stored in db.
*
* @return null
- * @static
*/
public static function formatParams(&$params, &$values) {
if (empty($params) ||
* @param $defaults
*
* @return array
- * @static
*/
public static function retrieve(&$defaults) {
$domain = new CRM_Core_DAO_Domain();
*
* @return boolean
* true if valid component name and enabling succeeds, else false
- * @static
*/
public static function enableComponent($componentName) {
$config = CRM_Core_Config::singleton();
* Array for valid combinations of data_type & descriptions
*
* @var array
- * @static
*/
public static $_dataType = NULL;
* Array for valid combinations of data_type & html_type
*
* @var array
- * @static
*/
public static $_dataToHtml = NULL;
* Array to hold (formatted) fields for import
*
* @var array
- * @static
*/
public static $_importFields = NULL;
*
* @return array
* Data type => Description
- * @static
*/
public static function &dataType() {
if (!(self::$_dataType)) {
* (reference) an assoc array of name/value pairs.
*
* @return CRM_Core_DAO_CustomField
- * @static
*/
public static function create(&$params) {
$origParams = array_merge(array(), $params);
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Core_DAO_CustomField
- * @static
*/
public static function retrieve(&$params, &$defaults) {
return CRM_Core_DAO::commonRetrieve('CRM_Core_DAO_CustomField', $params, $defaults);
* @return Object
* DAO object on sucess, null otherwise
*
- * @static
*/
public static function setIsActive($id, $is_active) {
* @return string
* name
*
- * @static
*/
public static function getTitle($id) {
return CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomField', $id, 'label');
* @return array
* an array of active custom fields.
*
- * @static
*/
public static function &getFields(
$customDataType = 'Individual',
* @return array
*
*
- * @static
*/
public static function &getFieldsForImport(
$contactType = 'Individual',
* @param bool $all
* @return int|null
* The id (if exists)
- * @static
*/
public static function getKeyID($key, $all = FALSE) {
$match = array();
*
* @return CRM_Core_DAO_CustomField
* $field the field object
- * @static
* public
*/
public static function getFieldObject($fieldID) {
* @param string $label
* Label for custom field.
*
- * @static
*/
public static function addQuickFormElement(
&$qf,
*
* @return boolean
*
- * @static
*/
public static function deleteField($field) {
CRM_Utils_System::flushCache();
* @return string
* the display value
*
- * @static
*/
public static function getDisplayValue($value, $id, &$options, $contactID = NULL, $fieldID = NULL) {
$option = &$options[$id];
* If passed - dont fetch value from db,.
* just format the given value
*
- * @static
*/
static function setProfileDefaults(
$customFieldId,
*
* @return array
* formatted custom field array
- * @static
*/
static function formatCustomField(
$customFieldId, &$customFormatted, $value,
*
* @return array
* fatal is fieldID does not exists, else array of tableName, columnName
- * @static
*/
public static function getTableColumnGroup($fieldID, $force = FALSE) {
$cacheKey = "CRM_Core_DAO_CustomField_CustomGroup_TableColumn_{$fieldID}";
*
*
* @return mixed
- * @static
*/
public static function &customOptionGroup($includeFieldIds = NULL) {
static $customOptionGroup = NULL;
* Option group id.
*
* @return void
- * @static
*/
public static function fixOptionGroups($customFieldId, $optionGroupId) {
// check if option group belongs to any custom Field else delete
* Option group id.
*
* @return void
- * @static
*/
public static function checkOptionGroup($optionGroupId) {
$query = "
*
* @return array
* validation errors.
- * @static
*/
public static function validateCustomData($params) {
$errors = array();
* (reference) an assoc array of name/value pairs.
*
* @return CRM_Core_DAO_CustomGroup
- * @static
*/
public static function create(&$params) {
// create custom group dao, populate fields and then save.
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Core_DAO_CustomGroup
- * @static
*/
public static function retrieve(&$params, &$defaults) {
return CRM_Core_DAO::commonRetrieve('CRM_Core_DAO_CustomGroup', $params, $defaults);
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
// reset the cache
* The reason for the info array in unclear and it could be determined from parsing the group tree after creation
* With caching the performance impact would be small & the function would be cleaner
*
- * @static
*/
public static function &getTree(
$entityType,
* @return string
* title
*
- * @static
*/
public static function getTitle($id) {
return CRM_Core_DAO::getFieldValue('CRM_Core_DAO_CustomGroup', $id, 'title');
* array consisting of all group and field details
*
*
- * @static
*/
public static function &getGroupDetail($groupId = NULL, $searchable = NULL, &$extends = NULL, $inSelector = NULL) {
// create a new tree
*
* @return string
*
- * @static
*
* @see _apachesolr_civiAttachments_dereference_file_parent
*/
*
* @return void
*
- * @static
*/
private static function _addWhereAdd(&$customGroupDAO, $entityType, $entityID = NULL, $allSubtypes = FALSE) {
$addSubtypeClause = FALSE;
* @return boolean
* false if field exists for this group, true if group gets deleted.
*
- * @static
*/
public static function deleteGroup($group, $force = FALSE) {
* Prefix for custom grouptree assigned to template.
*
* @return void
- * @static
*/
public static function buildQuickForm(&$form, &$groupTree, $inactiveNeeded = FALSE, $prefix = '') {
$form->assign_by_ref("{$prefix}groupTree", $groupTree);
* The type of custom group we are using.
*
* @return array
- * @static
*/
public static function extractGetParams(&$form, $type) {
if (empty($_GET)) {
*
* @return boolean
* false if it matches else true
- * @static
*/
public static function checkCustomField($customFieldId, &$removeCustomFieldTypes) {
$query = "SELECT cg.extends as extends
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Core_BAO_CustomOption
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$customOption = new CRM_Core_DAO_OptionValue();
*
* @return array
* all active options for fieldId
- * @static
*/
static function getCustomOption(
$fieldID,
*
* @return string
* the label to display for this custom field
- * @static
*/
public static function getOptionLabel($fieldId, $value, $htmlType = NULL, $dataType = NULL) {
if (!$fieldId) {
* @param $optionId integer
* option id
*
- * @static
*/
public static function del($optionId) {
// get the customFieldID
* This stores custom data group types and tables that it extends
*
* @var array
- * @static
*/
static $extendsMap = array(
'Contact' => 'civicrm_contact',
*
* @return boolean
* True if the value is of the specified type
- * @static
*/
public static function typecheck($type, $value) {
switch ($type) {
*
* @return string|null
* the mysql data store placeholder
- * @static
*/
public static function typeToField($type) {
switch ($type) {
* Custom group ID.
*
* @return void
- * @static
*/
public static function deleteCustomValue($customValueID, $customGroupID) {
// first we need to find custom value table, from custom group ID
*
* @return string
* the mysql data store placeholder
- * @static
*/
public static function fieldToSQLType($type, $maxLength = 255) {
if (!isset($maxLength) ||
* Array of custom values for the entity with key=>value
* pairs specified as civicrm_custom_field.id => custom value.
* Empty array if no custom values found.
- * @static
*/
public static function &getEntityValues($entityID, $entityType = NULL, $fieldIDs = NULL, $formatMultiRecordField = FALSE) {
if (!$entityID) {
*
* @throws Exception
* @return array
- * @static
*/
public static function setValues(&$params) {
*
* @throws Exception
* @return array
- * @static
*/
public static function &getValues(&$params) {
if (empty($params)) {
* @param array $params
* Values.
*
- * @static
*
* @return object
*/
*
* @return array
* array of dashlets
- * @static
*/
public static function getDashlets($all = TRUE, $checkPermission = TRUE) {
$dashlets = array();
*
* @return array
* array of dashlets
- * @static
*/
public static function getContactDashlets($flatFormat = FALSE, $contactID = NULL) {
$dashlets = array();
*
* @return array
* associted array title and content
- * @static
*/
public static function getDashletInfo($dashletID) {
$dashletInfo = array();
*
* @throws RuntimeException
* @return void
- * @static
*/
public static function saveDashletChanges($columns, $contactID = NULL) {
$session = CRM_Core_Session::singleton();
*
* @return object
* $dashlet returns dashlet object
- * @static
*/
public static function addDashlet(&$params) {
* @param object : $dashlet
*
* @return void
- * @static
*/
public static function addContactDashlet($dashlet) {
$admin = CRM_Core_Permission::check('administer CiviCRM');
* Reset cache only for specific contact.
*
* @return void
- * @static
*/
public static function resetDashletCache($contactID = NULL) {
$whereClause = NULL;
* @param int $dashletID
*
* @return void
- * @static
*/
public static function deleteDashlet($dashletID) {
$dashlet = new CRM_Core_DAO_Dashboard();
* @param string $entityTable
*
* @return boolean
- * @static
*/
public static function del($entityId, $entityTable) {
// delete all discount records with the selected discounted id
*
* @return object
* CRM_Core_DAO_Discount object on success, otherwise null
- * @static
*/
public static function add(&$params) {
$discount = new CRM_Core_DAO_Discount();
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Core_DAO_Domain
- * @static
*/
public static function retrieve(&$params, &$defaults) {
return CRM_Core_DAO::commonRetrieve('CRM_Core_DAO_Domain', $params, $defaults);
* @param null $reset
*
* @return CRM_Core_BAO_Domain|null
- * @static
*/
public static function &getDomain($reset = NULL) {
static $domain = NULL;
*
* @return object
* CRM_Core_BAO_Email object on success, null otherwise
- * @static
*/
public static function add(&$params) {
$hook = empty($params['id']) ? 'create' : 'edit';
* Input parameters to find object.
*
* @return boolean
- * @static
*/
public static function &getValues($entityBlock) {
return CRM_Core_BAO_Block::getValues('email', $entityBlock);
*
* @return array
* the array of email id's
- * @static
*/
public static function allEmails($id, $updateBlankLocInfo = FALSE) {
if (!$id) {
*
* @return array
* the array of email id's
- * @static
*/
public static function allEntityEmails(&$entityElements) {
if (empty($entityElements)) {
* Email object.
*
* @return void
- * @static
*/
public static function holdEmail(&$email) {
//check for update mode
*
* @return array
* an array of email ids
- * @static
*/
public static function getFromEmail() {
$session = CRM_Core_Session::singleton();
* @return array(
* ) reference $tag array of category id's the contact belongs to.
*
- * @static
*/
public static function &getTag($entityID, $entityTable = 'civicrm_contact') {
$tags = array();
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Core_BAO_EntityTag
- * @static
*/
public static function add(&$params) {
$dataExists = self::dataExists($params);
* An assoc array of name/value pairs.
*
* @return boolean
- * @static
*/
public static function dataExists($params) {
return !($params['tag_id'] == 0);
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Core_BAO_EntityTag
- * @static
*/
public static function del(&$params) {
$entityTag = new CRM_Core_BAO_EntityTag();
*
* @return array
* (total, added, notAdded) count of enities added to tag
- * @static
*/
public static function addEntitiesToTag(&$entityIds, $tagId, $entityTable = 'civicrm_contact') {
$numEntitiesAdded = 0;
*
* @return array
* (total, removed, notRemoved) count of entities removed from tags
- * @static
*/
public static function removeEntitiesFromTag(&$entityIds, $tagId, $entityTable = 'civicrm_contact') {
$numEntitiesRemoved = 0;
* @param int $entityID
*
* @return void
- * @static
*/
public static function create(&$params, $entityTable, $entityID) {
// get categories for the entity id
*
* @return CRM_Core_BAO_LocationType|null
* object on success, null otherwise
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$extension = new CRM_Core_DAO_Extension();
*
* @return void
*
- * @static
*/
public static function del($id) {
$extension = new CRM_Core_DAO_Extension();
*
* @return array
* An array with 2 elements. The string and the number of attachments
- * @static
*/
public static function attachmentInfo($entityTable, $entityID, $separator = '<br />') {
if (!$entityID) {
/**
* Delete a file attachment from an entity table / entity ID
*
- * @static
*/
public static function deleteAttachment() {
$params = array();
* @return array|NULL
* list of HTML snippets; one HTML snippet for each attachment. If none found, then NULL
*
- * @static
*/
public static function paperIconAttachment($entityTable, $entityID) {
if (empty($entityTable) || !$entityID) {
* Entity_table.
*
* @return CRM_Core_BAO_FinancialTrxn
- * @static
*/
public static function create(&$params, $trxnEntityTable = NULL) {
$trxn = new CRM_Financial_DAO_FinancialTrxn();
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Contribute_BAO_ContributionType
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$financialItem = new CRM_Financial_DAO_FinancialTrxn();
* @return array
* array of category id's the contact belongs to.
*
- * @static
*/
public static function getFinancialTrxnId($entity_id, $orderBy = 'ASC', $newTrxn = FALSE) {
$ids = array('entityFinancialTrxnId' => NULL, 'financialTrxnId' => NULL);
* @return array
* array of catagory id's the contact belongs to.
*
- * @static
*/
public static function getFinancialTrxnTotal($entity_id) {
$query = "
* @return array
* array of previous payments
*
- * @static
*/
public static function getPayments($financial_trxn_id) {
$query = "
* @return array
* array of catagory id's the contact belongs to.
*
- * @static
*/
public static function getFinancialTrxnLineTotal($entity_id, $entity_table = 'civicrm_contribution') {
$query = "SELECT lt.price_field_value_id AS id, ft.financial_trxn_id,ft.amount AS amount FROM civicrm_entity_financial_trxn AS ft
* @param int $entity_id
* @return bool
* TRUE on success, FALSE otherwise.
- * @static
*/
public static function deleteFinancialTrxn($entity_id) {
$query = "DELETE ceft1, cfi, ceft, cft FROM `civicrm_financial_trxn` cft
/**
* Create financial transaction for premium
*
- * @static
*/
public static function createPremiumTrxn($params) {
if ((empty($params['financial_type_id']) || empty($params['contributionId'])) && empty($params['oldPremium'])) {
* @param array $params
* To create trxn entries.
*
- * @static
*/
public static function recordFees($params) {
$expenseTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Expense Account is' "));
*
* @return object
* CRM_Core_BAO_IM object on success, null otherwise
- * @static
*/
public static function add(&$params) {
$hook = empty($params['id']) ? 'create' : 'edit';
* @param array entityBlock input parameters to find object
*
* @return boolean
- * @static
*/
public static function &getValues($entityBlock) {
return CRM_Core_BAO_Block::getValues('im', $entityBlock);
*
* @return array
* the array of im details
- * @static
*/
public static function allIMs($id, $updateBlankLocInfo = FALSE) {
if (!$id) {
*
* @return array
* the array of im details
- * @static
*/
public static function allEntityIMs(&$entityElements) {
if (empty($entityElements)) {
* An assoc array of name/value pairs.
*
* @return CRM_Financial_DAO_PaymentProcessorType
- * @static
*/
public static function create($params) {
$job = new CRM_Core_DAO_Job();
*
* @return CRM_Core_DAO_Job|null
* object on success, null otherwise
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$job = new CRM_Core_DAO_Job();
* @return Object
* DAO object on sucess, null otherwise
*
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_Job', $id, 'is_active', $is_active);
* ID of the job to be deleted.
*
* @return bool|null
- * @static
*/
public static function del($jobID) {
if (!$jobID) {
*
* @return array
* array of page orientations
- * @static
*/
public static function getPageOrientations() {
return array(
*
* @return array
* array of font names
- * @static
*/
public static function getFontNames($name = 'label_format') {
$label = new CRM_Utils_PDF_Label(self::getDefaultValues($name));
*
* @return array
* array of font sizes
- * @static
*/
public static function getFontSizes() {
$fontSizes = array();
*
* @return array
* array of measurement units
- * @static
*/
public static function getUnits() {
return array(
*
* @return array
* array of alignments
- * @static
*/
public static function getTextAlignments() {
return array(
*
* @return array
* array of alignments
- * @static
*/
public static function getFontStyles() {
return array(
*
* @return array
* (reference) List of Label Formats
- * @static
*/
public static function addOrder(&$list, $returnURL) {
$filter = "option_group_id = " . self::_getGid();
*
* @return array
* (reference) label format list
- * @static
*/
public static function &getList($namesOnly = FALSE, $groupName = 'label_format') {
static $list = array();
*
* @return array
* Name/value pairs containing the default Label Format values.
- * @static
*/
public static function &getDefaultValues($groupName = 'label_format') {
$params = array('is_active' => 1, 'is_default' => 1);
* @param null $default
*
* @return value
- * @static
*/
public static function getValue($field, &$values, $default = NULL) {
if (array_key_exists($field, self::$optionValueFields)) {
* @param string $groupName
*
* @return CRM_Core_DAO_OptionValue
- * @static
*/
public static function retrieve(&$params, &$values, $groupName = 'label_format') {
$optionValue = new CRM_Core_DAO_OptionValue();
* ID of the label format to be deleted.
* @param string $groupName
* Group name.
- * @static
*/
public static function del($id, $groupName) {
if ($id) {
* @param null $entity
*
* @return array
- * @static
*/
public static function create(&$params, $fixAddress = TRUE, $entity = NULL) {
$location = array();
/**
* Takes an entity array and finds the existing location block
- * @static
*/
public static function findExisting($entityElements) {
$eid = $entityElements['entity_id'];
*
* @return object
* CRM_Core_BAO_locBlock object on success, null otherwise
- * @static
*/
public static function addLocBlock(&$params) {
$locBlock = new CRM_Core_DAO_LocBlock();
* Id of the Location Block.
*
* @return void
- * @static
*/
public static function deleteLocBlock($locBlockId) {
if (!$locBlockId) {
* (reference ) an assoc array of name/value pairs.
*
* @return boolean
- * @static
*/
public static function dataExists(&$params) {
// return if no data present
*
* @return array
* array of objects(CRM_Core_BAO_Location)
- * @static
*/
public static function &getValues($entityBlock, $microformat = FALSE) {
if (empty($entityBlock)) {
* Id of the location to delete.
*
* @return void
- * @static
*/
public static function deleteLocationBlocks($contactId, $locationTypeId) {
// ensure that contactId has a value
* @param int $contactId
* Contact id.
*
- * @static
*/
public static function checkPrimaryBlocks($contactId) {
if (!$contactId) {
*
* @return CRM_Core_BAO_LocaationType|null
* object on success, null otherwise
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$locationType = new CRM_Core_DAO_LocationType();
* @return Object
* DAO object on sucess, null otherwise
*
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_LocationType', $id, 'is_active', $is_active);
* @return object
* The default location type object on success,
* null otherwise
- * @static
*/
public static function &getDefault() {
if (self::$_defaultLocationType == NULL) {
* @param array $params
* Reference array contains the values submitted by the form.
*
- * @static
*
* @return object
*/
* @param int $locationTypeId
* ID of the location type to be deleted.
*
- * @static
*/
public static function del($locationTypeId) {
$entity = array('address', 'phone', 'email', 'im');
* @param array $params
* Array of name-value pairs of log table.
*
- * @static
*/
public static function add(&$params) {
*
* @return int
* count of log records
- * @static
*/
public static function getContactLogCount($contactID) {
$query = "SELECT count(*) FROM civicrm_log
*
* @return int
* report id of Contact Logging Report (Summary) / false
- * @static
*/
public static function useLoggingReport() {
// first check if logging is enabled
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Core_BAO_MailSettings
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$mailSettings = new CRM_Core_DAO_MailSettings();
* @param array $params
* Reference array contains the values submitted by the form.
*
- * @static
*
* @return object
*/
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Core_BAO_MailSettings
- * @static
*/
public static function create(&$params) {
$transaction = new CRM_Core_Transaction();
* Mail settings id.
*
* @return mixed|null
- * @static
*/
public static function deleteMailSettings($id) {
$results = NULL;
*
* @return object
* CRM_Core_DAO_Mapping object on success, otherwise NULL
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$mapping = new CRM_Core_DAO_Mapping();
* Mapping id.
*
* @return boolean
- * @static
*/
public static function del($id) {
// delete from mapping_field table
*
* @return object
* CRM_Core_DAO_Mapper object on success, otherwise NULL
- * @static
*/
public static function add($params) {
$mapping = new CRM_Core_DAO_Mapping();
*
* @return array
* array of mapping name
- * @static
*/
public static function getMappings($mappingTypeId) {
$mapping = array();
*
* @return array
* array of mapping fields
- * @static
*/
public static function getMappingFields($mappingId) {
//mapping is to be loaded from database
*
* @return array
* associated array of elements
- * @static
*/
public static function getFormattedFields($smartGroupId) {
$returnFields = array();
* @param NULL $exportMode
*
* @return void
- * @static
*/
public static function buildMappingForm(&$form, $mappingType = 'Export', $mappingId = NULL, $columnNo, $blockCount = 3, $exportMode = NULL) {
if ($mappingType == 'Export') {
*
* @return null|string
* $customGroupName all custom group names
- * @static
*/
public static function getCustomGroupName($customfieldId) {
if ($customFieldId = CRM_Core_BAO_CustomField::getKeyID($customfieldId)) {
*
* @return array
* formatted associated array of elements
- * @static
*/
public static function formattedFields(&$params, $row = FALSE) {
$fields = array();
* Mapping id.
*
* @return NULL
- * @static
*/
public static function saveMappingFields(&$params, $mappingId) {
//delete mapping fields records for exixting mapping
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Core_BAO_MessageTemplate
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$messageTemplates = new CRM_Core_DAO_MessageTemplate();
*
* @return Object
* DAO object on sucess, NULL otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_MessageTemplate', $id, 'is_active', $is_active);
* @param array $params
* Reference array contains the values submitted by the form.
*
- * @static
*
* @return object
*/
/**
* Delete the Message Templates
*
- * @static
*
* @param int $messageTemplatesID
*
/**
* Get the Message Templates
*
- * @static
*
* @param bool $all
*
* @return Object
* DAO object on sucess, NULL otherwise
*
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_Navigation', $id, 'is_active', $is_active);
/**
* Get existing / build navigation for CiviCRM Admin Menu
*
- * @static
* @return array
* associated array
*/
*
* @return object
* navigation object
- * @static
*/
public static function add(&$params) {
$navigation = new CRM_Core_DAO_Navigation();
*
* @return CRM_Core_BAO_Navigation|null
* object on success, NULL otherwise
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$navigation = new CRM_Core_DAO_Navigation();
*
* @return int
* $weight string
- * @static
*/
public static function calculateWeight($parentID = NULL, $menuID = NULL) {
$domainID = CRM_Core_Config::domainID();
*
* @return array
* returns associated array
- * @static
*/
public static function getNavigationList() {
$cacheKeyString = "navigationList";
*
* @return array
* nested array of menus
- * @static
*/
public static function buildNavigationTree(&$navigationTree, $parentID, $navigationMenu = TRUE) {
$whereClause = " parent_id IS NULL";
*
* @return string
* html or json string
- * @static
*/
public static function buildNavigation($json = FALSE, $navigationMenu = TRUE) {
$navigations = array();
*
* @return string
* returns navigation html
- * @static
*/
public static function createNavigation($contactID) {
$config = CRM_Core_Config::singleton();
* Associated array, $_GET.
*
* @return void
- * @static
*/
public static function processNavigation(&$params) {
$nodeID = (int) str_replace("node_", "", $params['id']);
* New position of the nod, it starts with 0 - n.
*
* @return void
- * @static
*/
public static function processMove($nodeID, $referenceID, $position) {
// based on the new position we need to get the weight of the node after moved node
*
* @return array
* associated array
- * @static
*/
public static function getNavigationInfo($navigationID) {
$query = "SELECT parent_id, weight FROM civicrm_navigation WHERE id = %1";
* @param array $params
* @param array $newParams
* New value of params.
- * @static
*/
public static function processUpdate($params, $newParams) {
$dao = new CRM_Core_DAO_Navigation();
* @return string
* the note text or NULL if note not found
*
- * @static
*/
public static function getNoteText($id) {
return CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Note', $id, 'note');
* @return string
* the note subject or NULL if note not found
*
- * @static
*/
public static function getNoteSubject($id) {
return CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Note', $id, 'subject');
* @return boolean
* TRUE if the note should be displayed, otherwise FALSE
*
- * @static
*/
public static function getNotePrivacyHidden($note) {
if (CRM_Core_Permission::check('view all notes')) {
*
* @return object
* $note CRM_Core_BAO_Note object
- * @static
*/
public static function &add(&$params, $ids = array()) {
$dataExists = self::dataExists($params);
* (reference ) an assoc array of name/value pairs.
*
* @return boolean
- * @static
*/
public static function dataExists(&$params) {
// return if no data present
*
* @return object
* $notes Object of CRM_Core_BAO_Note
- * @static
*/
public static function &getValues(&$params, &$values, $numNotes = self::MAX_NOTES) {
if (empty($params)) {
* @return int|NULL
* no of deleted notes on success, null otherwise
* @access public
- * @static
*/
public static function del($id, $showStatus = TRUE) {
$return = NULL;
*
* @return void
*
- * @static
*/
public static function deleteContact($id) {
// need to delete for both entity_id
* @return array
* array of note properties
*
- * @static
*/
public static function &getNote($id, $entityTable = 'civicrm_relationship') {
$viewNote = array();
* @return int
* $count count of log records
*
- * @static
*/
public static function getContactNoteCount($contactID) {
$note = new CRM_Core_DAO_Note();
* @return array
* Nested associative array beginning with direct children of given note.
*
- * @static
*/
public static function getNoteTree($parentId, $maxDepth = 0, $snippet = FALSE) {
return self::buildNoteTree($parentId, $maxDepth, $snippet);
* @return int
* $count Number of notes having the give note as parent
*
- * @static
*/
public static function getChildCount($id) {
$note = new CRM_Core_DAO_Note();
*
* @return array
* Nested associative array beginning with direct children of given note.
- * @static
*/
private static function buildNoteTree($parentId, $maxDepth = 0, $snippet = FALSE, &$tree = array(), $depth = 0) {
if ($maxDepth && $depth > $maxDepth) {
* Contact id whose notes to be deleted.
*
* @return void
- * @static
*/
public static function cleanContactNotes($contactID) {
$params = array(1 => array($contactID, 'Integer'));
*
* @return object
* CRM_Core_BAO_OpenID object on success, null otherwise
- * @static
*/
public static function add(&$params) {
$hook = empty($params['id']) ? 'create' : 'edit';
* Input parameters to find object.
*
* @return mixed
- * @static
*/
public static function &getValues($entityBlock) {
return CRM_Core_BAO_Block::getValues('openid', $entityBlock);
* The OpenID to check.
*
* @return boolean
- * @static
*/
public static function isAllowedToLogin($identity_url) {
$openId = new CRM_Core_DAO_OpenID();
*
* @return array
* the array of openid's
- * @static
*/
public static function allOpenIDs($id, $updateBlankLocInfo = FALSE) {
if (!$id) {
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Core_BAO_OptionGroup
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$optionGroup = new CRM_Core_DAO_OptionGroup();
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_OptionGroup', $id, 'is_active', $is_active);
* @param array $ids
* Reference array contains the id.
*
- * @static
*
* @return object
*/
*
* @return void
*
- * @static
*/
public static function del($optionGroupId) {
// need to delete all option value field before deleting group
* @return String
* title
*
- * @static
*/
public static function getTitle($optionGroupId) {
$optionGroup = new CRM_Core_DAO_OptionGroup();
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Core_BAO_OptionValue
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$optionValue = new CRM_Core_DAO_OptionValue();
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_OptionValue', $id, 'is_active', $is_active);
* @param array $ids
* Reference array contains the id.
*
- * @static
*
* @return CRM_Core_DAO_OptionValue
*/
*
* @return boolean
*
- * @static
*/
public static function del($optionValueId) {
$optionValue = new CRM_Core_DAO_OptionValue();
*
* @return array
* label and description
- * @static
*/
public static function getActivityTypeDetails($activityTypeId) {
$query = "SELECT civicrm_option_value.label, civicrm_option_value.description
* @return string
* title
*
- * @static
*/
public static function getTitle($id) {
return CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $id, 'label');
* Options value , weight pair.
*
* @return void
- * @static
*/
public static function updateOptionWeights($opGroupId, $opWeights) {
if (!is_array($opWeights) || empty($opWeights)) {
*
* @return array
* an array of array of values for this option group
- * @static
*/
public static function getOptionValuesArray($optionGroupID) {
// check if we can get the field values from the system cache
*
* @return array
* an associative array of label, value pairs
- * @static
*/
public static function getOptionValuesAssocArray($optionGroupID) {
$optionValues = self::getOptionValuesArray($optionGroupID);
*
* @return array
* an associative array of label, value pairs
- * @static
*/
public static function getOptionValuesAssocArrayFromName($optionGroupName) {
$dao = new CRM_Core_DAO_OptionGroup();
*
* @return array
* (reference) List of Paper Sizes
- * @static
*/
public static function &addOrder(&$list, $returnURL) {
$filter = "option_group_id = " . self::_getGid();
*
* @return array
* (reference) Paper Size list
- * @static
*/
public static function &getList($namesOnly = FALSE) {
static $list = array();
*
* @return array
* Name/value pairs containing the default Paper Size values.
- * @static
*/
public static function &getDefaultValues() {
$params = array('is_active' => 1, 'is_default' => 1);
* @param null $default
*
* @return value
- * @static
*/
public static function getValue($field, &$values, $default = NULL) {
if (array_key_exists($field, self::$optionValueFields)) {
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Core_DAO_OptionValue
- * @static
*/
public static function retrieve(&$params, &$values) {
$optionValue = new CRM_Core_DAO_OptionValue();
* @param int $id
* ID of the Paper Size to be deleted.
*
- * @static
*/
public static function del($id) {
if ($id) {
* URL of page calling this function.
*
* @return void
- * @static
*/
public static function addOrder(&$list, $returnURL) {
$filter = "option_group_id = " . self::_getGid();
*
* @return array
* (reference) PDF Page Format list
- * @static
*/
public static function &getList($namesOnly = FALSE) {
static $list = array();
*
* @return array
* Name/value pairs containing the default PDF Page Format values.
- * @static
*/
public static function &getDefaultValues() {
$params = array('is_active' => 1, 'is_default' => 1);
* @param null $default
*
* @return value
- * @static
*/
public static function getValue($field, &$values, $default = NULL) {
if (array_key_exists($field, self::$optionValueFields)) {
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Core_DAO_OptionValue
- * @static
*/
public static function retrieve(&$params, &$values) {
$optionValue = new CRM_Core_DAO_OptionValue();
* @param int $id
* ID of the PDF Page Format to be deleted.
*
- * @static
*/
public static function del($id) {
if ($id) {
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Core_BAO_Persistent
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$dao = new CRM_Core_DAO_Persistent();
* @param array $ids
* Reference array contains the id.
*
- * @static
*
* @return object
*/
*
* @return object
* CRM_Core_BAO_Phone object on success, null otherwise
- * @static
*/
public static function add(&$params) {
// Ensure mysql phone function exists
*
* @return array
* array of phone objects
- * @static
*/
public static function &getValues($entityBlock) {
$getValues = CRM_Core_BAO_Block::getValues('phone', $entityBlock);
*
* @return array
* the array of phone ids which are potential numbers
- * @static
*/
public static function allPhones($id, $updateBlankLocInfo = FALSE, $type = NULL, $filters = array()) {
if (!$id) {
*
* @return array
* the array of phone ids which are potential numbers
- * @static
*/
public static function allEntityPhones($entityElements, $type = NULL) {
if (empty($entityElements)) {
* Value of option to be deleted.
*
* return void
- * @static
*/
public static function setOptionToNull($optionId) {
if (!$optionId) {
*
* @return CRM_Core_BAO_PreferencesDate|null
* object on success, null otherwise
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$dao = new CRM_Core_DAO_PreferencesDate();
* @return Object
* DAO object on sucess, null otherwise
*
- * @static
*/
public static function setIsActive($id, $is_active) {
CRM_Core_Error::fatal();
*
* @param int $id
*
- * @static
*/
public static function del($id) {
CRM_Core_Error::fatal();
* @param array $params
* Reference array contains the values submitted by the form .
*
- * @static
*
* @return object
*/
* @param string $entityTable
* Name of the entity table .
*
- * @static
*
* @return object
*/
* @param int $initiatorId
* The instance where this function is invoked from .
*
- * @static
*
* @return array
* an array of child ids
* @param int $mode
* 1. retrieve only one entity. 2. retrieve all future entities in the repeating set. 3. all entities in the repeating set. .
*
- * @static
*
* @return array
* array of connected ids
* @param bool $includeParent
* Include parent in result set .
*
- * @static
*
* @return int
* unsigned $parentId Parent ID
* @param bool $createRecurringEntity
* If to create a record in recurring_entity table .
*
- * @static
*
* @return object
*/
* @param object $event
* An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just updated .
*
- * @static
*
* @return void
*/
* @param object $event
* An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just inserted .
*
- * @static
*
* @return void
*/
* @param object $event
* An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just deleted .
*
- * @static
*
* @return void
*/
* @param string $entityTable
* Name of the entity table
*
- * @static
*
* @return boolean|CRM_Core_DAO_RecurringEntity
*/
* @param int $scheduleReminderId
* Primary key of civicrm_action_schedule table .
*
- * @static
*
* @return object
*/
* @param DateTime $endDate
* End Date .
*
- * @static
*
* @return object
* DateTime object which contain time difference
* @param string $used_for
* Specifies for which entity type it's used for .
*
- * @static
*
* @return object
*/
* @return bool
* TRUE if successfully created, FALSE otherwise
*
- * @static
*/
public static function createTable(&$params) {
$sql = self::buildTableSQL($params);
* @return bool
* TRUE if successfully deleted, FALSE otherwise.
*
- * @static
*/
public static function dropTable($tableName) {
$sql = "DROP TABLE $tableName";
*
* @return boolean
* true if item is already in cache
- * @static
*/
static function inCache(
$group,
*
* @return mixed
* The data if present in the setting table, else null
- * @static
*/
static function getItem(
$group,
*
* @domains array an array of domains to get settings for. Default is the current domain
* @return void
- * @static
*/
public static function getItems(&$params, $domains = NULL, $settingsToReturn) {
$originalDomain = CRM_Core_Config::domainID();
* @param int $domainID
*
* @return void
- * @static
*/
static function setItem(
$value,
* @throws api_Exception
* @domains array an array of domains to get settings for. Default is the current domain
* @return array
- * @static
*/
public static function setItems(&$params, $domains = NULL) {
$originalDomain = CRM_Core_Config::domainID();
*
* @return object
* CRM_Core_DAO_Tag object on success, otherwise null
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$tag = new CRM_Core_DAO_Tag();
* Tag id.
*
* @return boolean
- * @static
*/
public static function del($id) {
// since this is a destructive operation, lets make sure
*
* @return object
* CRM_Core_DAO_Tag object on success, otherwise null
- * @static
*/
public static function add(&$params, $ids = array()) {
$id = CRM_Utils_Array::value('id', $params, CRM_Utils_Array::value('tag', $ids));
* (reference ) an assoc array of name/value pairs.
*
* @return boolean
- * @static
*/
public static function dataExists(&$params) {
// Disallow empty values except for the number zero.
*
* @return array
* array of tag sets
- * @static
*/
public static function getTagSet($entityTable) {
$tagSets = array();
* @return array
* associated array of tag name and id
* @access public
- * @static
*/
public static function getTagsNotInTagset() {
$tags = $tagSets = array();
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Core_BAO_UFField
- * @static
*/
public static function retrieve(&$params, &$defaults) {
return CRM_Core_DAO::commonRetrieve('CRM_Core_DAO_UFField', $params, $defaults);
* @return string
* title
*
- * @static
*/
public static function getTitle($id) {
return CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFField', $groupId, 'title');
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
//check if custom data profile field is disabled
*
* @return boolean
*
- * @static
*/
public static function del($id) {
//delete field field
* @return mixed
* @ids array $ids array that containd ids
*
- * @static
*/
public static function duplicateField($params, $ids) {
$ufField = new CRM_Core_DAO_UFField();
*
* @return CRM_Core_BAO_UFField
*
- * @static
*/
public static function add(&$params, $ids = array()) {
// set values for uf field properties and save
* Set the is_active field.
*
* @return void
- * @static
*/
public static function setUFField($customFieldId, $is_active) {
//find the profile id given custom field
* In which to copy.
*
* @return void
- * @static
*/
public static function copy($old_id, $new_id) {
$ufField = new CRM_Core_DAO_UFField();
*
* @return void
*
- * @static
*/
public static function delUFField($customFieldId) {
//find the profile id given custom field id
* Value we want to set the is_active field.
*
* @return void
- * @static
*/
public static function setUFFieldStatus($customGroupId, $is_active) {
//find the profile id given custom group id
*
* @return boolean
* false if custom field are disabled else true
- * @static
*/
public static function checkUFStatus($UFFieldId) {
$fieldName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFField', $UFFieldId, 'field_name');
* Array of types those are optional.
*
* @return boolean
- * @static
*/
public static function checkValidProfileType($ufGroupId, $required, $optional = NULL) {
if (!is_array($required) || empty($required)) {
*
* @return bool
* true for mix profile else false
- * @static
*/
public static function checkProfileType($ufGroupId) {
$ufGroup = new CRM_Core_DAO_UFGroup();
*
* @return string
* profile group_type
- * @static
*
* TODO Why is this function in this class? It seems to be about the UFGroup.
*/
*
* @return string
* profile group_type
- * @static
*
* TODO Why is this function in this class? It seems to be about the UFGroup.
*/
*
* @return bool
* true for mix profile group else false
- * @static
*/
public static function checkProfileGroupType($ctype) {
$ufGroup = new CRM_Core_DAO_UFGroup();
* @param int $gid : UF group ID
* @param array $defaults : Form defaults
* @return array, multidimensional; e.g. $result['FieldGroup']['field_name']['label']
- * @static
*/
public static function getAvailableFields($gid = NULL, $defaults = array()) {
$fields = array(
* @param bool $force
*
* @return array, multidimensional; e.g. $result['field_name']['label']
- * @static
*/
public static function getAvailableFieldsFlat($force = FALSE) {
// FIXME reset when data model changes
*
* @return object
* CRM_Core_DAO_UFGroup object
- * @static
*/
public static function retrieve(&$params, &$defaults) {
return CRM_Core_DAO::commonRetrieve('CRM_Core_DAO_UFGroup', $params, $defaults);
* @return string
* title
*
- * @static
*/
public static function getTitle($id) {
return CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', $id, 'title');
*
* @return Object
* CRM_Core_DAO_UFGroup object on success, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Core_DAO_UFGroup', $id, 'is_active', $is_active);
*
* @return array
* the fields that are needed for registration
- * @static
*/
public static function getRegistrationFields($action, $mode, $ctype = NULL) {
if ($mode & CRM_Profile_Form::MODE_REGISTER) {
* @param int $permissionType
* @return array
* the fields that are listings related
- * @static
*/
static function getListingFields(
$action,
*
* @return array
* the fields that belong to this ufgroup(s)
- * @static
*/
static function getFields(
$id,
* @pram boolean $register is this the registrtion form
* @return boolean
* true if form is valid
- * @static
*/
public static function isValid($userID, $title, $register = FALSE, $action = NULL) {
if ($register) {
*
* @return string
* the html for the form on success, otherwise empty string
- * @static
*/
static function getEditHTML(
$userID,
*
* @return int|null
* contact_id if found, null otherwise
- * @static
*/
public static function findContact(&$params, $id = NULL, $contactType = 'Individual') {
$dedupeParams = CRM_Dedupe_Finder::formatParams($params, $contactType);
* @param null $additionalWhereClause
*
* @return void
- * @static
*/
public static function getValues(
$cid, &$fields, &$values,
*
* @return boolean
*
- * @static
*/
public static function usedByModule($id) {
//check whether this group is used by any module(check uf join records)
*
* @return boolean
*
- * @static
*/
public static function del($id) {
//check whether this group contains any profile fields
* @param array $ids
* Reference array contains the id.
*
- * @static
*
* @return object
*/
* Ufgroup id.
*
* @return void
- * @static
*/
public static function createUFJoin(&$params, $ufGroupId) {
$groupTypes = CRM_Utils_Array::value('uf_group_type', $params);
*
* @return array
*
- * @static
*/
public static function getUFJoinRecord($ufGroupId = NULL, $displayName = NULL, $status = NULL) {
if ($displayName) {
* (reference) an assoc array of name/value pairs.
*
* @return CRM_Core_BAO_UFJoin
- * @static
*/
public static function addUFJoin(&$params) {
$ufJoin = new CRM_Core_DAO_UFJoin();
* (reference) an assoc array of name/value pairs.
*
* @return void
- * @static
*/
public static function delUFJoin(&$params) {
$ufJoin = new CRM_Core_DAO_UFJoin();
*
* @return int
* weight of the UFGroup
- * @static
*/
public static function getWeight($ufGroupId = NULL) {
//calculate the weight
*
* @return array
* array of ufgroups for a module
- * @static
*/
public static function getModuleUFGroup($moduleName = NULL, $count = 0, $skipPermission = TRUE, $op = CRM_Core_Permission::VIEW, $returnFields = NULL) {
$selectFields = array('id', 'title', 'created_id', 'is_active', 'is_reserved', 'group_type');
*
* @return boolean
* true or false
- * @static
*/
public static function filterUFGroups($ufGroupId, $contactID = NULL) {
if (!$contactID) {
* @param string $prefix
*
* @return null
- * @static
*/
static function buildProfile(
&$form,
* @param null $component
*
* @return null
- * @static
*/
static function setProfileDefaults(
$contactId, &$fields, &$defaults,
*
* @return array
* associative array of profiles
- * @static
*/
public static function getProfiles($types, $onlyPure = FALSE) {
$profiles = array();
*
* @return array
* associative array of profiles
- * @static
*/
public static function getValidProfiles($required, $optional = NULL) {
if (!is_array($required) || empty($required)) {
*
* @return array
* associative array of profiles
- * @static
*/
public static function checkValidProfile($ufId, $required = NULL) {
$validProfile = FALSE;
* @param array $defaults
*
* @return array
- * @static
*/
public static function setRegisterDefaults(&$fields, &$defaults) {
$config = CRM_Core_Config::singleton();
*
* @return array
* assoicated formatted array
- * @static
*/
public static function formatFields($params, $contactId = NULL) {
if ($contactId) {
*
* @return array
* returns array
- * @static
*/
public static function profileGroups($profileID) {
$groupTypes = array();
*
* @return boolean
* true if profile is mixed
- * @static
*/
public static function checkForMixProfiles($profileIds) {
$mixProfile = FALSE;
*
* @return boolean
* true if profile should be shown else false
- * @static
*/
public static function showOverlayProfile() {
$showOverlay = TRUE;
*
* @return Array
* group type values
- * @static
*/
public static function groupTypeValues($profileId, $groupType = NULL) {
$groupTypeValue = array();
*
* @return array
* profileIds profile ids
- * @static
*/
public static function getBatchProfiles() {
$query = "SELECT id
* @param array $fields
* Associated array of profile fields.
*
- * @static
*/
public static function reformatProfileFields(&$fields) {
//reformat fields array
* (reference) an assoc array of name/value pairs.
*
* @return CRM_Core_DAO_UFJoin
- * @static
*/
public static function &create($params) {
// see if a record exists with the same weight
*
* @return int
* or null
- * @static
*/
public static function findJoinEntryId(&$params) {
if (!empty($params['id'])) {
*
* @return int
* or null
- * @static
*/
public static function findUFGroupId(&$params) {
* @param bool $isLogin
*
* @return void
- * @static
*/
public static function synchronize(&$user, $update, $uf, $ctype, $isLogin = FALSE) {
$userSystem = CRM_Core_Config::singleton()->userSystem;
* @param bool $isLogin
*
* @return CRM_Core_DAO_UFMatch|bool
- * @static
*/
public static function &synchronizeUFMatch(&$user, $userKey, $uniqId, $uf, $status = NULL, $ctype = NULL, $isLogin = FALSE) {
$config = CRM_Core_Config::singleton();
* Id of the contact to update.
*
* @return void
- * @static
*/
public static function updateUFName($contactId) {
if (!$contactId) {
* Email to be modified for the user.
*
* @return void
- * @static
*/
public static function updateContactEmail($contactId, $emailAddress) {
$strtolower = function_exists('mb_strtolower') ? 'mb_strtolower' : 'strtolower';
* Id of the user to delete.
*
* @return void
- * @static
*/
public static function deleteUser($ufID) {
$ufmatch = new CRM_Core_DAO_UFMatch();
*
* @return int
* contact_id on success, null otherwise
- * @static
*/
public static function getContactId($ufID) {
if (!isset($ufID)) {
*
* @return int
* uf_id of the given contact_id on success, null otherwise
- * @static
*/
public static function getUFId($contactID) {
if (!isset($contactID)) {
*
* @return int
* contact_id on success, null otherwise
- * @static
*/
public static function getContactIDs() {
$id = array();
*
* @return bool
* true if allowed to login, false otherwise
- * @static
*/
public static function getAllowedToLogin($openId) {
$ufmatch = new CRM_Core_DAO_UFMatch();
*
* @return int
* next highest unused value for uf_id
- * @static
*/
public static function getNextUfIdValue() {
$query = "SELECT MAX(uf_id)+1 AS next_uf_id FROM civicrm_uf_match";
*
* @return object
* CRM_Core_BAO_Website object on success, null otherwise
- * @static
*/
public static function add(&$params) {
$hook = empty($params['id']) ? 'create' : 'edit';
* @param $skipDelete
*
* @return void
- * @static
*/
public static function create(&$params, $contactID, $skipDelete) {
if (empty($params)) {
* Website ids.
*
* @return void
- * @static
*/
public static function del($ids) {
$query = 'DELETE FROM civicrm_website WHERE id IN ( ' . implode(',', $ids) . ')';
* @param $values
*
* @return boolean
- * @static
*/
public static function &getValues(&$params, &$values) {
$websites = array();
*
* @return array
* the array of website details
- * @static
*/
public static function allWebsites($id, $updateBlankLocInfo = FALSE) {
if (!$id) {
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Core_DAO_WordRepalcement
- * @static
*/
public static function retrieve(&$params, &$defaults) {
* @param null $reset
*
* @return null|CRM_Core_BAO_WordRepalcement
- * @static
*/
public static function getWordReplacement($reset = NULL) {
static $wordReplacement = NULL;
* WordReplacement id.
*
* @return object
- * @static
*/
public static function del($id) {
$dao = new CRM_Core_DAO_WordReplacement();
* We only need one instance of this object. So we use the singleton
* pattern and cache the instance in this variable
* @var object
- * @static
*/
private static $_singleton = NULL;
* Array of tables.
*
* @return null
- * @static
*/
public static function tableNames(&$tables) {
$info = self::_info();
* whether to force a reconstruction.
*
* @return CRM_Core_Config
- * @static
*/
public static function &singleton($loadFromDB = TRUE, $force = FALSE) {
if (self::$_singleton === NULL || $force) {
* @param array (reference ) the parameters that need a value
*
* @return boolean
- * @static
*/
public static function check(&$config, &$required) {
foreach ($required as $name) {
/**
* Format size
*
- * @static
*/
public static function formatUnitSize($size, $checkForPostMax = FALSE) {
* this variable is set true for GUI
* mode (eg: Global setting >> Components)
*
- * @static
*/
public static function setValues(&$defaults, $formMode = FALSE) {
$config = CRM_Core_Config::singleton();
* The database connection string.
*
* @return void
- * @static
*/
public static function init($dsn) {
$options = &PEAR::getStaticProperty('DB_DataObject', 'options');
* The factory application object.
*
* @return void
- * @static
*/
public static function setFactory(&$factory) {
self::$_factory = &$factory;
/**
* Returns list of FK relationships
*
- * @static
*
* @return array
* Array of CRM_Core_Reference_Interface
* (reference ) associative array of name/value pairs.
*
* @return void
- * @static
*/
public static function storeValues(&$object, &$values) {
$fields = &$object->fields();
*
* @return array|null
* the attributes for the object
- * @static
*/
public static function makeAttribute($field) {
if ($field) {
*
* @return array
* assoc array of name => attribute pairs
- * @static
*/
public static function getAttribute($class, $fieldName = NULL) {
$object = new $class();
*
* @return boolean
* true if object exists
- * @static
*/
public static function objectExists($value, $daoName, $daoID, $fieldName = 'name') {
$object = new $daoName();
*
* @return boolean
* true if exists, else false
- * @static
*/
public static function checkFieldExists($tableName, $columnName, $i18nRewrite = TRUE) {
$query = "
* @param string $fieldName
*
* @return array
- * @static
*/
public static function getStorageValues($tableName = NULL, $maxTablesToCheck = 10, $fieldName = 'Engine') {
$values = array();
*
* @return boolean
* true if constraint exists, false otherwise
- * @static
*/
public static function checkConstraintExists($tableName, $constraint) {
static $show = array();
*
* @return boolean
* true if in format, false otherwise
- * @static
*/
public static function checkFKConstraintInFormat($tableName, $columnName) {
static $show = array();
*
* @return boolean
* true if the value is always $columnValue, false otherwise
- * @static
*/
public static function checkFieldHasAlwaysValue($tableName, $columnName, $columnValue) {
$query = "SELECT * FROM $tableName WHERE $columnName != '$columnValue'";
*
* @return boolean
* true if if the value is always NULL, false otherwise
- * @static
*/
public static function checkFieldIsAlwaysNull($tableName, $columnName) {
$query = "SELECT * FROM $tableName WHERE $columnName IS NOT NULL";
*
* @return boolean
* true if exists, else false
- * @static
*/
public static function checkTableExists($tableName) {
$query = "
*
* @return string|null
* Value of $returnColumn in the retrieved record
- * @static
*/
public static function getFieldValue($daoName, $searchValue, $returnColumn = 'name', $searchColumn = 'id', $force = FALSE) {
if (
*
* @return boolean
* true if we found and updated the object, else false
- * @static
*/
public static function setFieldValue($daoName, $searchValue, $setColumn, $setValue, $searchColumn = 'id') {
$object = new $daoName();
*
* @return string
* sortString
- * @static
*/
public static function getSortString($sort, $default = NULL) {
// check if sort is of type CRM_Utils_Sort
*
* @return object
* an object of type referenced by daoName
- * @static
*/
public static function commonRetrieve($daoName, &$params, &$defaults, $returnProperities = NULL) {
$object = new $daoName();
* Id of the contact to delete.
*
* @return void
- * @static
*/
public static function deleteEntityContact($daoName, $contactId) {
$object = new $daoName();
*
* @return CRM_Core_DAO
* object that holds the results of the query
- * @static
*/
static function &executeQuery(
$query,
* @return string|null
* the result of the query if any
*
- * @static
*/
static function &singleValueQuery(
$query,
*
* @return object
* an object of type referenced by daoName
- * @static
*/
public static function commonRetrieveAll($daoName, $fieldIdName = 'id', $fieldId, &$details, $returnProperities = NULL) {
require_once(str_replace('_', DIRECTORY_SEPARATOR, $daoName) . ".php");
* We only need one instance of this object. So we use the singleton
* pattern and cache the instance in this variable
* @var object
- * @static
*/
private static $_singleton = NULL;
/**
* The logger object for this application
* @var object
- * @static
*/
private static $_log = NULL;
/**
* If modeException == true, errors are raised as exception instead of returning civicrm_errors
- * @static
*/
public static $modeException = NULL;
* @param string $stackClass
*
* @return object
- * @static
*/
public static function &singleton($package = NULL, $msgCallback = FALSE, $contextCallback = FALSE, $throwPEAR_Error = FALSE, $stackClass = 'PEAR_ErrorStack') {
if (self::$_singleton === NULL) {
* @throws Exception
*
* @return void
- * @static
*/
public static function fatal($message = NULL, $code = NULL, $email = NULL) {
$vars = array(
* @param Exception $exception
*
* @return void
- * @static
*/
public static function handleUnhandledException($exception) {
try {
*
* @return string
* the generated output
- * @static
*/
public static function debug($name, $variable = NULL, $log = TRUE, $html = TRUE, $checkPermission = TRUE) {
$error = self::singleton();
* the generated output
*
*
- * @static
*
* @see CRM_Core_Error::debug()
* @see CRM_Core_Error::debug_log_message()
* format of the backtrace
*
*
- * @static
*/
public static function debug_log_message($message, $out = FALSE, $comp = '') {
$config = CRM_Core_Config::singleton();
* @param null $redirect
* @param string $title
* @return void
- * @static
*/
public static function statusBounce($status, $redirect = NULL, $title = NULL) {
$session = CRM_Core_Session::singleton();
/**
* Reset the error stack
*
- * @static
*/
public static function reset() {
$error = self::singleton();
* The PEAR_ERROR object.
* @return object
* $obj
- * @static
*/
public static function nullHandler($obj) {
CRM_Core_Error::debug_log_message("Ignoring exception thrown by nullHandler: {$obj->code}, {$obj->message}");
* @param CRM_Core_Form $form
* The form object that we are operating on.
*
- * @static
*/
public static function buildAllowedDateFormats(&$form) {
* @param bool|string $displayTime
*
*
- * @static
*/
static function buildDateRange(
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($values) {
$errors = array();
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* The converter from array size to css class
*
* @var array
- * @static
*/
static $_sizeMapper = array(
2 => 'two',
* Error associated with the element.
*
* @return array
- * @static
*/
public static function updateAttributes(&$element, $required, $error) {
// lets create an id for all input elements, so we can generate nice label tags
* If you need to create tagsetlist with specific name.
*
* @return void
- * @static
*/
static function buildQuickForm(
&$form, $parentNames, $entityTable, $entityId = NULL, $skipTagCreate = FALSE,
* Form object.
*
* @return void
- * @static
*/
public static function postProcess(&$params, $entityId, $entityTable = 'civicrm_contact', &$form) {
if ($form && !empty($form->_entityTagValues)) {
*
* @return string
* the full path to the config file
- * @static
*/
public static function createConfigFile($force = FALSE) {
$config = CRM_Core_Config::singleton();
* @return string
* HTML. For non-HTML content, invoke() may call print() and exit().
*
- * @static
*/
public static function invoke($args) {
try {
* @param $contact_type
* @param $contact_sub_type
*
- * @static
*/
public static function form($action, $contact_type, $contact_sub_type) {
CRM_Utils_System::setUserContext(array('civicrm/contact/search/basic', 'civicrm/contact/view'));
* to the smarty instance
*
* @return void
- * @static
*/
public static function sidebarLeft() {
$config = CRM_Core_Config::singleton();
*
* @return string
* private key for this session
- * @static
*/
public static function privateKey() {
if (!self::$_key) {
*
* @return string
* valid formID
- * @static
*/
public static function get($name, $addSequence = FALSE) {
$privateKey = self::privateKey();
*
* @return string
* if valid, else null
- * @static
*/
public static function validate($key, $name, $addSequence = FALSE) {
if (!is_string($key)) {
* The list of menu items
*
* @var array
- * @static
*/
static $_items = NULL;
* The list of permissioned menu items
*
* @var array
- * @static
*/
static $_permissionedItems = NULL;
* @param boolen $fetchFromXML
* Fetch the menu items from xml and not from cache.
*
- * @static
*/
public static function &items($fetchFromXML = FALSE) {
return self::xmlItems($fetchFromXML);
* @return array
* The breadcrumb for this path
*
- * @static
*/
public static function buildBreadcrumb(&$menu, $path) {
$crumbs = array();
*
* @return array
* the values as specified by the above params
- * @static
* @void
*/
static function &values(
*
* @return array
* Array of values as specified by the above params
- * @static
* @void
*/
public static function &valuesByID($id, $flip = FALSE, $grouping = FALSE, $localize = FALSE, $labelColumnName = 'label', $onlyActive = TRUE, $fresh = FALSE) {
*
* @return void
*
- * @static
*/
public static function lookupValues(&$params, &$names, $flip = FALSE) {
foreach ($names as $postName => $value) {
* @param string $groupName
* The name of the option group.
*
- * @static
*
* @return string
* the value from the row where is_default = true
* @param null $groupTitle
* The optional label of the option group else set to group name.
*
- * @static
*
* @return int
* the option group ID
* Static field for all the option value information that we can potentially export
*
* @var array
- * @static
*/
static $_exportableFields = NULL;
* Static field for all the option value information that we can potentially export
*
* @var array
- * @static
*/
static $_importableFields = NULL;
* Static field for all the option value information that we can potentially export
*
* @var array
- * @static
*/
static $_fields = NULL;
* @return array
* Array of option-values
*
- * @static
*/
public static function getRows($groupParams, $links, $orderBy = 'weight') {
$optionValue = array();
*
* @return CRM_Core_DAO_OptionValue
*
- * @static
*/
public static function addOptionValue(&$params, &$groupParams, &$action, &$optionValueID) {
$params['is_active'] = CRM_Utils_Array::value('is_active', $params, FALSE);
*
* @return boolean
* true if object exists
- * @static
*/
public static function optionExists($value, $daoName, $daoID, $optionGroupID, $fieldName = 'name') {
$object = new $daoName();
*
* @return boolean
* true if object exists
- * @static
*/
public static function getFields($mode = '', $contactType = 'Individual') {
$key = "$mode $contactType";
* @return array
* Array of option-values
*
- * @static
*/
public static function getValues($groupParams, &$values, $orderBy = 'weight', $isActive = FALSE) {
if (empty($groupParams)) {
* Cache the smarty template for efficiency reasons
*
* @var CRM_Core_Smarty
- * @static
*/
static protected $_template;
* Cache the session for efficiency reasons
*
* @var CRM_Core_Session
- * @static
*/
static protected $_session;
/**
* Call generic ajax forms
*
- * @static
*/
public static function run() {
$className = CRM_Utils_Type::escape($_REQUEST['class_name'], 'String');
/**
* Change is_quick_config priceSet to complex
*
- * @static
*/
public static function setIsQuickConfig() {
$id = $context = NULL;
*
* @return CRM_Core_Payment
* @throws \CRM_Core_Exception
- * @static
*/
public static function &singleton($mode = 'test', &$paymentProcessor, &$paymentForm = NULL, $force = FALSE) {
// make sure paymentProcessor is not empty
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* pattern and cache the instance in this variable
*
* @var CRM_Core_Payment_Elavon
- * @static
*/
static private $_singleton = NULL;
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* @param bool $reverse
*
* @return void
- * @static
*/
public static function mapParams($id, &$src, &$dst, $reverse = FALSE) {
static $map = NULL;
* @param $src
*
* @return int
- * @static
*/
public static function getCreditCardExpirationMonth($src) {
if ($month = CRM_Utils_Array::value('M', $src['credit_card_exp_date'])) {
* @param $src
*
* @return int
- * @static
*/
public static function getCreditCardExpirationYear($src) {
return CRM_Utils_Array::value('Y', $src['credit_card_exp_date']);
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* @param $paymentProcessor
*
* @return object
- * @static
*/
public static function &singleton($mode, $component, &$paymentProcessor) {
if (self::$_singleton === NULL) {
* @internal param \xml $xml_response response send by google in xml format
* @return array
* context of this call (test, module, payment processor id)
- * @static
*/
public function getContext($privateData, $orderNo, $root, $response, $serial) {
$contributionID = CRM_Utils_Array::value('contributionID', $privateData);
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
*
* @return array
* context of this call (test, component, payment processor id)
- * @static
*/
public static function getContext($privateData, $orderNo) {
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
*
* @return boolean
* true if yes, else false
- * @static
*/
public static function check($permissions) {
$permissions = (array) $permissions;
*
* @return boolean
* true if yes, else false
- * @static
*/
public static function checkGroupRole($array) {
$config = CRM_Core_Config::singleton();
* @param bool $excludeHidden
* exclude hidden groups.
*
- * @static
*
* @return array
* array reference of all groups.
* return string $componentName the name of component.
*
* @return int|null|string
- * @static
*/
public static function getComponentName($permission) {
$componentName = NULL;
*
* @return boolean
* true if yes, else false
- * @static
*/
public function checkGroupRole($array) {
return FALSE;
/**
* Static cache for pseudoconstant arrays
* @var array
- * @static
*/
private static $cache;
*
* activity type
* @var array
- * @static
*/
private static $activityType;
/**
* States, provinces
* @var array
- * @static
*/
private static $stateProvince;
/**
* Counties
* @var array
- * @static
*/
private static $county;
/**
* States/provinces abbreviations
* @var array
- * @static
*/
private static $stateProvinceAbbreviation;
/**
* Country
* @var array
- * @static
*/
private static $country;
/**
* CountryIsoCode
* @var array
- * @static
*/
private static $countryIsoCode;
*
* group
* @var array
- * @static
*/
private static $group;
/**
* GroupIterator
* @var mixed
- * @static
*/
private static $groupIterator;
/**
* RelationshipType
* @var array
- * @static
*/
private static $relationshipType;
/**
* Civicrm groups that are not smart groups
* @var array
- * @static
*/
private static $staticGroup;
/**
* Currency codes
* @var array
- * @static
*/
private static $currencyCode;
/**
* Payment processor
* @var array
- * @static
*/
private static $paymentProcessor;
/**
* Payment processor types
* @var array
- * @static
*/
private static $paymentProcessorType;
/**
* World Region
* @var array
- * @static
*/
private static $worldRegions;
*
* activity status
* @var array
- * @static
*/
private static $activityStatus;
/**
* Visibility
* @var array
- * @static
*/
private static $visibility;
/**
* Greetings
* @var array
- * @static
*/
private static $greeting;
/**
* Default Greetings
* @var array
- * @static
*/
private static $greetingDefaults;
/**
* Extensions of type module
* @var array
- * @static
*/
private static $extensions;
/**
* Financial Account Type
* @var array
- * @static
*/
private static $accountOptionValues;
/**
* Tax Rates
* @var array
- * @static
*/
private static $taxRates;
* @return Array|bool
* array on success, FALSE on error.
*
- * @static
*/
public static function get($daoName, $fieldName, $params = array(), $context = NULL) {
CRM_Core_DAO::buildOptionsContext($context);
* @param null $force
*
* @return void
- * @static
*/
public static function populate(
&$var,
* Flush given pseudoconstant so it can be reread from db
* nex time it's requested.
*
- * @static
*
* @param bool|string $name pseudoconstant to be flushed
*/
*
* The static array activityType is returned
*
- * @static
*
* @return array
* array reference of all activity types.
*
* Note: any database errors will be trapped by the DAO.
*
- * @static
*
* @param bool|int $id - Optional id to return
*
*
* Same as above, except gets the abbreviations instead of the names.
*
- * @static
*
* @param bool|int $id - Optional id to return
*
*
* Note: any database errors will be trapped by the DAO.
*
- * @static
*
* @param bool|int $id - Optional id to return
*
*
* Note: any database errors will be trapped by the DAO.
*
- * @static
*
* @param bool $id
*
* @param bool $excludeHidden
* Exclude hidden groups.
*
- * @static
*
* @return array
* array reference of all groups.
* called for the first time
*
*
- * @static
*
* @param bool $styledLabels
*
* @param bool $excludeHidden
* Exclude hidden groups.
*
- * @static
*
* @return array
* array reference of all groups.
*
* Note: any database errors will be trapped by the DAO.
*
- * @static
*
* @param bool $onlyPublic
* @param null $groupType
* @param bool $reset
* Reset relationship types if true.
*
- * @static
*
* @return array
* array reference of all relationship types.
*
* @return array
* array reference of all currency codes
- * @static
*/
public static function ¤cyCode() {
if (!self::$currencyCode) {
*
* Note: any database errors will be trapped by the DAO.
*
- * @static
*
* @param bool|int $id - Optional id to return
*
*
* The static array paymentProcessor is returned
*
- * @static
*
* @param bool $all
* Get payment processors - default is to get only active ones.
*
* The static array paymentProcessorType is returned
*
- * @static
*
* @param bool $all
* Get payment processors - default is to get only active ones.
*
* @return array
* array reference of all World Regions
- * @static
*/
public static function &worldRegion($id = FALSE) {
if (!self::$worldRegions) {
*
* The static array activityStatus is returned
*
- * @static
*
* @param string $column
*
*
* The static array visibility is returned
*
- * @static
*
* @param string $column
*
*
* @return int
* the country id that the state belongs to
- * @static
*/
public static function countryIDForStateID($stateID) {
if (empty($stateID)) {
*
* The static array of greeting is returned
*
- * @static
*
* @param $filter
* Get All Email Greetings - default is to get only active ones.
/**
* Construct array of default greeting values for contact type
*
- * @static
*
* @return array
* array reference of default greetings.
* FIXME: This is called by civix but not by any core code. We
* should provide an API call which civix can use instead.
*
- * @static
*
* @return array
* array($fullyQualifiedName => $label) list of extensions
*
* The static array option values is returned
*
- * @static
*
* @param bool $optionGroupName
* Get All Option Group values- default is to get only active ones.
*
* @param bool $fresh
* Whether to forcibly reload extensions list from canonical store.
- * @static
*
* @return array
* array(array('prefix' => $, 'file' => $))
*
* The static array tax rates is returned
*
- * @static
- *
* @return array
* array list of tax rates with the financial type
*/
* @return mixed
* empty if output is printed, else output
*
- * @static
*/
public static function makeCSVTable(&$header, &$rows, $titleHeader = NULL, $print = TRUE, $outputHeader = TRUE) {
if ($titleHeader) {
* -.
*
* @return void
- * @static
*/
public static function writeCSVFile($fileName, &$header, &$rows, $titleHeader = NULL, $outputHeader = TRUE, $saveFile = NULL) {
if ($outputHeader && !$saveFile) {
* We don't have a container or dependency-injection, so use singleton instead
*
* @var object
- * @static
*/
private static $_singleton = NULL;
/**
* Preferred mail format
- * @static
*/
public static function pmf() {
return array(
/**
* Privacy options
- * @static
*/
public static function privacy() {
return array(
/**
* Various pre defined contact super types
- * @static
*/
public static function contactType() {
static $contactType = NULL;
/**
* Various pre defined unit list
- * @static
*/
public static function unitList($unitType = NULL) {
$unitList = array(
/**
* Membership type unit
- * @static
*/
public static function membershipTypeUnitList() {
return self::unitList('duration');
/**
* Various pre defined period types
- * @static
*/
public static function periodType() {
return array(
/**
* Various pre defined email selection methods
- * @static
*/
public static function emailSelectMethods() {
return array(
/**
* Various pre defined member visibility options
- * @static
*/
public static function memberVisibility() {
return array(
/**
* Member auto-renew options
- * @static
*/
public static function memberAutoRenew() {
return array(
/**
* Various pre defined event dates
- * @static
*/
public static function eventDate() {
return array(
/**
* Custom form field types
- * @static
*/
public static function customHtmlType() {
return array(
/**
* Various pre defined extensions for dynamic properties and groups
*
- * @static
*/
public static function customGroupExtends() {
$customGroupExtends = array(
/**
* Styles for displaying the custom data group
*
- * @static
*/
public static function customGroupStyle() {
return array(
/**
* For displaying the uf group types
*
- * @static
*/
public static function ufGroupTypes() {
$ufGroupType = array(
/**
* The status of a contact within a group
*
- * @static
*/
public static function groupContactStatus() {
return array(
/**
* List of Group Types
- * @static
*/
public static function groupType() {
return array(
*
* @return array
* the date array
- * @static
*/
public static function date($type = NULL, $format = NULL, $minOffset = NULL, $maxOffset = NULL) {
/**
* Values for UF form visibility options
*
- * @static
*/
public static function ufVisibility() {
return array(
/**
* Values for group form visibility options
*
- * @static
*/
public static function groupVisibility() {
return array(
/**
* Different type of Mailing Components
*
- * @static
* return array
*/
public static function mailingComponents() {
* Get hours
*
*
- * @static
*/
public function getHours() {
$hours = array();
* Get minutes
*
*
- * @static
*/
public function getMinutes() {
$minutes = array();
*
* @return array
* array of map providers
- * @static
*/
public static function mapProvider() {
static $map = NULL;
*
* @return array
* array of geocoder providers
- * @static
*/
public static function geoProvider() {
static $geo = NULL;
*
* @return array
* array of address standardization providers
- * @static
*/
public static function addressProvider() {
static $addr = NULL;
/**
* Different type of Mailing Tokens
*
- * @static
* return array
*/
public static function mailingTokens() {
/**
* Different type of Activity Tokens
*
- * @static
* return array
*/
public static function activityTokens() {
/**
* Different type of Membership Tokens
*
- * @static
* return array
*/
public static function membershipTokens() {
/**
* Different type of Event Tokens
*
- * @static
* return array
*/
public static function eventTokens() {
/**
* Different type of Event Tokens
*
- * @static
* return array
*/
public static function contributionTokens() {
/**
* Different type of Contact Tokens
*
- * @static
* return array
*/
public static function contactTokens() {
/**
* Different type of Participant Tokens
*
- * @static
* return array
*/
public static function participantTokens() {
/**
* Get numeric options
*
- *
- * @static
*/
public static function getNumericOptions($start = 0, $end = 10) {
$numericOptions = array();
/**
* Barcode types
- * @static
*/
public static function getBarcodeTypes() {
return array(
/**
* Profile group types
*
- * @static
*/
public static function getProfileGroupType() {
$profileGroupType = array(
* Array of properties that the controller dumps into the output object
*
* @var array
- * @static
*/
public static $_properties = array('columnHeaders', 'rows', 'rowsEmpty');
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* Singleton function used to manage this object
*
* @return CRM_Core_Session
- * @static
*/
public static function &singleton() {
if (self::$_singleton === NULL) {
* defaults to 10 seconds for most messages, 5 if it has a title but no body,
* or 0 for errors or messages containing links
*
- * @static
*
* @return void
*/
* Load icon vars used in hide and show links
*
* @return void
- * @static
*/
public static function setIcons() {
if (!isset(self::$_showIcon)) {
*
* @param bool $assign
*
- * @static
*
* @return void
*/
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
/**
* This array defines weights for table, which are used to sort array of table in from clause
* @var array
- * @static
*/
static $info = array(
'civicrm_contact' => '01',
* Array for valid combinations of data_type & html_type
*
* @var array
- * @static
*/
private static $_dataTypeValues = NULL;
private static $_dataTypeKeys = NULL;
* @return array
* if errors then list of errors to be posted back to the form,
* true otherwise
- * @static
*/
public static function formRule($fields, $files, $self) {
$default = CRM_Utils_Array::value('default_value', $fields);
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields, $files, $form) {
$optionLabel = $fields['label'];
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields) {
$errors = array();
*
* @return array
*
- * @static
*/
public function getGroupFieldsForImport($id) {
$importableFields = array();
* @param string $contactType
* Individual, Household or Organization.
*
- * @static
*
* @return array
* id => "nice name" of rule group
* Based on the provided two contact_ids and a set of tables, move the
* belongings of the other contact to the main one.
*
- * @static
*/
public static function moveContactBelongings($mainId, $otherId, $tables = FALSE, $tableOperations = array()) {
$cidRefs = self::cidRefs();
* Contact details.
*
* @return array
- * @static
*/
public static function findDifferences($main, $other) {
$result = array(
* @param bool $redirectForPerformance
*
* @return array|bool
- * @static
*/
public static function batchMerge($rgid, $gid = NULL, $mode = 'safe', $autoFlip = TRUE, $redirectForPerformance = FALSE) {
$contactType = CRM_Core_DAO::getFieldValue('CRM_Dedupe_DAO_RuleGroup', $rgid, 'contact_type');
* @param bool $redirectForPerformance
*
* @return array|bool
- * @static
*/
public static function merge($dupePairs = array(), $cacheParams = array(), $mode = 'safe',
$autoFlip = TRUE, $redirectForPerformance = FALSE
* Does a force merge otherwise (aggressive mode).
*
* @return bool
- * @static
*/
public static function skipMerge($mainId, $otherId, &$migrationInfo, $mode = 'safe') {
$conflicts = array();
* Duplicate contact which would be deleted after merge operation.
*
* @return array|bool|int
- * @static
*/
public static function getRowsElementsAndInfo($mainId, $otherId) {
$qfZeroBug = 'e8cddb72-a257-11dc-b9cc-0016d3330ee9';
* @param $migrationInfo
*
* @return bool
- * @static
*/
public static function moveAllBelongings($mainId, $otherId, $migrationInfo) {
if (empty($migrationInfo)) {
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Event_BAO_ManageEvent
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$event = new CRM_Event_DAO_Event();
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Event_DAO_Event', $id, 'is_active', $is_active);
* @param array $params
* Reference array contains the values submitted by the form.
*
- * @static
*
* @return object
*/
* Reference array contains the values submitted by the form.
*
* @return object
- * @static
*/
public static function create(&$params) {
$transaction = new CRM_Core_Transaction();
* Event id.
*
* @return mixed|null
- * @static
*/
public static function del($id) {
if (!$id) {
* @param int $eventId
* Event with which loc block is associated.
*
- * @static
*/
public static function deleteEventLocBlock($locBlockId, $eventId = NULL) {
$query = "SELECT count(ce.id) FROM civicrm_event ce WHERE ce.loc_block_id = $locBlockId";
* true if you need to check permission else false.
*
* @return array
- * @static
*/
static function getEvents(
$all = 0,
/**
* Get events Summary
*
- * @static
*
* @return array
* Array of event summary values
*
* @return null|string
* title of the event
- * @static
*/
public static function &getMapInfo(&$id) {
*
* @return array
* array of all the events that are searched
- * @static
*/
static function &getCompleteInfo(
$start = NULL,
* @param array $profileFields
*
* @return void
- * @static
*/
public static function displayProfile(&$params, $gid, &$groupTitle, &$values, &$profileFields = array()) {
if ($gid) {
*
* @return string
* the permission that the user has (or null)
- * @static
*/
public static function checkPermission($eventId = NULL, $type = CRM_Core_Permission::VIEW) {
static $permissions = NULL;
*
* @return array
* an array of email ids
- * @static
*/
public static function getFromEmailIds($eventId = NULL) {
$fromEmailValues['from_email_id'] = CRM_Core_BAO_Email::getFromEmail();
*
* @return int
* event total seats w/ given criteria.
- * @static
*/
public static function eventTotalSeats($eventId, $extraWhereClause = NULL) {
if (empty($eventId)) {
* Static field for all the participant information that we can potentially import
*
* @var array
- * @static
*/
static $_importableFields = NULL;
* Static field for all the participant information that we can potentially export
*
* @var array
- * @static
*/
static $_exportableFields = NULL;
* Static array for valid status transitions rules
*
* @var array
- * @static
*/
static $_statusTransitionsRules = array(
'Pending from pay later' => array('Registered', 'Cancelled'),
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Event_BAO_Participant
- * @static
*/
public static function &add(&$params) {
* @param $ids
*
* @return CRM_Event_BAO_Participant|null the found object or null
- * @static
*/
public static function getValues(&$params, &$values, &$ids) {
if (empty($params)) {
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Event_BAO_Participant
- * @static
*/
public static function create(&$params) {
*
* @return bool|int|null|string
* 1. false => If event having some empty spaces.
- * @static
*/
static function eventFull(
$eventId,
*
* @return array
* an array of each option id and total count
- * @static
*/
static function priceSetOptionsCount(
$eventId,
*
* @return int
* $spaces Number of Empty Seats/null.
- * @static
*/
public static function pendingToConfirmSpaces($eventId) {
$emptySeats = 0;
*
* @return array
* array of importable Fields
- * @static
*/
public static function &importableFields($contactType = 'Individual', $status = TRUE, $onlyParticipant = FALSE) {
if (!self::$_importableFields) {
*
* @return array
* array of exportable Fields
- * @static
*/
public static function &exportableFields() {
if (!self::$_exportableFields) {
*
* @return array
* associated array with sort_name and event title
- * @static
*/
public static function participantDetails($participantId) {
$query = "
* True if we want to resolve the values in the reverse direction (value -> name).
*
* @return void
- * @static
*/
public static function resolveDefaults(&$defaults, $reverse = FALSE) {
self::lookupValue($defaults, 'event', CRM_Event_PseudoConstant::event(), $reverse);
* Id of the participation to delete.
*
* @return void
- * @static
*/
public static function deleteParticipant($id) {
CRM_Utils_Hook::pre('delete', 'Participant', $id, CRM_Core_DAO::$_nullArray);
* from other function
*
* @return CRM_Contribute_BAO_Contribution
- * @static
*/
public static function checkDuplicate($input, &$duplicates) {
$eventId = CRM_Utils_Array::value('event_id', $input);
* @param string $eventLevel
* Event_leval string from db.
*
- * @static
*
* @return void
*/
* @param int $oldStatusId
*
* @return array
- * @static
*/
public static function getAdditionalParticipantIds($primaryParticipantId, $excludeCancel = TRUE, $oldStatusId = NULL) {
$additionalParticipantIds = array();
* Do fetch from line items.
*
* @return array
- * @static
*/
public function getFeeDetails($participantIds, $hasLineItems = FALSE) {
$feeDetails = array();
*
* @return array
* $displayName => $viewUrl
- * @static
*/
public static function getAdditionalParticipants($primaryParticipantID) {
$additionalParticipantIDs = array();
* @param bool $updatePrimaryStatus
*
* @return bool|void
- * @static
*/
public static function updateParticipantStatus($participantID, $oldStatusID, $newStatusID = NULL, $updatePrimaryStatus = FALSE) {
if (!$participantID || !$oldStatusID) {
*
* @return void
*
- * @static
*/
public static function updateStatus($participantIds, $statusId, $updateRegisterDate = FALSE) {
if (!is_array($participantIds) || empty($participantIds) || !$statusId) {
* @param bool $skipCascadeRule
*
* @return array
- * @static
*/
static function transitionParticipants(
$participantIds, $toStatusId,
* return void
*
* @return bool
- * @static
*/
static function sendTransitionParticipantMail(
$participantId,
*
* @return int
* count of participant records
- * @static
*/
public static function getContactParticipantCount($contactID) {
$query = "SELECT count(*)
* Exclude cancelled additional participant.
*
* @return array
- * @static
*/
public static function getParticipantIds($contributionId, $excludeCancelled = FALSE) {
*
* @return array
* Array of Urls.
- * @static
*/
public static function getAdditionalParticipantUrl($participantIds) {
foreach ($participantIds as $value) {
*
* @param $feeLevel
*
- * @static
*/
public static function createDiscountTrxn($eventID, $contributionParams, $feeLevel) {
// CRM-11124
* @param int $contactId
* Contact id.
*
- * @static
*/
public static function deleteContactParticipant($contactId) {
$participant = new CRM_Event_DAO_Participant();
*
* @return object
* the partcipant payment record
- * @static
*/
public static function create(&$params, &$ids) {
if (isset($ids['id'])) {
*
* @return boolean
* true if deleted false otherwise
- * @static
*/
public static function deleteParticipantPayment($params) {
$participantPayment = new CRM_Event_DAO_ParticipantPayment();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($values) {
$errors = array();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($values) {
$errors = array();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields) {
// check for state/country mapping
*
* @param CRM_Core_Form $form
*
- * @static
*/
public function buildRegistrationBlock(&$form) {
$attributes = CRM_Core_DAO::getAttribute('CRM_Event_DAO_Event');
*
* @param CRM_Core_Form $form
*
- * @static
*/
public function buildConfirmationBlock(&$form) {
$attributes = CRM_Core_DAO::getAttribute('CRM_Event_DAO_Event');
*
* @param CRM_Core_Form $form
*
- * @static
*/
public function buildMailBlock(&$form) {
$form->registerRule('emailList', 'callback', 'emailList', 'CRM_Utils_Rule');
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($values, $files, $form) {
if (!empty($values['is_online_registration'])) {
* @param array $listOfRelatedEntities
* List of related event ids .
*
- * @static
*
* @return array
*/
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($values, $files, $self) {
// If $values['_qf_Participant_next'] is Delete or
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
* Discount id for the event.
*
* @return void
- * @static
*/
static public function buildAmount(&$form, $required = TRUE, $discountId = NULL) {
// build amount only when needed, skip incase of event full and waitlisting is enabled
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($params) {
$errors = array();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields) {
return TRUE;
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_actionLinks = NULL;
* Event
*
* @var array
- * @static
*/
private static $event;
* Participant Status
*
* @var array
- * @static
*/
private static $participantStatus;
* Participant Role
*
* @var array
- * @static
*/
private static $participantRole;
* Participant Listing
*
* @var array
- * @static
*/
private static $participantListing;
* Event Type.
*
* @var array
- * @static
*/
private static $eventType;
/**
* Personal campaign pages
* @var array
- * @static
*/
private static $pcPage;
*
* @return array
* array of all events if any
- * @static
*/
public static function event($id = NULL, $all = FALSE, $condition = NULL) {
$key = "{$id}_{$all}_{$condition}";
*
* @return array
* array reference of all participant statuses if any
- * @static
*/
public static function &participantStatus($id = NULL, $cond = NULL, $retColumn = 'name') {
if (self::$participantStatus === NULL) {
*
* @return array
* array reference of all participant roles if any
- * @static
*/
public static function &participantRole($id = NULL, $cond = NULL) {
$index = $cond ? $cond : 'No Condition';
*
* @return array
* array reference of all participant listings if any
- * @static
*/
public static function &participantListing($id = NULL) {
if (!self::$participantListing) {
* @param int $id
* @return array
* array reference of all event types.
- * @static
*/
public static function &eventType($id = NULL) {
if (!self::$eventType) {
* Flush given pseudoconstant so it can be reread from db
* nex time it's requested.
*
- * @static
*
* @param bool|string $name pseudoconstant to be flushed
*/
* @param int $id
* @return array
* array reference of all pcp if any
- * @static
*/
public static function &pcPage($id = NULL) {
if (!self::$pcPage) {
* This defines two actions- View and Edit.
*
* @var array
- * @static
*/
static $_links = NULL;
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
- * @static
*/
static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
- * @static
*/
static $_properties = array(
'contact_id',
* The task array
*
* @var array
- * @static
*/
static $_tasks = NULL;
* The optional task array
*
* @var array
- * @static
*/
static $_optionalTasks = NULL;
*
* @return array
* the set of tasks for a group of contacts
- * @static
*/
public static function &tasks() {
if (!(self::$_tasks)) {
*
* @return array
* the set of task titles
- * @static
*/
public static function &taskTitles() {
self::tasks();
*
* @return array
* the set of optional tasks for a group of contacts
- * @static
*/
public static function &optionalTaskTitle() {
$tasks = array(
*
* @return array
* the set of tasks for a group of participants
- * @static
*/
public static function getTask($value) {
self::tasks();
* @param array $exportParams
* @param string $queryOperator
*
- * @static
*/
static function exportComponents(
$selectAll,
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields, $values, $mappingTypeId) {
$errors = array();
*
* @return bool|array
* mixed true or array of errors
- * @static
*/
static public function formRule($params, $files, $self) {
$errors = array();
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Financial_BAO_FinancialAccount
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$financialAccount = new CRM_Financial_DAO_FinancialAccount();
*
* @return CRM_Core_DAO|null
* DAO object on success, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Financial_DAO_FinancialAccount', $id, 'is_active', $is_active);
* @param array $ids
* Reference array contains the id.
*
- * @static
* @return CRM_Financial_DAO_FinancialAccount
*/
public static function add(&$params, &$ids = array()) {
* Delete financial Types
*
* @param int $financialAccountId
- * @static
*/
public static function del($financialAccountId) {
//checking if financial type is present
*
* @return int
* accounting code
- * @static
*/
public static function getAccountingCode($financialTypeId) {
$relationTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Income Account is' "));
*
* @return int
* count
- * @static
*/
public static function getARAccounts($financialAccountId, $financialAccountTypeId = NULL, $accountTypeCode = 'ar') {
if (!$financialAccountTypeId) {
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Contribute_BAO_FinancialItem
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$financialItem = new CRM_Financial_DAO_FinancialItem();
* Contribution object.
* @param bool $taxTrxnID
*
- * @static
* @return void
*/
public static function add($lineItem, $contribution, $taxTrxnID = FALSE) {
* @param array $trxnIds
* Financial item ids.
*
- * @static
* @return object
*/
public static function create(&$params, $ids = NULL, $trxnIds = NULL) {
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Core_BAO_FinancialTrxn
- * @static
*/
public static function createEntityTrxn($params) {
$entity_trxn = new CRM_Financial_DAO_EntityFinancialTrxn();
* To retrive max id.
*
* @return array
- * @static
*/
public static function retrieveEntityFinancialTrxn($params, $maxId = FALSE) {
$financialItem = new CRM_Financial_DAO_EntityFinancialTrxn();
* Error to display.
*
* @return array
- * @static
*/
public static function checkContactPresent($contactIds, &$error) {
if (empty($contactIds)) {
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Contribute_BAO_ContributionType
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$financialType = new CRM_Financial_DAO_FinancialType();
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Financial_DAO_FinancialType', $id, 'is_active', $is_active);
* @param array $ids
* Reference array contains the id.
*
- * @static
* @return object
*/
public static function add(&$params, &$ids = array()) {
* @param int $financialTypeId
*
* @return array|bool
- * @static
*/
public static function del($financialTypeId) {
$financialType = new CRM_Financial_DAO_FinancialType();
*
* @return array
* all financial type with income account is relationship
- * @static
*/
public static function getIncomeFinancialType() {
// Financial Type
/**
* Financial account
* @var array
- * @static
*/
private static $financialAccount;
* @param array $allValues
*
* @return CRM_Contribute_BAO_ContributionType
- * @static
*/
public static function retrieve(&$params, &$defaults, &$allValues = array()) {
$financialTypeAccount = new CRM_Financial_DAO_EntityFinancialAccount();
* @param array $ids
* Reference array contains the id.
*
- * @static
* @return object
*/
public static function add(&$params, &$ids = NULL) {
* @param int $financialTypeAccountId
* @param int $accountId
*
- * @static
*/
public static function del($financialTypeAccountId, $accountId = NULL) {
//checking if financial type is present
* Column to fetch.
*
* @return null|string
- * @static
*/
public static function getFinancialAccount($entityId, $entityTable, $columnName = 'name') {
$join = $columnName == 'name' ? 'LEFT JOIN civicrm_financial_account ON civicrm_entity_financial_account.financial_account_id = civicrm_financial_account.id' : NULL;
* Payment instrument value.
*
* @return array|null|string
- * @static
*/
public static function getInstrumentFinancialAccount($paymentInstrumentValue = NULL) {
if (!self::$financialAccount) {
* @param $financialType
*
* @return array
- * @static
*/
public static function createDefaultFinancialAccounts($financialType) {
$titles = array();
*
* @return CRM_Financial_DAO_PaymentProcessor|null
* object on success, null otherwise
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$paymentProcessor = new CRM_Financial_DAO_PaymentProcessor();
* @return CRM_Financial_DAO_PaymentProcessor|null
* DAO object on success, null otherwise
*
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Financial_DAO_PaymentProcessor', $id, 'is_active', $is_active);
* @return CRM_Financial_DAO_PaymentProcessor|null
* The default payment processor object on success,
* null otherwise
- * @static
*/
public static function &getDefault() {
if (self::$_defaultPaymentProcessor == NULL) {
* @param int $paymentProcessorID
*
* @return null
- * @static
*/
public static function del($paymentProcessorID) {
if (!$paymentProcessorID) {
*
* @return array
* associated array with payment processor related fields
- * @static
*/
public static function getPayment($paymentProcessorID, $mode) {
if (!$paymentProcessorID) {
*
* @return array
* associated array with payment processor related fields
- * @static
*/
public static function buildPayment($dao, $mode) {
$fields = array(
* Type of payment information to be retrieved.
*
* @return int|array|object
- * @static
*/
public static function getProcessorForEntity($entityID, $component = 'contribute', $type = 'id') {
$result = NULL;
*
* @return CRM_Core_BAO_LocaationType|null
* object on success, null otherwise
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$paymentProcessorType = new CRM_Financial_DAO_PaymentProcessorType();
* @return Object
* DAO object on sucess, null otherwise
*
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Financial_DAO_PaymentProcessorType', $id, 'is_active', $is_active);
* @return object
* The default payment processor object on success,
* null otherwise
- * @static
*/
public static function &getDefault() {
if (self::$_defaultPaymentProcessorType == NULL) {
*
* @throws Exception
* @return CRM_Financial_DAO_PaymentProcessorType
- * @static
*/
public static function create(&$params) {
$paymentProcessorType = new CRM_Financial_DAO_PaymentProcessorType();
* ID of the processor to be deleted.
*
* @return bool
- * @static
*/
public static function del($paymentProcessorTypeId) {
$query = "
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($values, $files, $self) {
$errorMsg = array();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($values, $files, $self) {
$errors = array();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public function checkPermissions($action, $permissions, $createdID, $userContactID, $actionName) {
if ((CRM_Core_Permission::check($permissions[0]) || CRM_Core_Permission::check($permissions[1]))) {
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($values, $files, $self) {
$errorMsg = array();
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
static $_entityID;
*
*
* @return void
- * @static
*/
public function browse() {
}
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
*
*
* @return void
- * @static
*/
public function browse() {
// get all custom groups sorted by weight
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
*
*
* @return void
- * @static
*/
public function browse() {
// get all financial types sorted by weight
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The account id that we need to display for the browse screen
*
* @var array
- * @static
*/
protected $_aid = NULL;
* Browse all Financial Type Account data
*
* @return void
- * @static
*/
public function browse() {
// get all Financial Type Account data sorted by weight
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Friend_BAO_Friend
- * @static
*/
public static function add(&$params) {
$friend = CRM_Contact_BAO_Contact::createProfileContact($params, CRM_Core_DAO::$_nullArray);
*
* @return array
* values
- * @static
*/
public static function retrieve(&$params, &$values) {
$friend = new CRM_Friend_DAO_Friend();
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Contact_BAO_Contact
- * @static
*/
public static function create(&$params) {
$transaction = new CRM_Core_Transaction();
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Friend_BAO_Friend
- * @static
*/
public static function addTellAFriend(&$params) {
$friendDAO = new CRM_Friend_DAO_Friend();
*
* @return bool|array
* mixed true or array of errors
- * @static
*/
public static function formRule($fields) {
/**
* Static field for all the grant information that we can potentially export
* @var array
- * @static
*/
static $_exportableFields = NULL;
/**
* Get events Summary
*
- * @static
*
* @param bool $admin
*
/**
* Get events Summary
*
- * @static
*
* @return array
* Array of event summary values
/**
* Retrieve statistics for grants.
*
- * @static
*
* @param bool $admin
*
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Grant_BAO_ManageGrant
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$grant = new CRM_Grant_DAO_Grant();
* @param array $ids
* Reference array contains the id.
*
- * @static
*
* @return object
*/
* Reference array contains the id.
*
* @return object
- * @static
*/
public static function create(&$params, &$ids) {
$transaction = new CRM_Core_Transaction();
*
* @return bool
*
- * @static
*/
public static function deleteContact($id) {
$grant = new CRM_Grant_DAO_Grant();
* Grant id.
*
* @return bool|mixed
- * @static
*/
public static function del($id) {
CRM_Utils_Hook::pre('delete', 'Grant', $id, CRM_Core_DAO::$_nullArray);
*
* @return array
* array of exportable Fields
- * @static
*/
public static function &exportableFields() {
if (!self::$_exportableFields) {
*
* @return int
* count of grant records
- * @static
*/
public static function getContactGrantCount($contactID) {
$query = "SELECT count(*) FROM civicrm_grant WHERE civicrm_grant.contact_id = {$contactID} ";
* @param CRM_Core_Form $form
*
* @return void
- * @static
*/
public static function buildSearchForm(&$form) {
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
public $_permission = NULL;
* This defines two actions- View and Edit.
*
* @var array
- * @static
*/
static $_links = NULL;
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
- * @static
*/
static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
- * @static
*/
static $_properties = array(
'contact_id',
* The task array
*
* @var array
- * @static
*/
static $_tasks = NULL;
* The optional task array
*
* @var array
- * @static
*/
static $_optionalTasks = NULL;
*
* @return array
* the set of tasks for a group of contacts
- * @static
*/
public static function &tasks() {
if (!(self::$_tasks)) {
*
* @return array
* the set of task titles
- * @static
*/
public static function &taskTitles() {
self::tasks();
*
* @return array
* the set of tasks for a group of contacts
- * @static
*/
public static function getTask($value) {
self::tasks();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields, $fileParams, $options) {
$errors = array();
*
* @return array
* parent groups
- * @static
*/
public static function buildParentGroups(&$form) {
$groupNames = CRM_Core_PseudoConstant::group();
* @param string $enclosure
*
* @return void
- * @static
*/
public static function encloseScrub(&$values, $enclosure = "'") {
if (empty($values)) {
*
* @var $type error code constant
* @return string
- * @static
*/
public static function errorFileName($type) {
$fileName = NULL;
*
* @var $type error code constant
* @return string
- * @static
*/
public static function saveFileName($type) {
$fileName = NULL;
* where we want to do a mass cleanup but dont want to bother with
* an audit trail
*
- * @static
*/
public static function disableLoggingForThisConnection() {
// do this only if logging is enabled
* Build the static pattern array
*
* @return void
- * @static
*/
public static function buildPatterns() {
self::$_patterns = array();
*
* @return array
* Tuple (bounce_type, bounce_reason)
- * @static
*/
public static function &match(&$message) {
// clean up $message and replace all white space by a single space, CRM-4767
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Core_BAO_LocaationType
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$component = new CRM_Mailing_DAO_Component();
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Mailing_DAO_Component', $id, 'is_active', $is_active);
*
* @return CRM_Mailing_BAO_Component
*
- * @static
*/
public static function add(&$params, $ids = array()) {
$id = CRM_Utils_Array::value('id', $params, CRM_Utils_Array::value('id', $ids));
* @param array $ids
* Reference array contains the id.
*
- * @static
*
* @return object
*/
*
* @return object
* $mailing The new mailing object
- * @static
*/
public static function create(&$params, $ids = array()) {
*
* @return array
* Associative array of reporting data
- * @static
*/
public static function &report($id, $skipDetails = FALSE, $isSMS = FALSE) {
$mailing_id = CRM_Utils_Type::escape($id, 'Integer');
*
* @return boolean
* | array - TRUE if the user has access to all mailings, else array of mailing IDs (possibly empty)
- * @static
*/
public static function mailingACLIDs() {
// CRM-11633
* @param int $id
*
* @return string
- * @static
*/
public static function showEmailDetails($id) {
return CRM_Utils_System::url('civicrm/mailing/report', "mid=$id");
* Id of the mail to delete.
*
* @return void
- * @static
*/
public static function del($id) {
if (empty($id)) {
* Id of the Job to delete.
*
* @return void
- * @static
*/
public static function delJob($id) {
if (empty($id)) {
* @return array
* Array of mailings for a contact
*
- * @static
*/
static public function getContactMailings(&$params) {
$params['version'] = 3;
* @return int
* count of mailings for a contact
*
- * @static
*/
static public function getContactMailingsCount(&$params) {
$params['version'] = 3;
*
* @return object
* $mailingab The new mailingab object
- * @static
*/
public static function create(&$params, $ids = array()) {
$transaction = new CRM_Core_Transaction();
* @param array $ids
* Reference array contains the id.
*
- * @static
*
* @return object
*/
* Id of the mail to delete.
*
* @return void
- * @static
*/
public static function del($id) {
if (empty($id)) {
* (Dear God Why) Keep a global count of mails processed within the current
* request.
*
- * @static
* @var int
*/
static $mailsProcessed = 0;
* @param null $mode
*
* @return void
- * @static
*/
public static function runJobs($testParams = NULL, $mode = NULL) {
$job = new CRM_Mailing_BAO_MailingJob();
*
* @param int $mailingId
* The id of the mailing to be canceled.
- * @static
*/
public static function cancel($mailingId) {
$sql = "
*
* @return string
* The translated version
- * @static
*/
public static function status($status) {
static $translation = NULL;
*
* @return string
* For use in a WHERE clause
- * @static
*/
public static function workflowClause() {
// add an additional check and only process
*
* @param CRM_Core_Form $form
* @return void
- * @static
*/
public static function buildSearchForm(&$form) {
// mailing selectors
*
* @return string
* The redirect/tracking url
- * @static
*/
public static function getTrackerURL($url, $mailing_id, $queue_id) {
*
* @return int
* Number of rows in result set
- * @static
*/
public static function getTotalCount($mailing_id, $job_id = NULL, $is_distinct = FALSE, $toDate = NULL) {
$dao = new CRM_Core_DAO();
*
* @return array
* Result set
- * @static
*/
public static function &getRows(
$mailing_id, $job_id = NULL,
*
* @return boolean
* True on success
- * @static
*/
public static function confirm($contact_id, $subscribe_id, $hash) {
$se = &CRM_Mailing_Event_BAO_Subscribe::verify(
* Associative array of delivery event values.
*
* @return void
- * @static
*/
public static function &create(&$params) {
$q = &CRM_Mailing_Event_BAO_Queue::verify($params['job_id'],
*
* @return int
* Number of rows in result set
- * @static
*/
public static function getTotalCount($mailing_id, $job_id = NULL, $is_distinct = FALSE, $toDate = NULL) {
$dao = new CRM_Core_DAO();
*
* @return array
* Result set
- * @static
*/
public static function &getRows(
$mailing_id, $job_id = NULL,
* Consider mailings that were completed not more than $maxDays ago.
*
* @return void
- * @static
**/
public static function updateEmailResetDate($minDays = 3, $maxDays = 7) {
$dao = new CRM_Core_Dao();
*
* @return int
* Number of rows in result set
- * @static
*/
public static function getTotalCount(
$mailing_id, $job_id = NULL,
*
* @return array
* Result set
- * @static
*/
public static function &getRows(
$mailing_id, $job_id = NULL,
* The Queue Event ID of the recipient.
*
* @return void
- * @static
*/
public static function open($queue_id) {
/* First make sure there's a matching queue event */
*
* @return int
* Number of rows in result set
- * @static
*/
public static function getTotalCount(
$mailing_id,
*
* @return array
* Opened count per mailing ID
- * @static
*/
public static function getMailingTotalCount($mailingIDs) {
$dao = new CRM_Core_DAO();
*
* @return array
* Count per mailing ID
- * @static
*/
public static function getMailingContactCount($mailingIDs, $contactID) {
$dao = new CRM_Core_DAO();
*
* @return array
* Result set
- * @static
*/
public static function &getRows(
$mailing_id, $job_id = NULL,
*
* @return CRM_Mailing_Event_BAO_Queue
* The new EventQueue
- * @static
*/
public static function create($params) {
$eq = new CRM_Mailing_Event_BAO_Queue();
*
* @return int
* The hash
- * @static
*/
public static function hash($params) {
$jobId = $params['job_id'];
*
* @return object|null
* The queue event if verified, or null
- * @static
*/
public static function &verify($job_id, $queue_id, $hash) {
$success = NULL;
*
* @return string
* The email address
- * @static
*/
public static function getEmailAddress($queue_id) {
$email = CRM_Core_BAO_Email::getTableName();
*
* @return int
* Number of matching events
- * @static
*/
public static function getTotalCount($mailing_id, $job_id = NULL) {
$dao = new CRM_Core_DAO();
*
* @return array
* Result set
- * @static
*/
public static function &getRows(
$mailing_id, $job_id = NULL, $offset = NULL,
*
* @return object|null
* The mailing object, or null on failure
- * @static
*/
public static function &reply($job_id, $queue_id, $hash, $replyto = NULL) {
/* First make sure there's a matching queue event */
* Whole email to forward in one string.
*
* @return void
- * @static
*/
public static function send($queue_id, &$mailing, &$bodyTxt, $replyto, &$bodyHTML = NULL, &$fullEmail = NULL) {
$domain = CRM_Core_BAO_Domain::getDomain();
* Optional reply-to from the reply.
*
* @return void
- * @static
*/
private static function autoRespond(&$mailing, $queue_id, $replyto) {
$config = CRM_Core_Config::singleton();
*
* @return int
* Number of rows in result set
- * @static
*/
public static function getTotalCount(
$mailing_id, $job_id = NULL,
*
* @return array
* Result set
- * @static
*/
public static function &getRows(
$mailing_id, $job_id = NULL,
*
* @return array|null
* $groups Array of all groups to which the contact was added, or null if the queue event could not be found.
- * @static
*/
public static function &resub_to_mailing($job_id, $queue_id, $hash) {
/* First make sure there's a matching queue event */
* The job ID.
*
* @return void
- * @static
*/
public static function send_resub_response($queue_id, $groups, $is_domain = FALSE, $job) {
// param is_domain is not supported as of now.
*
* @return int|null
* $se_id The id of the subscription event, null on failure
- * @static
*/
public static function &subscribe($group_id, $email, $contactId = NULL, $context = NULL) {
// CRM-1797 - allow subscription only to public groups
*
* @return object|null
* The subscribe event object, or null on failure
- * @static
*/
public static function &verify($contact_id, $subscribe_id, $hash) {
$success = NULL;
*
* @return object
* $domain The domain owning the event
- * @static
*/
public static function &getDomain($subscribe_id) {
return CRM_Core_BAO_Domain::getDomain();
* @param string $context
*
* @return void
- * @static
*/
public static function commonSubscribe(&$groups, &$params, $contactId = NULL, $context = NULL) {
$contactGroups = CRM_Mailing_Event_BAO_Subscribe::getContactGroups($params['email'], $contactId);
*
* @return string
* The redirection url, or base url on failure.
- * @static
*/
public static function track($queue_id, $url_id) {
*
* @return int
* Number of rows in result set
- * @static
*/
public static function getTotalCount(
$mailing_id, $job_id = NULL,
*
* @return array
* trackable url count per mailing ID
- * @static
*/
public static function getMailingTotalCount($mailingIDs) {
$dao = new CRM_Core_DAO();
*
* @return array
* Count per mailing ID
- * @static
*/
public static function getMailingContactCount($mailingIDs, $contactID) {
$dao = new CRM_Core_DAO();
*
* @return array
* Result set
- * @static
*/
public static function &getRows(
$mailing_id, $job_id = NULL,
*
* @return boolean
* Was the contact successfully unsubscribed?
- * @static
*/
public static function unsub_from_domain($job_id, $queue_id, $hash) {
$q = CRM_Mailing_Event_BAO_Queue::verify($job_id, $queue_id, $hash);
*
* @return array|null
* $groups Array of all groups from which the contact was removed, or null if the queue event could not be found.
- * @static
*/
public static function &unsub_from_mailing($job_id, $queue_id, $hash, $return = FALSE) {
/* First make sure there's a matching queue event */
* The job ID.
*
* @return void
- * @static
*/
public static function send_unsub_response($queue_id, $groups, $is_domain = FALSE, $job) {
$config = CRM_Core_Config::singleton();
*
* @return int
* Number of rows in result set
- * @static
*/
public static function getTotalCount(
$mailing_id, $job_id = NULL,
* @param null $org_unsubscribe
* @return array
* Result set
- * @static
*/
public static function &getRows(
$mailing_id, $job_id = NULL,
*
* @return bool|array
* mixed true or array of errors
- * @static
*/
public static function dataRule($params, $files, $options) {
if ($params['component_type'] == 'Header' || $params['component_type'] == 'Footer') {
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields) {
$errors = array();
* @return boolean
* True if either we deliver immediately, or the
* date is properly set.
- * @static
*/
public static function formRule($params, $files, $self) {
if (!empty($params['_qf_Schedule_submit'])) {
*
* @return bool|array
* mixed true or array of errors
- * @static
*/
public static function formRule($params, $files, $self) {
if (!empty($_POST['_qf_Import_refresh'])) {
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
public $_permission = NULL;
/**
* Mailing templates
* @var array
- * @static
*/
private static $template;
/**
* Completed mailings
* @var array
- * @static
*/
private static $completed;
/**
* Mailing components
* @var array
- * @static
*/
private static $component;
*
* @return array
* array reference of all mailing components
- * @static
*/
public static function &component($type = NULL) {
$name = $type ? $type : 'ALL';
*
* @return int
* The ID of the default mailing component.
- * @static
*/
public static function &defaultComponent($type, $undefined = NULL) {
if (!self::$defaultComponent) {
*
* @return array
* array reference of all mailing templates if any
- * @static
*/
public static function &template() {
if (!self::$template) {
*
* @return array
* array reference of all mailing templates if any
- * @static
*/
public static function &completed($mode = NULL) {
if (!self::$completed) {
* Flush given pseudoconstant so it can be reread from db
* next time it's requested.
*
- * @static
*
* @param bool|string $name pseudoconstant to be flushed
*/
* Array of supported links, currenly null
*
* @var array
- * @static
*/
static $_links = NULL;
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
- * @static
*/
static $_columnHeaders;
* Array of supported links, currenly null
*
* @var array
- * @static
*/
static $_links = NULL;
* This method returns the links that are given for each search row.
*
* @return array
- * @static
*/
public static function &links() {
return self::$_links;
* This defines two actions- View and Edit.
*
* @var array
- * @static
*/
static $_links = NULL;
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
- * @static
*/
static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
- * @static
*/
static $_properties = array(
'contact_id',
* The task array
*
* @var array
- * @static
*/
static $_tasks = NULL;
* The optional task array
*
* @var array
- * @static
*/
static $_optionalTasks = NULL;
*
* @return array
* the set of tasks for a group of contacts
- * @static
*/
public static function &tasks() {
if (!(self::$_tasks)) {
*
* @return array
* the set of task titles
- * @static
*/
public static function &taskTitles() {
return array();
*
* @return array
* the set of tasks for a group of mailing recipients
- * @static
*/
public static function getTask($value) {
self::tasks();
* Static field for all the membership information that we can potentially import
*
* @var array
- * @static
*/
static $_importableFields = NULL;
* The array that holds all the db ids.
*
* @return CRM_Member_BAO_Membership
- * @static
*/
public static function add(&$params, $ids = array()) {
$oldStatus = $oldType = NULL;
* be returned
*
* @return CRM_Member_BAO_Membership|null the found object or null
- * @static
*/
public static function &getValues(&$params, &$values, $active = FALSE) {
if (empty($params)) {
* @throws CRM_Core_Exception
*
* @return CRM_Member_BAO_Membership
- * @static
*/
public static function create(&$params, &$ids, $skipRedirect = FALSE, $activityType = 'Membership Signup') {
// always calculate status if is_override/skipStatusCal is not true.
*
* @return Array
* array of contact_id of all related contacts.
- * @static
*/
public static function checkMembershipRelationship($membershipId, $contactId, $action = CRM_Core_Action::ADD) {
$contacts = array();
* in a hierarchical manner
*
* @return CRM_Member_BAO_Membership
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$membership = new CRM_Member_DAO_Membership();
* @param int $membershipId
* Membership id that needs to be deleted.
*
- * @static
*
* @return $results no of deleted Membership on success, false otherwise
*/
* @param int $membershipId
* Membership id that needs to be deleted.
*
- * @static
*
* @return $results no of deleted Membership on success, false otherwise
*/
* @param int $contactId
*
* @return null
- * @static
*/
public static function deleteRelatedMemberships($ownerMembershipId, $contactId = NULL) {
if (!$ownerMembershipId && !$contactId) {
*
* @return array
* array of memberships based on status
- * @static
*/
public static function activeMembers($memberships, $status = 'active') {
$actives = array();
* @return bool
* Is this a separate membership payment
*
- * @static
*/
static function buildMembershipBlock(
&$form,
*
* @return array|null
*
- * @static
*/
public static function getMembershipBlock($pageID) {
$membershipBlock = array();
* True if only Memberships with same parent org as the $memType wanted, false otherwise.
*
* @return array|bool
- * @static
*/
public static function getContactMembership($contactID, $memType, $isTest, $membershipId = NULL, $onlySameParentOrg = FALSE) {
$dao = new CRM_Member_DAO_Membership();
*
* @return array
* array of importable Fields
- * @static
*/
public static function &importableFields($contactType = 'Individual', $status = TRUE) {
if (!self::$_importableFields) {
* Get all exportable fields
*
* @retun array return array of all exportable fields
- * @static
*/
public static function &exportableFields() {
$expFieldMembership = CRM_Member_DAO_Membership::export();
* @param \CRM_Contribute_BAO_Contribution|\CRM_Contribute_DAO_Contribution $contribution
*
* @return void
- * @static
*/
static public function updateRecurMembership(CRM_Member_DAO_Membership $membership, CRM_Contribute_BAO_Contribution $contribution) {
*
* @throws CRM_Core_Exception
*
- * @static
*/
static function renewMembershipFormWrapper(
$contactID,
* to be customised, null otherwise
*
* @return void
- * @static
*/
public static function fixMembershipStatusBeforeRenew(&$currentMembership, $changeToday) {
$today = NULL;
*
* @return int
* contribution page id
- * @static
*/
public static function getContributionPageId($membershipID) {
$query = "
* Owner Membership Id.
* @param array $params
* Formatted array of key => value.
- * @static
*/
public static function updateRelatedMemberships($ownerMembershipId, $params) {
$membership = new CRM_Member_DAO_Membership();
*
* @return array
* the list of membership fields
- * @static
*/
public static function getMembershipFields($mode = NULL) {
$fields = CRM_Member_DAO_Membership::export();
*
* @return null|string
* sort name of the contact if found
- * @static
*/
public static function sortName($id) {
$id = CRM_Utils_Type::escape($id, 'Integer');
*
* @return null|array
* array of memberships if created
- * @static
*/
public static function createRelatedMemberships(&$params, &$dao, $reset = FALSE) {
static $relatedContactIds = array();
* @param bool $activeOnly
*
* @return null|string
- * @static
*/
public static function getContactMembershipCount($contactID, $activeOnly = FALSE) {
$select = "SELECT count(*) FROM civicrm_membership ";
* @param bool $isNotCancelled
*
* @return boolean
- * @static
*/
public static function isCancelSubscriptionSupported($mid, $isNotCancelled = TRUE) {
$cacheKeyString = "$mid";
*
* @return string
* contribution status
- * @static
*/
public static function isSubscriptionCancelled($mid) {
$sql = "
* (param in process of being removed - try to use params) array of ids.
*
* @return CRM_Contribute_BAO_Contribution
- * @static
*/
public static function recordMembershipContribution(&$params, $ids = array()) {
$membershipId = $params['membership_id'];
* Array with membership type and organization.
* @param int $priceSetId
*
- * @static
*/
public static function createLineItems(&$qf, $membershipType, &$priceSetId) {
$qf->_priceSetId = $priceSetId = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', 'default_membership_type_amount', 'id', 'name');
*
* @return array
* Array of membership type
- * @static
*/
public static function getContactsCancelledMembership($contactID, $isTest = FALSE) {
if (!$contactID) {
* @param array $params
* Reference array contains the values submitted by the form.
*
- * @static
*
* @return object
*/
* @param int $id
*
* @return bool
- * @static
*/
public static function del($id) {
$dao = new CRM_Member_DAO_MembershipBlock();
* @param array $ids
* Reference array contains the id.
*
- * @static
*
* @return object
*/
* @param int $membershipID
*
* @return mixed
- * @static
*/
public static function del($membershipID) {
* @param array $params
* Reference array contains the values submitted by the form.
*
- * @static
*
* @return object
*/
* @param int $id
*
* @return bool
- * @static
*/
public static function del($id) {
$dao = new CRM_Member_DAO_MembershipPayment();
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Member_BAO_MembershipStatus
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$membershipStatus = new CRM_Member_DAO_MembershipStatus();
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Member_DAO_MembershipStatus', $id, 'is_active', $is_active);
*
* @throws Exception
* @return CRM_Member_BAO_MembershipStatus
- * @static
*/
public static function create($params) {
$ids = array();
* @param array $ids
* Array contains the id - this param is deprecated.
*
- * @static
*
* @return object
*/
* @param int $membershipStatusId
*
* @return array
- * @static
*/
public static function getMembershipStatus($membershipStatusId) {
$statusDetails = array();
* @param int $membershipStatusId
*
* @throws CRM_Core_Exception
- * @static
*/
public static function del($membershipStatusId) {
//check dependencies
* Membership params as available to calling function - passed to the hook.
*
* @return array
- * @static
*/
static function getMembershipStatusByDate(
$startDate, $endDate, $joinDate,
* Function that return the status ids whose is_current_member is set
*
* @return array
- * @static
*/
public static function getMembershipStatusCurrent() {
$statusIds = array();
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Member_BAO_MembershipType
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$membershipType = new CRM_Member_DAO_MembershipType();
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Member_DAO_MembershipType', $id, 'is_active', $is_active);
* @param array $ids
* Array contains the id (deprecated).
*
- * @static
*
* @return object
*/
*
* @throws CRM_Core_Exception
* @return bool|mixed
- * @static
*/
public static function del($membershipTypeId) {
//check dependencies
*
* @param array $membershipType
* An array of membershipType-details.
- * @static
*/
public static function convertDayFormat(&$membershipType) {
$periodDays = array(
* @param bool $public
*
* @return array
- * @static
*/
public static function getMembershipTypes($public = TRUE) {
$membershipTypes = array();
* @param int $membershipTypeId
*
* @return array|null
- * @static
*/
public static function getMembershipTypeDetails($membershipTypeId) {
$membershipTypeDetails = array();
*
* @return array
* associated array with start date, end date and join date for the membership
- * @static
*/
public static function getDatesForMembershipType($membershipTypeId, $joinDate = NULL, $startDate = NULL, $endDate = NULL, $numRenewTerms = 1) {
$membershipTypeDetails = self::getMembershipTypeDetails($membershipTypeId);
*
* @return Array
* array fo the start date, end date and join date of the membership
- * @static
*/
public static function getRenewalDatesForMembershipType($membershipId, $changeToday = NULL, $membershipTypeID = NULL, $numRenewTerms = 1) {
$params = array('id' => $membershipId);
*
* @return Array
* array of the details of membership types
- * @static
*/
public static function getMembershipTypesByOrg($orgID) {
$membershipTypes = array();
*
* @return Array
* array of the details of membership types with Member of Contact id
- * @static
*/
public static function getMemberOfContactByMemTypes($membershipTypes) {
$memTypeOrgs = array();
* @return array
* arrays of organization and membership types
*
- * @static
*/
public static function getMembershipTypeInfo() {
if (!self::$_membershipTypeInfo) {
* @throws CiviCRM_API3_Exception
* @return bool|array
* mixed true or array of errors
- * @static
*/
public static function formRule($params, $files, $self) {
$errors = array();
*
* @return boolean
* true if mail was sent successfully
- * @static
*/
public static function emailReceipt(&$form, &$formValues, &$membership) {
// retrieve 'from email id' for acknowledgement
*
* @return bool|array
* mixed true or array of errors
- * @static
*/
public static function formRule($params, $files, $contributionPageId = NULL) {
$errors = array();
*
* @return bool|array
* mixed true or array of errors
- * @static
*/
public static function formRule($params) {
$errors = array();
*
* @return bool|array
* mixed true or array of errors
- * @static
*/
public static function formRule($params) {
$errors = array();
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields) {
return TRUE;
* store contactType
*
* @var int
- * @static
*/
static $_contactType = NULL;
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
*
*
* @return void
- * @static
*/
public function browse() {
// get all custom groups sorted by weight
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
*
*
* @return void
- * @static
*/
public function browse() {
// get all membership types sorted by weight
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
static $_membershipTypesLinks = NULL;
*
* @return array
* (reference) of action links
- * @static
*/
static function &links(
$status = 'all',
/**
* Membership types
* @var array
- * @static
*/
private static $membershipType;
/**
* Membership types
* @var array
- * @static
*/
private static $membershipStatus;
*
* @return array
* array reference of all membership types if any
- * @static
*/
public static function &membershipType($id = NULL, $force = FALSE) {
if (!self::$membershipType || $force) {
*
* @return array
* array reference of all membership statuss if any
- * @static
*/
public static function &membershipStatus($id = NULL, $cond = NULL, $column = 'name', $force = FALSE, $allStatus = FALSE) {
if (self::$membershipStatus === NULL) {
* Flush given pseudoconstant so it can be reread from db
* next time it's requested.
*
- * @static
*
* @param bool|string $name pseudoconstant to be flushed
*/
* This defines two actions- View and Edit.
*
* @var array
- * @static
*/
static $_links = NULL;
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
- * @static
*/
static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
- * @static
*/
static $_properties = array(
'contact_id',
* The task array
*
* @var array
- * @static
*/
static $_tasks = NULL;
* The optional task array
*
* @var array
- * @static
*/
static $_optionalTasks = NULL;
*
* @return array
* the set of tasks for a group of contacts
- * @static
*/
public static function &tasks() {
if (!(self::$_tasks)) {
*
* @return array
* the set of task titles
- * @static
*/
public static function &taskTitles() {
self::tasks();
*
* @return array
* the set of tasks for a group of members
- * @static
*/
public static function getTask($value) {
self::tasks();
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_pcpLinks = NULL;
* @param bool $pcpBlock
* If true, create or update PCPBlock, else PCP.
*
- * @static
*
* @return object
*/
*
* @return null|string
* Dispaly name of the contact if found
- * @static
*/
public static function displayName($id) {
$id = CRM_Utils_Type::escape($id, 'Integer');
*
* @return array
* array of Pcp if found
- * @static
*/
public static function getPcpDashboardInfo($contactId) {
$links = self::pcpLinks();
* @param array $pcpId
* Contains the pcp ID.
*
- * @static
*
* @return total
* amount
* @param array $pcpId
* Contains the pcp ID.
*
- * @static
*
* @return array
*/
*
* @return array
* (reference) of action links
- * @static
*/
public static function &pcpLinks() {
if (!(self::$_pcpLinks)) {
* Campaign page id.
*
* @return null
- * @static
*/
public static function deleteById($id) {
CRM_Utils_Hook::pre('delete', 'Campaign', $id, CRM_Core_DAO::$_nullArray);
* @param $is_active
*
* @return null
- * @static
*/
public static function setIsActive($id, $is_active) {
switch ($is_active) {
*
* @throws Exception
* @return null
- * @static
*/
public static function sendStatusUpdate($pcpId, $newStatus, $isInitial = FALSE, $component = 'contribute') {
$pcpStatusName = CRM_Core_OptionGroup::values("pcp_status", FALSE, FALSE, FALSE, NULL, 'name');
*
* @param $is_active
* @return null
- * @static
*/
public static function setDisable($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_PCP_DAO_PCP', $id, 'is_active', $is_active);
* @param $component
*
* @return int
- * @static
*/
public static function getStatus($pcpId, $component) {
$query = "
* @param $component
*
* @return string
- * @static
*/
public static function getPcpBlockStatus($pageId, $component) {
$query = "
* Pcp block id.
*
* @return Boolean
- * @static
*/
public static function getPcpBlockInUse($id) {
$query = "
* Supporter's profile id.
*
* @return boolean
- * @static
*/
public static function checkEmailProfile($profileId) {
$query = "
* @param $component
*
* @return int
- * @static
*/
public static function getPcpPageTitle($pcpId, $component) {
if ($component == 'contribute') {
* @param $component
*
* @return String
- * @static
*/
public static function getPcpBlockEntityId($pcpId, $component) {
$entity_table = self::getPcpEntityTable($component);
* @param $component
*
* @return String
- * @static
*/
public static function getPcpEntityTable($component) {
$entity_table_map = array(
* @param string $component
*
* @return int
- * @static
*/
public static function getSupporterProfileId($component_id, $component = 'contribute') {
$entity_table = self::getPcpEntityTable($component);
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
*
* @return bool|array
* mixed true or array of errors
- * @static
*/
public static function formRule($params, $files, $self) {
$errors = array();
*
* @return bool|array
* mixed true or array of errors
- * @static
*/
public static function formRule($params, $files, $self) {
$errors = array();
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields, $files, $form) {
}
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* @param null $action
*
* @return void
- * @static
*/
public function browse($action = NULL) {
$this->_sortByCharacter = CRM_Utils_Request::retrieve('sortByCharacter',
* Static field for all the pledge information that we can potentially export
*
* @var array
- * @static
*/
static $_exportableFields = NULL;
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Pledge_BAO_Pledge
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$pledge = new CRM_Pledge_DAO_Pledge();
* @param array $params
* Reference array contains the values submitted by the form.
*
- * @static
*
* @return object
*/
*
* @return array
* associated array of field values
- * @static
*/
public static function &getValues(&$params, &$values, $returnProperties = NULL) {
if (empty($params)) {
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Pledge_BAO_Pledge
- * @static
*/
public static function &create(&$params) {
//FIXME: a cludgy hack to fix the dates to MySQL format
* Pledge id.
*
* @return mixed
- * @static
*/
public static function deletePledge($id) {
CRM_Utils_Hook::pre('delete', 'Pledge', $id, CRM_Core_DAO::$_nullArray);
* @return array
* return the list of pledge fields
*
- * @static
*/
public static function getHonorContacts($honorId) {
$params = array();
*
* @return array
* array of exportable Fields
- * @static
*/
public static function &exportableFields() {
if (!self::$_exportableFields) {
*
* @return array
* associated array of pledge id(s)
- * @static
*/
public static function getContactPledges($contactID) {
$pledgeDetails = array();
*
* @return int
* count of pledge records
- * @static
*/
public static function getContactPledgeCount($contactID) {
$query = "SELECT count(*) FROM civicrm_pledge WHERE civicrm_pledge.contact_id = {$contactID} AND civicrm_pledge.is_test = 0";
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Pledge_BAO_PledgeBlock
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$pledgeBlock = new CRM_Pledge_DAO_PledgeBlock();
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Pledge_BAO_PledgeBlock
- * @static
*/
public static function &create(&$params) {
$transaction = new CRM_Core_Transaction();
* @param array $params
* Reference array contains the values submitted by the form.
*
- * @static
*
* @return object
*/
* PledgeBlock id.
*
* @return mixed|null
- * @static
*/
public static function deletePledgeBlock($id) {
CRM_Utils_Hook::pre('delete', 'PledgeBlock', $id, CRM_Core_DAO::$_nullArray);
* Contribution page id.
*
* @return array
- * @static
*/
public static function getPledgeBlock($pageID) {
$pledgeBlock = array();
* Build Pledge Block in Contribution Pages
*
* @param CRM_Core_Form $form
- * @static
*/
public static function buildPledgeBlock($form) {
//build pledge payment fields.
*
* @return array
* associated array of pledge payment details
- * @static
*/
public static function getPledgePayments($pledgeId) {
$query = "
*
* @return int
* pledge payment id
- * @static
*/
public static function add($params) {
if (!empty($params['id'])) {
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Pledge_BAO_PledgePayment
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$payment = new CRM_Pledge_BAO_PledgePayment;
*
* @return int
* pledge payment id
- * @static
*/
public static function del($id) {
$payment = new CRM_Pledge_DAO_PledgePayment();
* Pledge id.
*
* @return bool
- * @static
*/
public static function deletePayments($id) {
if (!CRM_Utils_Rule::positiveInteger($id)) {
* Contribution id.
*
* @return bool
- * @static
*/
public static function resetPledgePayment($contributionID) {
//get all status
*
* @return array
* Next scheduled date as an array
- * @static
*/
public static function calculateBaseScheduleDate(&$params) {
$date = array();
*
* @return int
* $statusId calculated status id of pledge
- * @static
*/
public static function calculatePledgeStatus($pledgeId) {
$paymentStatusTypes = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name');
* @param bool $isScriptUpdate
* , is function being called from bin script?.
*
- * @static
*/
static function updatePledgePayments(
$pledgeId,
* @param int $paymentId
* Payment id.
*
- * @static
*/
public static function updateReminderDetails($paymentId) {
$query = "
*
* @return array
* associated array of pledge details
- * @static
*/
public static function getOldestPledgePayment($pledgeID, $limit = 1) {
//get pending / overdue statuses
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
* Posted values of the form.
*
* @return void
- * @static
*/
public static function formRule($fields) {
$errors = array();
* This defines two actions- View and Edit.
*
* @var array
- * @static
*/
static $_links = NULL;
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
- * @static
*/
static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
- * @static
*/
static $_properties = array(
'contact_id',
* The task array
*
* @var array
- * @static
*/
static $_tasks = NULL;
* The optional task array
*
* @var array
- * @static
*/
static $_optionalTasks = NULL;
*
* @return array
* the set of tasks for a group of contacts
- * @static
*/
public static function &tasks() {
if (!self::$_tasks) {
*
* @return array
* the set of task titles
- * @static
*/
public static function &taskTitles() {
self::tasks();
*
* @return array
* the set of optional tasks for a group of contacts
- * @static
*/
public static function &optionalTaskTitle() {
$tasks = array();
*
* @return array
* the set of tasks for a group of pledge holders
- * @static
*/
public static function getTask($value) {
self::tasks();
* (reference) an assoc array of name/value pairs.
*
* @return CRM_Price_DAO_LineItem
- * @static
*/
public static function create(&$params) {
$id = CRM_Utils_Array::value('id', $params);
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Price_BAO_LineItem
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$lineItem = new CRM_Price_BAO_LineItem();
* @param int $entityTable
*
* @return bool
- * @static
*/
public static function deleteLineItems($entityId, $entityTable) {
if (!$entityId || !$entityTable) {
* @param bool $update
*
* @return void
- * @static
*/
public static function processPriceSet($entityId, $lineItem, $contributionDetails = NULL, $entityTable = 'civicrm_contribution', $update = FALSE) {
if (!$entityId || !is_array($lineItem)
* Entity Table.
*
* @return void
- * @static
*/
public static function getLineItemArray(&$params, $entityId = NULL, $entityTable = 'contribution', $isRelatedID = FALSE) {
* @return number|void
* tax rate
*
- * @static
*/
public static function calculateTaxRate($lineItemId) {
if ($lineItemId['unit_price'] == 0) {
* (reference) an assoc array of name/value pairs.
*
* @return CRM_Price_BAO_PriceField
- * @static
*/
public static function add(&$params) {
$priceFieldBAO = new CRM_Price_BAO_PriceField();
* (reference) an assoc array of name/value pairs.
*
* @return CRM_Price_DAO_PriceField
- * @static
*/
public static function create(&$params) {
if (empty($params['id']) && empty($params['name'])) {
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Price_DAO_PriceField
- * @static
*/
public static function retrieve(&$params, &$defaults) {
return CRM_Core_DAO::commonRetrieve('CRM_Price_DAO_PriceField', $params, $defaults);
* @return Object
* DAO object on sucess, null otherwise
*
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Price_DAO_PriceField', $id, 'is_active', $is_active);
* @return string
* name
*
- * @static
*/
public static function getTitle($id) {
return CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceField', $id, 'label');
*
* @return null
* @internal param bool $search true if used for search else false
- * @static
*/
public static function addQuickFormElement(
&$qf,
*
* @return boolean
*
- * @static
*/
public static function deleteField($id) {
$field = new CRM_Price_DAO_PriceField();
* @param $error
* @param bool $allowNoneSelection
*
- * @static
*/
public static function priceSetValidation($priceSetId, $fields, &$error, $allowNoneSelection = FALSE) {
* @return string
* tax label for custom field
*
- * @static
*/
public static function getTaxLabel($opt, $valueFieldName, $displayOpt, $taxTerm) {
if ($displayOpt == 'Do_not_show') {
* @param $ids
*
* @return CRM_Price_DAO_PriceFieldValue
- * @static
*/
public static function add(&$params, $ids = array()) {
* @param $ids
*
* @return CRM_Price_DAO_PriceFieldValue
- * @static
*/
public static function create(&$params, $ids = array()) {
$id = CRM_Utils_Array::value('id', $params, CRM_Utils_Array::value('id', $ids));
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Price_DAO_PriceFieldValue
- * @static
*/
public static function retrieve(&$params, &$defaults) {
return CRM_Core_DAO::commonRetrieve('CRM_Price_DAO_PriceFieldValue', $params, $defaults);
*
* @return array
*
- * @static
*/
public static function getValues($fieldId, &$values, $orderBy = 'weight', $isActive = FALSE) {
$fieldValueDAO = new CRM_Price_DAO_PriceFieldValue();
* @return string
* name
*
- * @static
*/
public static function getOptionLabel($id) {
return CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceFieldValue', $id, 'label');
* @return Object
* DAO object on sucess, null otherwise
*
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Price_DAO_PriceFieldValue', $id, 'is_active', $is_active);
* Price field id.
*
*
- * @static
*/
public static function deleteValues($fieldId) {
if (!$fieldId) {
*
* @return boolean
*
- * @static
*/
public static function del($id) {
if (!$id) {
* @param string $financialTypeIDFinancial type id.
* Financial type id.
*
- * @static
*/
public static function updateFinancialType($entityId, $entityTable, $financialTypeID) {
if (!$entityId || !$entityTable || !$financialTypeID) {
* Static field for default price set details
*
* @var array
- * @static
*/
static $_defaultPriceSet = NULL;
* (reference) an assoc array of name/value pairs.
*
* @return CRM_Price_DAO_PriceSet
- * @static
*/
public static function create(&$params) {
if (empty($params['id']) && empty($params['name'])) {
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Price_DAO_PriceSet
- * @static
*/
public static function retrieve(&$params, &$defaults) {
return CRM_Core_DAO::commonRetrieve('CRM_Price_DAO_PriceSet', $params, $defaults);
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $isActive) {
return CRM_Core_DAO::setFieldValue('CRM_Price_DAO_PriceSet', $id, 'is_active', $isActive);
* @return array
* default price set
*
- * @static
*/
public static function getDefaultPriceSet($entity = 'contribution') {
if (!empty(self::$_defaultPriceSet[$entity])) {
* @return string
* title
*
- * @static
*/
public static function getTitle($id) {
return CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $id, 'title');
* false if fields exist for this set, true if the
* set could be deleted
*
- * @static
*/
public static function deleteSet($id) {
// remove from all inactive forms
*
* @return int|NULL
* price set id on success, null otherwise
- * @static
*/
public static function getSetId(&$params) {
$fid = NULL;
* @return array
* Array of the field ids
*
- * @static
*/
public static function getFieldIds($id) {
$priceField = new CRM_Price_DAO_PriceField();
* The price set id to copy.
*
* @return CRM_Price_DAO_PriceSet
- * @static
*/
public static function copy($id) {
$maxId = CRM_Core_DAO::singleValueQuery("SELECT max(id) FROM civicrm_price_set");
* @param bool $onlyActive
*
* @return int|null|string
- * @static
*/
public static function getPricesetCount($sid, $onlyActive = TRUE) {
$count = 0;
*
* @return array
* associate array of frequency interval and unit
- * @static
*/
public static function getRecurDetails($priceSetId) {
$query = 'SELECT mt.duration_interval, mt.duration_unit
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsQuickConfig($id, $isQuickConfig) {
return CRM_Core_DAO::setFieldValue('CRM_Price_DAO_PriceSet', $id, 'is_quick_config', $isQuickConfig);
* Check if price set id provides option for
* user to select both auto-renew and non-auto-renew memberships
*
- * @static
*/
public static function checkMembershipPriceSet($id) {
$query =
* @return array
* if errors then list of errors to be posted back to the form,
* true otherwise
- * @static
*/
public static function formRule($fields, $files, $form) {
* @return array
* if errors then list of errors to be posted back to the form,
* true otherwise
- * @static
*/
public static function formRule($fields, $files, $form) {
$errors = array();
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $options) {
$errors = array();
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $form) {
CRM_Utils_Hook::validateProfile($form->_ufGroup['name']);
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $form) {
$errors = array();
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* this array contains the arguments of the url.
*
* @return string|void
- * @static
*/
public function run($args = NULL) {
if ($args[1] !== 'profile') {
* Array of supported links, currenly view and edit
*
* @var array
- * @static
*/
static $_links = NULL;
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
- * @static
*/
static $_columnHeaders;
* Singleton function used to manage this object
*
* @return object
- * @static
*/
public static function singleton() {
static $singleton = NULL;
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Report_DAO_ReportInstance
- * @static
*/
public static function add(&$params) {
$instance = new CRM_Report_DAO_ReportInstance();
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Report_BAO_ReportInstance
- * @static
*/
public static function &create(&$params) {
if (isset($params['report_header'])) {
* or by component ($compID)
*
* @return array
- * @static
*/
public function &info() {
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* The option group name
*
* @var array
- * @static
*/
static $_gName = NULL;
* The option group name in display format (capitalized, without underscores...etc)
*
* @var array
- * @static
*/
static $_GName = NULL;
* The option group id
*
* @var array
- * @static
*/
static $_gId = NULL;
*
*
* @return void
- * @static
*/
public function browse() {
$groupParams = array('name' => self::$_gName);
*
* @return boolean
* true if yes, else false
- * @static
*/
public static function isInstanceGroupRoleAllowed($instanceId) {
if (!$instanceId) {
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields) {
$errors = array();
* @return boolean
* True if either we deliver immediately, or the
* date is properly set.
- * @static
*/
public static function formRule($params, $files, $self) {
if (!empty($params['_qf_Schedule_submit'])) {
*
* @return bool|array
* mixed true or array of errors
- * @static
*/
public static function formRule($params, $files, $self) {
if (!empty($_POST['_qf_Import_refresh'])) {
* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
* @param null $action
*
* @return void
- * @static
*/
public function browse($action = NULL) {
$providers = CRM_SMS_BAO_Provider::getProviders();
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = array();
const MAX_SMS_CHAR = 460;
* @param bool $force
*
* @return object
- * @static
*/
public static function &singleton($providerParams = array(), $force = FALSE) {
$mailingID = CRM_Utils_Array::value('mailing_id', $providerParams);
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRuleSubType($fieldType, $groupType, $errors) {
if (in_array($fieldType, array(
*
* @return Array
* list of errors to be posted back to the form
- * @static
*/
public static function formRuleCustomDataExtentColumnValue($customField, $gid, $fieldType, &$errors) {
// fix me : check object $customField
* @param array $errors
* Collect errors.
*
- * @static
*/
public static function formRulePrimaryCheck($fields, $profileFieldName, $groupFields, &$errors) {
//FIXME: This may need to also apply to website fields if they are refactored to allow more than one per profile
*
* @return array
* list of errors to be posted back to the form
- * @static
*/
public static function formRule($fields, $files, $self) {
$is_required = CRM_Utils_Array::value('is_required', $fields, FALSE);
*
* @return bool|array
* true if no errors, else array of errors
- * @static
*/
public static function formRule($fields, $files, $self) {
$errors = array();
* Browse all CiviCRM Profile group fields.
*
* @return void
- * @static
*/
public function browse() {
$resourceManager = CRM_Core_Resources::singleton();
* @param
*
* @return void
- * @static
*/
public function browse($action = NULL) {
$ufGroup = array();
* (reference ) an assoc array of name/value pairs.
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_BAO_Field
- * @static
*/
public static function &add(&$params) {
$priceFieldBAO = new CRM_Upgrade_Snapshot_V4p2_Price_BAO_Field();
* (reference) an assoc array of name/value pairs.
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field
- * @static
*/
public static function create(&$params) {
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field
- * @static
*/
public static function retrieve(&$params, &$defaults) {
return CRM_Core_DAO::commonRetrieve('CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field', $params, $defaults);
* @return Object
* DAO object on sucess, null otherwise
*
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field', $id, 'is_active', $is_active);
* @return string
* name
*
- * @static
*/
public static function getTitle($id) {
return CRM_Core_DAO::getFieldValue('CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field', $id, 'label');
* @param array $freezeOptions
*
* @return null
- * @static
*/
public static function addQuickFormElement(
&$qf,
*
* @return boolean
*
- * @static
*/
public static function deleteField($id) {
$field = new CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field();
* @param $fields
* @param $error
*
- * @static
*/
public static function priceSetValidation($priceSetId, $fields, &$error) {
* @param $ids
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue
- * @static
*/
public static function &add(&$params, $ids) {
* @param $ids
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue
- * @static
*/
public static function create(&$params, $ids) {
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue
- * @static
*/
public static function retrieve(&$params, &$defaults) {
return CRM_Core_DAO::commonRetrieve('CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue', $params, $defaults);
*
* @return array
*
- * @static
*/
public static function getValues($fieldId, &$values, $orderBy = 'weight', $isActive = FALSE) {
$fieldValueDAO = new CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue();
* @return string
* name
*
- * @static
*/
public static function getOptionLabel($id) {
return CRM_Core_DAO::getFieldValue('CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue', $id, 'label');
* @return Object
* DAO object on sucess, null otherwise
*
- * @static
*/
public static function setIsActive($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue', $id, 'is_active', $is_active);
*
* @return boolean
*
- * @static
*/
public static function deleteValues($fieldId) {
if (!$fieldId) {
*
* @return boolean
*
- * @static
*/
public static function del($id) {
if (!$id) {
* (reference) an assoc array of name/value pairs.
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_LineItem
- * @static
*/
public static function create(&$params) {
//create mode only as we don't support editing line items
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_BAO_LineItem
- * @static
*/
public static function retrieve(&$params, &$defaults) {
$lineItem = new CRM_Upgrade_Snapshot_V4p2_Price_BAO_LineItem();
* @param int $entityTable
*
* @return bool
- * @static
*/
public static function deleteLineItems($entityId, $entityTable) {
$result = FALSE;
* (reference) an assoc array of name/value pairs.
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set
- * @static
*/
public static function create(&$params) {
$priceSetBAO = new CRM_Upgrade_Snapshot_V4p2_Price_BAO_Set();
* (reference ) an assoc array to hold the flattened values.
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set
- * @static
*/
public static function retrieve(&$params, &$defaults) {
return CRM_Core_DAO::commonRetrieve('CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set', $params, $defaults);
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsActive($id, $isActive) {
return CRM_Core_DAO::setFieldValue('CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set', $id, 'is_active', $isActive);
* @return int
* priceSetID
*
- * @static
*/
public static function getDefaultPriceSet($entity = 'contribution') {
if ($entity == 'contribution') {
* @return string
* title
*
- * @static
*/
public static function getTitle($id) {
return CRM_Core_DAO::getFieldValue('CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set', $id, 'title');
* false if fields exist for this set, true if the
* set could be deleted
*
- * @static
*/
public static function deleteSet($id) {
// remove from all inactive forms
*
* @return int|null
* price set id on success, null otherwise
- * @static
*/
public static function getSetId(&$params) {
$fid = NULL;
* @return array
* Array of the field ids
*
- * @static
*/
public static function getFieldIds($id) {
$priceField = new CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field();
* The price set id to copy.
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field
- * @static
*/
static function copy($id) {
$maxId = CRM_Core_DAO::singleValueQuery("SELECT max(id) FROM civicrm_price_set");
* @param bool $onlyActive
*
* @return int|null|string
- * @static
*/
public static function getPricesetCount($sid, $onlyActive = TRUE) {
$count = 0;
*
* @return array
* associate array of frequency interval and unit
- * @static
*/
public static function getRecurDetails($priceSetId) {
$query = 'SELECT mt.duration_interval, mt.duration_unit
*
* @return Object
* DAO object on sucess, null otherwise
- * @static
*/
public static function setIsQuickConfig($id, $isQuickConfig) {
return CRM_Core_DAO::setFieldValue('CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set', $id, 'is_quick_config', $isQuickConfig);
* static instance to hold the table name
*
* @var string
- * @static
*/
static $_tableName = 'civicrm_price_field';
/**
* static instance to hold the field values
*
* @var array
- * @static
*/
static $_fields = NULL;
/**
* static instance to hold the FK relationships
*
* @var string
- * @static
*/
static $_links = NULL;
/**
* be imported
*
* @var array
- * @static
*/
static $_import = NULL;
/**
* be exported
*
* @var array
- * @static
*/
static $_export = NULL;
/**
* this table in the civicrm_log table
*
* @var boolean
- * @static
*/
static $_log = TRUE;
/**
/**
* returns the names of this table
*
- * @static
* @return string
*/
public static function getTableName() {
* returns the list of fields that can be imported
*
* return array
- * @static
*/
static function &import($prefix = FALSE) {
if (!(self::$_import)) {
* returns the list of fields that can be exported
*
* return array
- * @static
*/
static function &export($prefix = FALSE) {
if (!(self::$_export)) {
* static instance to hold the table name
*
* @var string
- * @static
*/
static $_tableName = 'civicrm_price_field_value';
/**
* static instance to hold the field values
*
* @var array
- * @static
*/
static $_fields = NULL;
/**
* static instance to hold the FK relationships
*
* @var string
- * @static
*/
static $_links = NULL;
/**
* be imported
*
* @var array
- * @static
*/
static $_import = NULL;
/**
* be exported
*
* @var array
- * @static
*/
static $_export = NULL;
/**
* this table in the civicrm_log table
*
* @var boolean
- * @static
*/
static $_log = FALSE;
/**
/**
* returns the names of this table
*
- * @static
* @return string
*/
public static function getTableName() {
* returns the list of fields that can be imported
*
* return array
- * @static
*/
static function &import($prefix = FALSE) {
if (!(self::$_import)) {
* returns the list of fields that can be exported
*
* return array
- * @static
*/
static function &export($prefix = FALSE) {
if (!(self::$_export)) {
* static instance to hold the table name
*
* @var string
- * @static
*/
static $_tableName = 'civicrm_line_item';
/**
* static instance to hold the field values
*
* @var array
- * @static
*/
static $_fields = NULL;
/**
* static instance to hold the FK relationships
*
* @var string
- * @static
*/
static $_links = NULL;
/**
* be imported
*
* @var array
- * @static
*/
static $_import = NULL;
/**
* be exported
*
* @var array
- * @static
*/
static $_export = NULL;
/**
* this table in the civicrm_log table
*
* @var boolean
- * @static
*/
static $_log = TRUE;
/**
/**
* returns the names of this table
*
- * @static
* @return string
*/
public static function getTableName() {
* returns the list of fields that can be imported
*
* return array
- * @static
*/
static function &import($prefix = FALSE) {
if (!(self::$_import)) {
* returns the list of fields that can be exported
*
* return array
- * @static
*/
static function &export($prefix = FALSE) {
if (!(self::$_export)) {
* static instance to hold the table name
*
* @var string
- * @static
*/
static $_tableName = 'civicrm_price_set';
/**
* static instance to hold the field values
*
* @var array
- * @static
*/
static $_fields = NULL;
/**
* static instance to hold the FK relationships
*
* @var string
- * @static
*/
static $_links = NULL;
/**
* be imported
*
* @var array
- * @static
*/
static $_import = NULL;
/**
* be exported
*
* @var array
- * @static
*/
static $_export = NULL;
/**
* this table in the civicrm_log table
*
* @var boolean
- * @static
*/
static $_log = TRUE;
/**
/**
* returns the names of this table
*
- * @static
* @return string
*/
public static function getTableName() {
* returns the list of fields that can be imported
*
* return array
- * @static
*/
static function &import($prefix = FALSE) {
if (!(self::$_import)) {
* returns the list of fields that can be exported
*
* return array
- * @static
*/
static function &export($prefix = FALSE) {
if (!(self::$_export)) {
* static instance to hold the table name
*
* @var string
- * @static
*/
static $_tableName = 'civicrm_price_set_entity';
/**
* static instance to hold the field values
*
* @var array
- * @static
*/
static $_fields = NULL;
/**
* static instance to hold the FK relationships
*
* @var string
- * @static
*/
static $_links = NULL;
/**
* be imported
*
* @var array
- * @static
*/
static $_import = NULL;
/**
* be exported
*
* @var array
- * @static
*/
static $_export = NULL;
/**
* this table in the civicrm_log table
*
* @var boolean
- * @static
*/
static $_log = TRUE;
/**
/**
* returns the names of this table
*
- * @static
* @return string
*/
public static function getTableName() {
* returns the list of fields that can be imported
*
* return array
- * @static
*/
static function &import($prefix = FALSE) {
if (!(self::$_import)) {
* returns the list of fields that can be exported
*
* return array
- * @static
*/
static function &export($prefix = FALSE) {
if (!(self::$_export)) {
* @return string
* formatted address string
*
- * @static
*/
static function format(
$fields,
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* Singleton function used to manage this object
*
* @return object
- * @static
*/
public static function &singleton() {
if (self::$_singleton === NULL) {
*
* @return array
* associative array of settings for the cache
- * @static
*/
public static function getCacheSettings($cachePlugin) {
switch ($cachePlugin) {
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* singleton pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* @return string
* formatted string for date
*
- * @static
*/
public static function format($date, $separator = '', $invalidDate = 0) {
if (is_numeric($date) &&
* @return array
* 0-based array with abbreviated weekday names
*
- * @static
*/
public static function &getAbbrWeekdayNames() {
static $abbrWeekdayNames;
* @return array
* 0-based array with full weekday names
*
- * @static
*/
public static function &getFullWeekdayNames() {
static $fullWeekdayNames;
* @return array
* 1-based array with abbreviated month names
*
- * @static
*/
public static function &getAbbrMonthNames($month = FALSE) {
static $abbrMonthNames;
* @return array
* 1-based array with full month names
*
- * @static
*/
public static function &getFullMonthNames() {
static $fullMonthNames;
*
* @return string
* the $format-formatted $date
- * @static
*/
public static function customFormat($dateString, $format = NULL, $dateParts = NULL) {
// 1-based (January) month names arrays
*
* @return string
* date/datetime in ISO format
- * @static
*/
public static function mysqlToIso($mysql) {
$year = substr($mysql, 0, 4);
*
* @return string
* date/datetime in MySQL format
- * @static
*/
public static function isoToMysql($iso) {
$dropArray = array('-' => '', ':' => '', ' ' => '');
* Index of params.
*
* @return bool
- * @static
*/
public static function convertToDefaultDate(&$params, $dateType, $dateParam) {
$now = getdate();
*
* @return string
* Return the customized todays date (Y-m-d)
- * @static
*/
public static function getToday($dayParams = NULL, $format = "Y-m-d") {
if (is_null($dayParams) || empty($dayParams)) {
*
* @return bool
* true if today's date is in the given date range
- * @static
*/
public static function getRange($startDate, $endDate) {
$today = date("Y-m-d");
*
* @return array
* start date, end date
- * @static
*/
public static function getFromTo($relative, $from, $to) {
if ($relative) {
*
* @return int
* array $results contains years or months
- * @static
*/
static public function calculateAge($birthDate) {
$results = array();
*
* @return array
* start date and end date for the relative time frame
- * @static
*/
public static function relativeToAbsolute($relativeTerm, $unit) {
$now = getdate();
*
* @return int
* $fy Current Fiscl Year
- * @static
*/
public static function calculateFiscalYear($fyDate, $fyMonth) {
$date = date("Y-m-d");
*
* @return string
* the time in UTC
- * @static
*/
public static function getUTCTime($offset = 0) {
$originalTimezone = date_default_timezone_get();
* Should we abort or just return an invalid code.
*
* @return void
- * @static
*/
public static function createDir($path, $abort = TRUE) {
if (is_dir($path) || empty($path)) {
*
* @throws Exception
* @return void
- * @static
*/
public static function cleanDir($target, $rmdir = TRUE, $verbose = TRUE) {
static $exceptions = array('.', '..');
* @param string $slash
*
* @return string
- * @static
*/
public static function addTrailingSlash($path, $slash = NULL) {
if (!$slash) {
* Server to retrieve the lat/long
*
* @var string
- * @static
*/
static protected $_server = 'maps.googleapis.com';
* Uri of service
*
* @var string
- * @static
*/
static protected $_uri = '/maps/api/geocode/xml?sensor=false&address=';
*
* @return boolean
* true if we modified the address, false otherwise
- * @static
*/
public static function format(&$values, $stateName = FALSE) {
// we need a valid country, else we ignore
* Server to retrieve the lat/long
*
* @var string
- * @static
*/
static protected $_server = 'query.yahooapis.com';
* Uri of service
*
* @var string
- * @static
*/
static protected $_uri = '/v1/public/yql';
*
* @return boolean
* true if we modified the address, false otherwise
- * @static
*/
public static function format(&$values, $stateName = FALSE) {
CRM_Utils_System::checkPHPVersion(5, TRUE);
* We don't have a container or dependency-injection, so use singleton instead
*
* @var object
- * @static
*/
private static $_singleton = NULL;
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
*
* @return string
* JSON array
- * @static
*/
public static function encode($params, $identifier = 'id') {
$buildObject = array();
*
* @return string
* the plucked email address
- * @static
*/
public static function pluckEmailFromHeader($header) {
preg_match('/<([^<]*)>$/', $header, $matches);
*
* @return boolean
* true if valid outBound email configuration found, false otherwise
- * @static
*/
public static function validOutBoundMail() {
$mailingInfo = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
* @return string
* formatted monetary string
*
- * @static
*/
public static function format($amount, $currency = NULL, $format = NULL, $onlyNumber = FALSE, $valueFormat = NULL) {
/**
* Colours.
* @var array
- * @static
*/
private static $_colours = array(
"#C3CC38",
*
* @return object
* $chart object of open flash chart.
- * @static
*/
public static function &barChart(&$params) {
$chart = NULL;
*
* @return object
* $chart object of open flash chart.
- * @static
*/
public static function &pieChart(&$params) {
$chart = NULL;
*
* @return object
* $chart object of open flash chart.
- * @static
*/
public static function &bar_3dChart(&$params) {
$chart = NULL;
*
* @return string
* The html formatted string
- * @static
*/
public static function getAToZBar(&$query, $sortByCharacter, $isDAO = FALSE) {
$AToZBar = self::createLinks($query, $sortByCharacter, $isDAO);
*
* @return array
* is a array of static characters
- * @static
*/
public static function getStaticCharacters() {
$staticAlphabets = array(
*
* @return array
* is a array of dynamic characters
- * @static
*/
public static function getDynamicCharacters(&$query, $isDAO) {
if ($isDAO) {
*
* @return array
* with links
- * @static
*/
public static function createLinks(&$query, $sortByCharacter, $isDAO) {
$AToZBar = self::getStaticCharacters();
* doesn't need to know which class the Pseudoconstant is on
* (some are on the Contribute_Pseudoconsant Class etc
*
- * @static
*
* @param $constant
*
* doesn't need to know which class the Pseudoconstant is on
* (some are on the Contribute_Pseudoconsant Class etc
*
- * @static
*
* @param $constant
*
/**
* Number of seconds we should let a REST process idle
- * @static
*/
static $rest_timeout = 0;
* pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
* @param string the key to permit session scope's
*
* @return object
- * @static
*/
public static function &singleton() {
if (self::$_singleton === NULL) {
* The list of recently viewed items
*
* @var array
- * @static
*/
static private $_recent = NULL;
* Initialize this class and set the static variables
*
* @return void
- * @static
*/
public static function initialize() {
if (!self::$_recent) {
*
* @return array
* the recently viewed array
- * @static
*/
public static function &get() {
self::initialize();
* @param array $others
*
* @return void
- * @static
*/
static function add(
$title,
* Array of the recent Item to be removed.
*
* @return void
- * @static
*/
public static function del($recentItem) {
self::initialize();
* Contact id that had to be removed.
*
* @return void
- * @static
*/
public static function delContact($id) {
self::initialize();
*
* @return bool
* true if valid date
- * @static
*/
public static function currentDate($date, $monthRequired = TRUE) {
$config = CRM_Core_Config::singleton();
*
* @return bool
* true if valid date
- * @static
*/
public static function mysqlDate($date) {
// allow date to be null
*
* @return boolean
* true if object exists
- * @static
*/
public static function objectExists($value, $options) {
$name = 'name';
*
* @return bool
* true if valid date
- * @static
*/
public static function qfDate($date) {
$config = CRM_Core_Config::singleton();
/**
* Number of seconds we should let a soap process idle
- * @static
*/
static $soap_timeout = 0;
* @throws SoapFault
* @return string
* The SOAP Client key
- * @static
*/
public function authenticate($name, $pass, $loadCMSBootstrap = FALSE) {
require_once str_replace('_', DIRECTORY_SEPARATOR, $this->ufClass) . '.php';
*
* @return string
* the string to append to the url
- * @static
*/
public static function sortIDValue($index, $dir) {
return ($dir == self::DESCENDING) ? $index . '_d' : $index . '_u';
*
* @return string
* An equivalent variable name.
- * @static
*/
public static function titleToVar($title, $maxLength = 31) {
$variable = self::munge($title, '_', $maxLength);
*
* @return string
* returns the manipulated string
- * @static
*/
public static function munge($name, $char = '_', $len = 63) {
// replace all white space and non-alpha numeric with $char
*
* @return string
* Randomized Variable Name
- * @static
*/
public static function rename($name, $len = 4) {
$rand = substr(uniqid(), 0, $len);
*
* @return string
* the last component
- * @static
*/
public static function getClassName($string, $char = '_') {
$names = array();
* The string (or array of strings) to append.
*
* @return void
- * @static
*/
public static function append(&$str, $delim, $name) {
if (empty($name)) {
*
* @return boolean
* true if string is ascii
- * @static
*/
public static function isAscii($str, $utf8 = TRUE) {
if (!function_exists('mb_detect_encoding')) {
*
* @return array
* array of strings w/ corresponding redacted outputs
- * @static
*/
public static function regex($str, $regexRules) {
//redact the regular expressions
*
* @param string $str
* Input string.
- * @static
*
* @return boolean
*/
*
* @return boolean
* true if the urls match, else false
- * @static
*/
public static function match($url1, $url2) {
$url1 = strtolower($url1);
*
* @return mix
* $v returns civicrm url (eg: civicrm/contact/search/...)
- * @static
*/
public static function extractURLVarValue($query) {
$config = CRM_Core_Config::singleton();
* The string to be translated.
*
* @return boolean
- * @static
*/
public static function strtobool($str) {
if (!is_scalar($str)) {
* The string to be translated.
*
* @return boolean
- * @static
*/
public static function strtoboolstr($str) {
if (!is_scalar($str)) {
*
* @return string
* the converted string
- * @static
*/
public static function htmlToText($html) {
require_once 'packages/html2text/rcube_html2text.php';
*
* @return string
* the cleaned string
- * @static
*/
public static function stripSpaces($string) {
return (empty($string)) ? $string : preg_replace("/\s{2,}/", " ", trim($string));
*
* @return string
* the sanitized string
- * @static
*/
static function stripPathChars(
$string,
*
* @return string
* the cleaned up string
- * @static
*/
public static function purifyHTML($string) {
static $_filter = NULL;
*
* @return string
* Formatted url.
- * @static
*/
function languageNegotiationURL(
$url,
*
* @return string
* loginURL for the current CMS
- * @static
*/
public abstract function getLoginURL($destination = '');
*
* @return string
* loginURL for the current CMS
- * @static
*/
public function getLoginURL($destination = '') {
$query = $destination ? array('destination' => $destination) : array();
*
* @return string
* , formatted url.
- * @static
*/
public function languageNegotiationURL($url, $addLanguagePart = TRUE, $removeLanguagePart = FALSE) {
if (empty($url)) {
*
* @return string
* , formatted url.
- * @static
*/
public function languageNegotiationURL($url, $addLanguagePart = TRUE, $removeLanguagePart = FALSE) {
if (empty($url)) {
*
* @return string
* loginURL for the current CMS
- * @static
*/
public function getLoginURL($destination = '') {
$config = CRM_Core_Config::singleton();
*
* @return string
* loginURL for the current CMS
- * @static
*/
public function getLoginURL($destination = '') {
$query = $destination ? array('destination' => $destination) : array();
*
* @return string
* , formatted url.
- * @static
*/
public function languageNegotiationURL($url, $addLanguagePart = TRUE, $removeLanguagePart = FALSE) {
if (empty($url)) {
*
* @return string
* loginURL for the current CMS
- * @static
*/
public function getLoginURL($destination = '') {
$config = CRM_Core_Config::singleton();
*
* @return boolean
* true if yes, else false
- * @static
*/
public function checkPermission($str) {
return TRUE;
* @throws Exception
* @return string
* loginURL for the current CMS
- * @static
*/
public function getLoginURL($destination = '') {
throw new Exception("Method not implemented: getLoginURL");
* @throws Exception
* @return string
* loginURL for the current CMS
- * @static
*/
public function getLoginURL($destination = '') {
throw new Exception("Method not implemented: getLoginURL");
* @internal param string $url
*
* @return void
- * @static
*/
public function appendBreadCrumb($breadCrumbs) {
$breadCrumb = wp_get_breadcrumb();
* Reset an additional breadcrumb tag to the existing breadcrumb
*
* @return void
- * @static
*/
public function resetBreadCrumb() {
$bc = array();
* The new string to be appended.
*
* @return void
- * @static
*/
public function addHTMLHead($head) {
static $registered = FALSE;
* @param null
*
* @return void
- * @static
*/
public function mapConfigToSSL() {
global $base_url;
*
* @return string
* the url to post the form
- * @static
*/
public function postURL($action) {
if (!empty($action)) {
*
* @return array|bool
* [contactID, ufID, uniqueString] if success else false if no auth
- * @static
*/
public function authenticate($name, $password, $loadCMSBootstrap = FALSE, $realPath = NULL) {
$config = CRM_Core_Config::singleton();
* @param string $message
* The message to set.
*
- * @static
*/
public function setMessage($message) {
}
*
* @return date
*
- * @static
*/
public static function getTime($returnFormat = 'YmdHis') {
return date($returnFormat, self::getTimeRaw());
*
* @return date
*
- * @static
*/
public static function setTime($newDateTime, $returnFormat = 'YmdHis') {
self::$_delta = strtotime($newDateTime) - time();
* @return bool|array
* true if all required tokens are found,
* else an array of the missing tokens
- * @static
*/
public static function requiredTokens(&$str) {
if (self::$_requiredTokens == NULL) {
*
* @return boolean
* Was there a match
- * @static
*/
public static function token_match($type, $var, &$str) {
$token = preg_quote('{' . "$type.$var") . '(\|.+?)?' . preg_quote('}');
*
* @return string
* The processed string
- * @static
*/
public static function &token_replace($type, $var, $value, &$str, $escapeSmarty = FALSE) {
$token = preg_quote('{' . "$type.$var") . '(\|([^\}]+?))?' . preg_quote('}');
*
* @return string
* regular expression sutiable for using in preg_replace
- * @static
*/
private static function tokenRegex($token_type) {
return '/(?<!\{|\\\\)\{' . $token_type . '\.([\w]+(\-[\w\s]+)?)\}(?!\})/';
*
* @return string
* the escaped string
- * @static
*/
private static function tokenEscapeSmarty($string) {
// need to use negative look-behind, as both str_replace() and preg_replace() are sequential
*
* @return string
* The processed string
- * @static
*/
public static function &replaceDomainTokens(
$str,
*
* @return string
* The processed string
- * @static
*/
public static function &replaceOrgTokens($str, &$org, $html = FALSE, $escapeSmarty = FALSE) {
self::$_tokens['org'] =
*
* @return string
* The processed sstring
- * @static
*/
public static function &replaceMailingTokens(
$str,
*
* @return string
* The processed string
- * @static
*/
public static function &replaceActionTokens(
$str,
*
* @return string
* The processed string
- * @static
*/
public static function &replaceContactTokens(
$str,
*
* @return string
* The processed string
- * @static
*/
public static function &replaceHookTokens(
$str,
* @return void
* this function works directly on the string that is passed
* @access public
- * @static
*/
public static function unescapeTokens(&$str) {
$str = preg_replace('/\\\\|\{(\{\w+\.\w+\})\}/', '\\1', $str);
*
* @return string
* The processed string
- * @static
*/
public static function &replaceUnsubscribeTokens(
$str,
*
* @return string
* The processed string
- * @static
*/
public static function &replaceResubscribeTokens(
$str, &$domain, &$groups, $html,
*
* @return string
* The processed string
- * @static
*/
public static function &replaceSubscribeTokens($str, $group, $url, $html) {
if (self::token_match('subscribe', 'group', $str)) {
*
* @return string
* The processed string
- * @static
*/
public static function &replaceSubscribeInviteTokens($str) {
if (preg_match('/\{action\.subscribeUrl\}/', $str)) {
*
* @return string
* The processed string
- * @static
*/
public static function &replaceWelcomeTokens($str, $group, $html) {
if (self::token_match('welcome', 'group', $str)) {
*
* @return array
* Array of tokens that weren't replaced
- * @static
*/
public static function &unmatchedTokens(&$str) {
//preg_match_all('/[^\{\\\\]\{(\w+\.\w+)\}[^\}]/', $str, $match);
*
* @return string
* The processed string
- * @static
*/
public static function &replaceComponentTokens(&$str, $contact, $components, $escapeSmarty = FALSE, $returnEmptyToken = TRUE) {
if (!is_array($components) || empty($contact)) {
* @return array
* array of tokens mentioned in field
* @access public
- * @static
*/
public static function getTokens($string) {
$matches = array();
* The mailing list jobID - this is a legacy param.
*
* @return array
- * @static
*/
static function getTokenDetails(
$contactIDs,
* @param string $className
*
* @return array
- * @static
*/
static function getContributionTokenDetails(
$contributionIDs,
*
* @return string
* The processed string
- * @static
*/
public static function &replaceUserTokens($str, $knownTokens = NULL, $escapeSmarty = FALSE) {
$key = 'user';
*
* @return string
* The VERP encoded address
- * @static
*/
public static function encode($sender, $recipient) {
preg_match('/(.+)\@([^\@]+)$/', $sender, $match);
*
* @return array
* The tuple ($sender, $recipient)
- * @static
*/
public static function &verpdecode($address) {
preg_match('/^(.+)-([^=]+)=([^\@]+)\@(.+)/', $address, $match);
* singleton pattern and cache the instance in this variable
*
* @var object
- * @static
*/
static private $_singleton = NULL;
*
* @return boolean
* true if error, false otherwise
- * @static
* @access public
*/
function civicrm_error($result) {
* @return array
* API result array
*
- * @static
* @access public
*/
function civicrm_api3_case_type_create($params) {
* @return array
* API Result Array
*
- * @static
* @access public
*/
function civicrm_api3_contact_create($params) {
* @return array
* API Result Array
* (@getfields contact_get}
- * @static
* @access public
*
* @example ContactGet.php Standard GET example
*
* @return CRM_Contact_BAO_Contact
* @access public
- * @static
*/
function _civicrm_api3_contact_update($params, $contactID = NULL) {
//@todo - doesn't contact create support 'id' which is already set- check & remove
* @return array
* API Result Array
*
- * @static
* @access public
*/
function civicrm_api3_contact_merge($params) {
* @throws API_Exception
* @return array
* Api result array
- * @static
* @access public
* @example ContributionCreate.php
* {@getfields Contribution_create}
*
* @return boolean
* true if success, else false
- * @static
* @access public
* {@getfields Contribution_delete}
* @example ContributionDelete.php
*
* @return array
* Array of contributions, if error an array with an error id and error message
- * @static
* @access public
* {@getfields Contribution_get}
* @example ContributionGet.php
*
* @return array
* (reference ) contribution of created or updated record (or a civicrm error)
- * @static
* @access public
*
*/
* @throws Exception
* @return array
* Api result array
- * @static
* @access public
*/
function civicrm_api3_contribution_sendconfirmation($params) {
* @throws API_Exception
* @return array
* Api result array
- * @static
* @access public
*/
function civicrm_api3_contribution_completetransaction(&$params) {
*
* @return array
* API result
- * @static
* @access public
* @example ExtensionInstall.php
*
*
* @return array
* API result
- * @static
* @access public
*
*/
*
* @return array
* API result
- * @static
* @access public
* @example ExtensionEnable.php
*
*
* @return array
* API result
- * @static
* @access public
* @example ExtensionDisable.php
*
*
* @return array
* API result
- * @static
* @access public
* @example ExtensionUninstall.php
*
* @throws API_Exception
* @return array
* API result
- * @static
* @access public
* @example ExtensionDownload.php
*/
*
* @return array
* API result
- * @static
* @access public
* @example ExtensionRefresh.php
*
*
* @return array
* API result
- * @static
* @access public
* @example ExtensionGet.php
*/
* @return array
* API Result Array
* {@getfields Job_delete}
- * @static
* @access public
*/
function civicrm_api3_job_delete($params) {
* @return array
* API Result Array
*
- * @static
* @access public
*
*/
* API Result Array
* {@getfields contact_geocode}
*
- * @static
* @access public
*
*
*
* @return boolean
* true if success, else false
- * @static
* @access public
*
*/
*
* @return boolean
* true if success, else false
- * @static
* @access public
*
*/
*
* @return boolean
* true if success, else false
- * @static
* @access public
*/
function civicrm_api3_job_update_greeting($params) {
*
* @return boolean
* true if success, else false
- * @static
* @access public
*
*/
*
* @return boolean
* true if success, else false
- * @static
* @access public
*/
function civicrm_api3_job_process_membership($params) {
*
* @return boolean
* true if success, else false
- * @static
* @access public
*/
function civicrm_api3_job_process_respondent($params) {
* @return array
* API Result Array
*
- * @static
* @access public
*/
function civicrm_api3_job_process_batch_merge($params) {
*
* @return boolean
* true if success, else false
- * @static
* @access public
*/
function civicrm_api3_job_cleanup($params) {
*
* @return array
* API result
- * @static
* @access public
*
*/
*
* @return array
* API result
- * @static
* @access public
* @example CRM/Mailing/BAO/Mailing.php
*
* array of properties,
* if error an array with an error id and error message
* {@getfields note_get}
- * @static
* @access public
*/
function civicrm_api3_note_get($params) {
* @return array
* API Result Array
* {@getfields PaymentProcessorType_delete}
- * @static
* @access public
*/
function civicrm_api3_payment_processor_type_delete($params) {
*
* @return boolean
* true if success, else false
- * @static
* {@getfields pledge_delete}
* @example PledgeDelete.php
* @access public
*
* @return array
* API Result
- * @static
* @access public
*/
function civicrm_api3_pledge_payment_create($params) {
*
* @return array
* API result
- * @static
* @access public
*/
function civicrm_api3_pledge_payment_delete($params) {
*
* @return array
* (reference ) array of pledges, if error an array with an error id and error message
- * @static
* @access public
*/
function civicrm_api3_pledge_payment_get($params) {
* @return array
* API Result Array
* {@getfields relationship_create}
- * @static
* @access public
*/
function civicrm_api3_relationship_create($params) {
* {@getfields relationship_delete}
* @example RelationshipDelete.php Delete Example
*
- * @static
* @access public
*/
function civicrm_api3_relationship_delete($params) {
* @return array
* API Result Array
* {@getfields RelationshipType_delete}
- * @static
* @access public
*/
function civicrm_api3_relationship_type_delete($params) {
*
* @return array
* (reference ) contribution_id of created or updated record
- * @static
* @access public
* @deprecated - api currently not supported
*/
*
* @return boolean
* true if success, else false
- * @static
* @access public
* @example SystemFlush.php
*
*
* @return array
*
- * @static
* @access public
*/
function _civicrm_api3_dao_to_array($dao, $params = NULL, $uniqueFields = TRUE, $entity = "", $autoFind = TRUE) {
* @param array|bool $uniqueFields
*
* @return array
- * @static
* @access public
*/
function _civicrm_api3_object_to_array(&$dao, &$values, $uniqueFields = FALSE) {
* Should we force a reload of this payment object.
*
* @return object
- * @static
*/
static function &singleton($mode = 'test', &$paymentProcessor, &$paymentForm = NULL, $force = FALSE) {
$processorName = $paymentProcessor['name'];
/**
* This code is reused with advanced search, hence the reference to $self
*
- * @static
* @param string $tagName
* @param $self
*/