/**
* global validation rules for the form
*
- * @param array $fields (referance) posted values of the form
+ * @param array $fields posted values of the form
*
* @return array if errors then list of errors to be posted back to the form,
* true otherwise
/**
* format params for update and fill mode
*
- * @param $params array referance to an array containg all the
+ * @param $params array reference to an array containing all the
* values for import
* @param $onDuplicate int
* @param $cid int contact id
*
* @param array $groupParams Array containing group fields
* whose option-values is to retrieved.
- * @param array $values (referance) to the array which
+ * @param array $values (reference) to the array which
* will have the values for the group
* @param string $orderBy for orderBy clause
*
/**
* global validation rules for the form
*
- * @param array $fields (referance) posted values of the form
+ * @param array $fields posted values of the form
*
* @param $files
* @param $self
* then status will be updated based on existing start and end
* dates and log will be added for the status change.
*
- * @param array $currentMembership referance to the array
+ * @param array $currentMembership reference to the array
* containing all values of
* the current membership
* @param array $changeToday array of month, day, year
$contribution = CRM_Contribute_BAO_Contribution::create($contributionParams, $ids);
- //CRM-13981, create new soft-credit record as to record payment from differnt person for this membership
+ //CRM-13981, create new soft-credit record as to record payment from different person for this membership
if (!empty($contributionSoftParams)) {
$contributionSoftParams['contribution_id'] = $contribution->id;
$contributionSoftParams['currency'] = $contribution->currency;
else {
CRM_Utils_Hook::pre('create', 'LineItem', $params['entity_id'], $params);
}
-
+
// unset entity table and entity id in $params
// we never update the entity table and entity id during update mode
if ($id) {
* processAmount method
*
* @param int $fid price set field id
- * @param array $params referance to form values
- * @param array $fields referance to array of fields belonging
+ * @param array $params reference to form values
+ * @param array $fields reference to array of fields belonging
* to the price set used for particular event
- * @param array $values referance to the values array(
+ * @param array $values reference to the values array(
this is
* lineItem array)
*
$line['entity_id'] = $contributionDetails->id;
}
}
-
+
// if financial type is not set and if price field value is NOT NULL
// get financial type id of price field value
if (!empty($line['price_field_value_id']) && empty($line['financial_type_id'])) {
$totalAmount = CRM_Utils_Array::value('total_amount', $params);
$financialType = CRM_Utils_Array::value('financial_type_id', $params);
foreach ($priceSetDetails as $values) {
- if ($entityTable == 'membership') {
+ if ($entityTable == 'membership') {
if ($isRelatedID != $values['membership_type_id']) {
continue;
}
/**
* global validation rules for the form
*
- * @param array $fields (referance) posted values of the form
+ * @param array $fields posted values of the form
*
* @param $files
* @param $form
/**
* global validation rules for the form
*
- * @param array $fields (referance) posted values of the form
+ * @param array $fields posted values of the form
*
* @param $files
* @param $form
* processAmount method
*
* @param int $fid price set field id
- * @param array $params referance to form values
- * @param array $fields referance to array of fields belonging
+ * @param array $params reference to form values
+ * @param array $fields reference to array of fields belonging
* to the price set used for particular event
- * @param array $values referance to the values array(
+ * @param array $values reference to the values array(
this is
* lineItem array)
*
foreach ($params["price_{$fid}"] as $oid => $qty) {
$price = $options[$oid]['amount'];
- // lets clean the price in case it is not yet cleant
+ // lets clean the price in case it is not yet cleaned
// CRM-10974
$price = CRM_Utils_Rule::cleanMoney($price);
$this->activities = NULL;
$this->indices = array();
}
-}
\ No newline at end of file
+}
}
return $r;
}
-}
\ No newline at end of file
+}
* In case of updating existing campaign, id of that particular campaign must
* be in $params array.
*
- * @param array $params (referance) Associative array of property
+ * @param array $params (reference) Associative array of property
* name/value pairs to insert in new 'campaign'
*
* @return array campaign array
/**
* Returns array of campaigns matching a set of one or more group properties
*
- * @param array $params (referance) Array of one or more valid
+ * @param array $params Array of one or more valid
* property_name=>value pairs. If $params is set
* as null, all campaigns will be returned
*
- * @return array (referance) Array of matching campaigns
+ * @return array Array of matching campaigns
* @access public
* {@getfields campaign_get}
*/
* @param array $params (reference) array containing id of the group
* to be deleted
*
- * @return array (referance) returns flag true if successfull, error
+ * @return array (reference) returns flag true if successful, error
* message otherwise
* {@getfields campaign_delete}
* @access public
* It's recommended to use the api getoptions action instead
*
* @param string Name of a public static method of
- * CRM_Core_PseudoContant: one of
+ * CRM_Core_PseudoConstant: one of
* <ul>
* <li>activityStatus</li>
* <li>activityType</li>
$params['gender_id']['title'] = 'Gender ID';
$params['gender']['title'] = 'Gender';
$params['on_hold']['title'] = 'Primary Email On Hold';
- $params['im']['title'] = 'Primary Instant Messanger';
- $params['im_id']['title'] = 'Primary Instant Messanger ID';
+ $params['im']['title'] = 'Primary Instant Messenger';
+ $params['im_id']['title'] = 'Primary Instant Messenger ID';
$params['group_id']['title'] = 'Group Memberships (filter)';
$params['group']['title'] = 'Group Memberships (filter, array)';
$params['tag']['title'] = 'Assigned tags (filter, array)';
- $params['birth_date_low'] = array('name' => 'birth_date_low', 'type' => CRM_Utils_Type::T_DATE, 'title' => ts('Birthdate is equal to or greater than'));
- $params['birth_date_high'] = array('name' => 'birth_date_high', 'type' => CRM_Utils_Type::T_DATE, 'title' => ts('Birthdate is equal to or less than'));
+ $params['birth_date_low'] = array('name' => 'birth_date_low', 'type' => CRM_Utils_Type::T_DATE, 'title' => ts('Birth Date is equal to or greater than'));
+ $params['birth_date_high'] = array('name' => 'birth_date_high', 'type' => CRM_Utils_Type::T_DATE, 'title' => ts('Birth Date is equal to or less than'));
$params['deceased_date_low'] = array('name' => 'deceased_date_low','type' => CRM_Utils_Type::T_DATE, 'title' => ts('Deceased Date is equal to or greater than'));
$params['deceased_date_high'] = array('name' => 'deceased_date_high', 'type' => CRM_Utils_Type::T_DATE, 'title' => ts('Deceased Date is equal to or less than'));
}
* In case of updating existing contact_type, id of that particular contact_type must
* be in $params array.
*
- * @param array $params (referance) Associative array of property
+ * @param array $params (reference) Associative array of property
* name/value pairs to insert in new 'contact_type'
*
* @return array contact_type array
/**
* Returns array of contact_types matching a set of one or more group properties
*
- * @param array $params (referance) Array of one or more valid
+ * @param array $params one or more valid
* property_name=>value pairs. If $params is set
* as null, all contact_types will be returned
*
- * @return array (referance) Array of matching contact_types
+ * @return array Array of matching contact_types
* @access public
*/
function civicrm_api3_contact_type_get($params) {
* This method is used to delete any existing contact_type. id of the group
* to be deleted is required field in $params array
*
- * @param array $params (reference) array containing id of the group
+ * @param array $params array containing id of the group
* to be deleted
*
- * @return array (referance) returns flag true if successfull, error
- * message otherwise
+ * @return array API Result Array
*
* @access public
*/
'FKClassName' => 'CRM_Contact_DAO_Contact',
);
// note this is a recommended option but not adding as a default to avoid
- // creating unecessary changes for the dev
+ // creating unnecessary changes for the dev
$params['skipRecentView'] = array(
'name' => 'skipRecentView',
'title' => 'Skip adding to recent view',
* This method is used to delete any existing contribution_page. id of the group
* to be deleted is required field in $params array
*
- * @param array $params (reference) array containing id of the group
+ * @param array $params array containing id of the group
* to be deleted
*
- * @return array (referance) returns flag true if successfull, error
- * message otherwise
+ * @return array API result Array
* {@getfields contribution_page_delete}
* @access public
*/
* @param array $params (reference) array containing id of the group
* to be deleted
*
- * @return array (referance) returns flag true if successfull, error
- * message otherwise
+ * @return array API result array
* {@getfields contribution_page_delete}
* @access public
*/
/**
* Returns array of contribution_recurs matching a set of one or more group properties
*
- * @param array $params (referance) Array of one or more valid
+ * @param array $params Array of one or more valid
* property_name=>value pairs. If $params is set
* as null, all contribution_recurs will be returned
*
- * @return array (referance) Array of matching contribution_recurs
+ * @return array API result Array of matching contribution_recurs
* {@getfields contribution_recur_get}
* @access public
*/
* This method is used to delete any existing contribution_recur. id of the group
* to be deleted is required field in $params array
*
- * @param array $params (reference) array containing id of the group
+ * @param array $params array containing id of the group
* to be deleted
*
- * @return array (referance) returns flag true if successfull, error
+ * @return array API result array
* message otherwise
* {@getfields contribution_recur_delete}
* @access public
*
* @param $params
*
- * @internal param Int $fileId Id of the file to be deleted
- *
- * @return null if successfull, object of CRM_Core_Error otherwise
+ * @return array API result array
* @access public
*/
function civicrm_api3_file_delete($params) {
/**
* Returns array of grants matching a set of one or more group properties
*
- * @param array $params (referance) Array of one or more valid
+ * @param array $params Array of one or more valid
* property_name=>value pairs. If $params is set
* as null, all grants will be returned
*
- * @return array (referance) Array of matching grants
+ * @return array Array of matching grants
* {@getfields grant_get}
* @access public
*/
* create/update group
*
* This API is used to create new group or update any of the existing
- * In case of updating existing group, id of that particular grop must
+ * In case of updating existing group, id of that particular group must
* be in $params array. Either id or name is required field in the
* $params array
*
- * @param array $params (referance) Associative array of property
+ * @param array $params Associative array of property
* name/value pairs to insert in new 'group'
*
- * @return array returns id of the group created if success,
- * error message otherwise
+ * @return array API result array
*@example GroupCreate.php
*{@getfields group_create}
* @access public
/**
* Returns array of groups matching a set of one or more group properties
*
- * @param array $params (referance) Array of one or more valid
+ * @param array $params Array of one or more valid
* property_name=>value pairs. If $params is set
* as null, all groups will be returned
*
/**
* This API will give list of the groups for particular contact
- * Particualr status can be sent in params array
+ * Particular status can be sent in params array
* If no status mentioned in params, by default 'added' will be used
* to fetch the records
*
* @param array $params array containing id of the group
* to be deleted
*
- * @return array returns flag true if successfull, error message otherwise
+ * @return array API result array
* {@getfields line_item_delete}
* @access public
*/
*
* @param array $params array containing id of the record to be deleted
*
- * @return array returns flag true if successfull, error message otherwise
+ * @return array API result array
* {@getfields loc_block_delete}
* @access public
*/
*
* @example LocationTypeDelete.php Standard Delete Example
*
- * @return boolean | error true if successfull, error otherwise
+ * @return array API result array
* {@getfields LocationType_delete}
* @access public
*/
}
/**
- * Returns array of mail_settingss matching a set of one or more group properties
+ * Returns array of mail_settings matching a set of one or more group properties
*
- * @param array $params (referance) Array of one or more valid
+ * @param array $params Array of one or more valid
* property_name=>value pairs. If $params is set
- * as null, all mail_settingss will be returned
+ * as null, all mail_settings will be returned
*
- * @return array (referance) Array of matching mail_settingss
+ * @return array Array of matching mail_settings
* {@getfields mail_settings_get}
* @access public
*/
* This method is used to delete any existing Option Group. id of the group
* to be deleted is required field in $params array
*
- * @param array $params (reference) array containing id of the group
+ * @param array $params array containing id of the group
* to be deleted
*
- * @return array (reference) returns flag true if successfull, error
+ * @return array API Result Array
* message otherwise
* {@getfields OptionGroup_delete}
* @access public
* In case of updating existing participant_status, id of that particular participant_status must
* be in $params array.
*
- * @param array $params (referance) Associative array of property
+ * @param array $params Associative array of property
* name/value pairs to insert in new 'participant_status'
*
* @return array participant_status array
}
/**
- * Returns array of participant_statuss matching a set of one or more group properties
+ * Returns array of participant_statuses matching a set of one or more group properties
*
- * @param array $params (referance) Array of one or more valid
+ * @param array $params Array of one or more valid
* property_name=>value pairs. If $params is set
- * as null, all participant_statuss will be returned
+ * as null, all participant_statuses will be returned
*
- * @return array (referance) Array of matching participant_statuses
+ * @return array Array of matching participant_statuses
* {@getfields ParticipantStatusType_get}
* @example ParticipantStatusTypeGet.php
* @access public
* the oldest pledge with no associated contribution is updated
*
* @todo possibly add ability to add payment if there are less payments than pledge installments
- * @todo possibily add ability to recalc dates if the schedule is changed
+ * @todo possibly add ability to recalculate dates if the schedule is changed
*
* @param array $params input parameters
* {@getfields PledgePayment_create}
* @param array $params array containing id of the group
* to be deleted
*
- * @return array returns flag true if successfull, error message otherwise
+ * @return array API result array
* {@getfields price_field_delete}
* @access public
*/
* @param array $params array containing id of the group
* to be deleted
*
- * @return array returns flag true if successfull, error message otherwise
+ * @return array API result array
* {@getfields price_field_value_delete}
* @access public
*/
* @param array $params array containing id of the group
* to be deleted
*
- * @return array returns flag true if successfull, error message otherwise
+ * @return array API result array
* {@getfields price_set_delete}
* @access public
*/
/**
* Returns array of settings matching input parameters
*
- * @param array $params (referance) Array of one or more valid
+ * @param array $params Array of one or more valid
* property_name=>value pairs.
*
* @return array Array of matching settings
/**
* Returns array of surveys matching a set of one or more group properties
*
- * @param array $params (referance) Array of one or more valid
+ * @param array $params Array of one or more valid
* property_name=>value pairs. If $params is set
* as null, all surveys will be returned
*
- * @return array (referance) Array of matching surveys
+ * @return array API result Array of matching surveys
* {@getfields survey_get}
* @access public
*/
*
* @example TagDelete.ph
*
- * @return boolean | error true if successfull, error otherwise
+ * @return array API result array
* {@getfields tag_delete}
* @access public
*/
/**
* Wrapper Function for civicrm_verify_mandatory to make it simple to pass either / or fields for checking
*
- * @param array $params array of fields to checkl
+ * @param array $params array of fields to check
* @param array $daoName string DAO to check for required fields (create functions only)
* @param array $keyoptions list of required fields options. One of the options is required
*
* A PHP cron script to run the outstanding and scheduled CiviMail jobs
* initiated by Owen Barton from a mailing sent by Lobo to crm-mail
*
- * The structure of the file is set to mimiic soap.php which is a stand-alone
+ * The structure of the file is set to mimic soap.php which is a stand-alone
* script and hence does not have any UF issues. You should be able to run
* this script using a web url or from the command line
*/
}
/**
- * Implemenation of hook_civicrm_postInstall
+ * Implementation of hook_civicrm_postInstall
*/
function moduletest_civicrm_postInstall() {
CRM_Extension_Manager_ModuleTest::incHookCount('moduletest', 'postInstall');
}
/**
- * Implemenation of hook_civicrm_uninstall
+ * Implementation of hook_civicrm_uninstall
*/
function moduletest_civicrm_uninstall() {
CRM_Extension_Manager_ModuleTest::incHookCount('moduletest', 'uninstall');
*/
function get_info() {
return array(
- 'name' => 'Contact Serach Subtype',
+ 'name' => 'Contact Search Subtype',
'description' => 'Test Contact for subtype.',
'group' => 'CiviCRM BAO Tests',
);
/**
* Set up an acl allowing contact to see 2 specified groups
- * - $this->_permissionedGroup & $this->_permissionedDisbaledGroup
+ * - $this->_permissionedGroup & $this->_permissionedDisabledGroup
*
- * You need to have precreated these groups & created the user e.g
+ * You need to have pre-created these groups & created the user e.g
* $this->createLoggedInUser();
* $this->_permissionedDisabledGroup = $this->groupCreate(array('title' => 'pick-me-disabled', 'is_active' => 0, 'name' => 'pick-me-disabled'));
* $this->_permissionedGroup = $this->groupCreate(array('title' => 'pick-me-active', 'is_active' => 1, 'name' => 'pick-me-active'));
$this->waitForElementPresent('link=Add Membership Type');
$this->waitForText('crm-notification-container', "Membership Type $title");
- // creating another Orgnization
+ // creating another Organization
$this->openCiviPage('contact/add', 'reset=1&ct=Organization', '_qf_Contact_cancel');
$org1 = substr(sha1(rand()), 0, 7);
$this->type('organization_name', "Organization $org1");
*/
function testGetFields() {
$result = $this->callAPISuccess('Contact', 'getfields', array());
- $this->assertArrayHasKey("custom_{$this->IndividualField['id']}", $result['values'], 'If This fails there is probably a cachine issue - failure in line' . __LINE__ . print_r(array_keys($result['values']), TRUE));
+ $this->assertArrayHasKey("custom_{$this->IndividualField['id']}", $result['values'], 'If This fails there is probably a caching issue - failure in line' . __LINE__ . print_r(array_keys($result['values']), TRUE));
$result = $this->callAPISuccess('Contact', 'getfields', array('action' => 'create', 'contact_type' => 'Individual'), 'in line' . __LINE__);
$this->assertArrayHasKey("custom_{$this->IndividualField['id']}", $result['values']);
$result = $this->callAPISuccess('Contact', 'getfields', array('action' => 'create', 'contact_type' => 'Organization'));
(my-stuff.js) as well as any special dependencies (jQuery plugins,
Backbone, etc).
-4. Edit the "civcrm/tests/qunit/my-stuff/test.js"
+4. Edit the "civicrm/tests/qunit/my-stuff/test.js"
5. To run the test-suite, login to CiviCRM as administrator and visit: