/**
* global form rule
*
- * @param array $fields the input form values
- * @param array $files the uploaded files if any
- * @param array $options additional user data
+ * @param array $fields the input form values
+ * @param array $files the uploaded files if any
+ * @param $self
+ *
+ * @internal param array $options additional user data
*
* @return true if no errors, else array of errors
* @access public
*
* @access public
*
+ * @param null $params
* @return void
*/
public function postProcess($params = NULL) {
/**
* returns all the rows in the given offset and rowCount
*
- * @param enum $action the action being performed
- * @param int $offset the row number to start from
- * @param int $rowCount the number of rows to return
- * @param string $sort the sql string that describes the sort order
- * @param enum $output what should the result set include (web/email/csv)
+ * @param enum $action the action being performed
+ * @param int $offset the row number to start from
+ * @param int $rowCount the number of rows to return
+ * @param string $sort the sql string that describes the sort order
+ * @param enum $output what should the result set include (web/email/csv)
+ *
+ * @param null $case
*
* @return int the total number of rows for this action
*/
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return
- * @access public
+ * @param $sendEmailMode
+ *
+ * @throws Exception
+ * @return void
+ @access public
* @static
*/
public static function sendEmail($params, $sendEmailMode) {
/**
* This function retrieve contact information.
*
- * @param array $voter an array of contact Ids.
- * @param array $returnProperties an array of return elements.
+ * @param $voterIds
+ * @param array $returnProperties an array of return elements.
*
- * @return $voterDetails array of contact info.
- * @static
+ * @internal param array $voter an array of contact Ids.
+ * @return array $voterDetails array of contact info.@static
*/
static function voterDetails($voterIds, $returnProperties = array(
)) {
/**
* This function retrieve survey related activities w/ for give voter ids.
*
- * @param int $surveyId survey id.
- * @param array $voterIds voterIds.
+ * @param int $surveyId survey id.
+ * @param array $voterIds voterIds.
*
- * @return $activityDetails array of survey activity.
- * @static
+ * @param null $interviewerId
+ * @param array $statusIds
+ *
+ * @return array $activityDetails array of survey activity.@static
*/
static function voterActivityDetails($surveyId, $voterIds, $interviewerId = NULL,
$statusIds = array()) {
/**
* This function retrieve survey related activities.
*
- * @param int $surveyId survey id.
+ * @param int $surveyId survey id.
*
- * @return $activities an array of survey activity.
- * @static
+ * @param null $interviewerId
+ * @param null $statusIds
+ * @param null $voterIds
+ * @param bool $onlyCount
+ * @return array $activities an array of survey activity.@static
*/
static function getSurveyActivities($surveyId,
$interviewerId = NULL,
/**
* This function retrieve all option groups which are created as a result set
*
- * @return $resultSets an array of option groups.
- * @static
+ * @param string $valueColumnName
+ * @return array $resultSets an array of option groups.@static
*/
static function getResultSets( $valueColumnName = 'title' ) {
$resultSets = array();
* This function is to check survey activity.
*
* @param int $activityId activity id.
- * @param int $activityTypeId activity type id.
+ * @internal param int $activityTypeId activity type id.
* @return boolean $isSurveyActivity true/false boolean.
* @static
*/
* This function retrive all response options of survey
*
* @param int $surveyId survey id.
- * @return $responseOptions an array of option values
- * @static
+ * @return array $responseOptions an array of option values@static
*/
static function getResponsesOptions($surveyId) {
$responseOptions = array();
/**
* This function return all voter links with respecting permissions
*
- * @return $url array of permissioned links
- * @static
+ * @param $surveyId
+ * @param bool $enclosedInUL
+ * @param string $extraULName
+ * @return array|string $url array of permissioned links@static
*/
static function buildPermissionLinks($surveyId, $enclosedInUL = FALSE, $extraULName = 'more') {
$menuLinks = array();
/**
* Function to build the petition profile form
*
+ * @param $id
+ * @param $name
+ * @param bool $viewOnly
+ *
* @return void
* @access public
*/
*
* @access public
*
+ * @param $form
+ *
* @return void
* @static
*/
* global validation rules for the form
*
* @param array $fields posted values of the form
- * @param array $errors list of errors to be posted back to the form
+ *
+ * @internal param array $errors list of errors to be posted back to the form
*
* @return void
* @static
* function to return relative path
* @todo make this a method of $config->userSystem (i.e. UF classes) rather than a static function
*
- * @param String $absPath absolute path
+ * @param $absolutePath
+ *
+ * @internal param String $absPath absolute path
*
* @return String $relativePath Relative url of uploaded image
*/
/**
* create related memberships for current employer
*
- * @param int $contactID contact id of the individual
- * @param int $employerID contact id of the organization.
- * @param array $relationshipParams relationship params.
- * @param boolean $duplicate are we triggered existing relationship.
+ * @param int $contactID contact id of the individual
+ * @param int $employerID contact id of the organization.
+ * @param array $relationshipParams relationship params.
+ * @param boolean $duplicate are we triggered existing relationship.
+ *
+ * @param null $previousEmpID
*
+ * @throws CiviCRM_API3_Exception
* @access public
* @static
*/
*
* @param $form object invoking Object
* @param $contactType string contact type
+ * @param $countryID
+ * @param $stateID
* @param $title string fieldset title
- * @param $maxLocationBlocks int number of location blocks
*
- * @static
+ * @internal param int $maxLocationBlocks number of location blocks
*
+ * @static
*/
static function buildOnBehalfForm(&$form, $contactType, $countryID, $stateID, $title) {
* Given an array of contact ids this function will return array with links to view contact page
*
* @param array $contactIDs associated contact id's
+ * @param bool $addViewLink
+ * @param bool $addEditLink
* @param int $originalId associated with the contact which is edited
*
*
/**
* This function retrieve component related contact information.
*
- * @param array $componentIds array of component Ids.
- * @param array $returnProperties array of return elements.
+ * @param array $componentIds array of component Ids.
+ * @param $componentName
+ * @param array $returnProperties array of return elements.
*
- * @return $contactDetails array of contact info.
- * @static
+ * @return array $contactDetails array of contact info.@static
*/
static function contactDetails($componentIds, $componentName, $returnProperties = array(
)) {
*
* @param array $addresses associated array of
*
- * @return $contactNames associated array of contact names
- * @static
+ * @return array $contactNames associated array of contact names@static
*/
static function getAddressShareContactNames(&$addresses) {
$contactNames = array();
*
* @param string $templateString the greeting template string with contact tokens + Smarty syntax
*
+ * @param $contactDetails
+ * @param $contactID
+ * @param $className
+ *
* @return void
* @static
*/
*
*
* @param array $params (reference ) an assoc array of name/value pairs
- * @param array $contactId contact id
+ * @param array $contactId contact id
+ *
+ * @param bool $visibility
+ * @param string $method
*
* @return void
* @access public
/**
* Given an array of contact ids, add all the contacts to the group
*
- * @param array $contactIds (reference ) the array of contact ids to be added
- * @param int $groupId the id of the group
+ * @param $contactIDs
+ * @param $groupID
+ * @param string $method
+ * @param string $status
+ * @param null $tracking
+ * @internal param array $contactIds (reference ) the array of contact ids to be added
+ * @internal param int $groupId the id of the group
*
* @return array (total, added, notAdded) count of contacts added to group
* @access public
*
* @param $groupIds An array of valid group ids (passed by reference)
*
- * @return $groupIdArray List of groupIds that represent the requested group and its ancestors
+ * @param bool $includeSelf
*
- * @access public
+ * @return array $groupIdArray List of groupIds that represent the requested group and its ancestors@access public
*/
static function getAncestorGroupIds($groupIds, $includeSelf = TRUE) {
if (!is_array($groupIds)) {
*
* @param $groupIds An array of valid group ids (passed by reference)
*
- * @return $groupArray List of ancestor groups
- *
- * @access public
+ * @param bool $includeSelf
+ * @return \An $groupArray List of ancestor groups@access public
*/
static function getAncestorGroups($groupIds, $includeSelf = TRUE) {
$groupIds = self::getAncestorGroupIds($groupIds, $includeSelf);
*
* @param $groupIds An array of valid group ids (passed by reference)
*
- * @return $groupIdArray List of groupIds that represent the requested group and its children
- *
- * @access public
+ * @return array $groupIdArray List of groupIds that represent the requested group and its children@access public
*/
static function getChildGroupIds($groupIds) {
if (!is_array($groupIds)) {
*
* @param $groupIds An array of valid group ids (passed by reference)
*
- * @return $groupIdArray List of groupIds that represent the requested group and its descendents
- *
- * @access public
+ * @param bool $includeSelf
+ * @return array $groupIdArray List of groupIds that represent the requested group and its descendents@access public
*/
static function getDescendentGroupIds($groupIds, $includeSelf = TRUE) {
if (!is_array($groupIds)) {
*
* @param $groupIds An array of valid group ids (passed by reference)
*
- * @return $groupArray List of descendent groups
- *
- * @access public
+ * @param bool $includeSelf
+ * @return \An $groupArray List of descendent groups@access public
*/
static function getDescendentGroups($groupIds, $includeSelf = TRUE) {
$groupIds = self::getDescendentGroupIds($groupIds, $includeSelf);
*
* @param $groupId The group id to get valid potential children for
*
- * @return $groupIdArray List of groupIds that represent the valid potential children of the group
- *
- * @access public
+ * @return array $groupIdArray List of groupIds that represent the valid potential children of the group@access public
*/
static function getPotentialChildGroupIds($groupId) {
$groups = CRM_Contact_BAO_Group::getGroups();
/**
* class constructor which also does all the work
*
- * @param array $params
- * @param array $returnProperties
- * @param array $fields
+ * @param array $params
+ * @param array $returnProperties
+ * @param array $fields
* @param boolean $includeContactIds
* @param boolean $strict
- * @param boolean $mode - mode the search is operating on
+ * @param bool|int $mode - mode the search is operating on
*
- * @return Object
- * @access public
+ * @param bool $skipPermission
+ * @param bool $searchDescendentGroups
+ * @param bool $smartGroupCache
+ * @param null $displayRelationshipType
+ * @param string $operator
+ *
+ * @return \CRM_Contact_BAO_Query
+ @access public
*/
function __construct(
$params = NULL, $returnProperties = NULL, $fields = NULL,
*
* @param int $id relationship id
*
+ * @param $action
+ *
* @return null
* @access public
-
* @static
*/
static function disableEnableRelationship($id, $action) {
/**
* this function does the validtion for valid relationship
*
- * @param array $params this array contains the values there are subitted by the form
- * @param array $ids the array that holds all the db ids
- * @param integer $contactId this is contact id for adding relationship
+ * @param array $params this array contains the values there are subitted by the form
+ * @param array $ids the array that holds all the db ids
+ * @param integer $contactId this is contact id for adding relationship
*
- * @return
- * @access public
+ * @return string
+ @access public
* @static
*/
static function checkValidRelationship(&$params, &$ids, $contactId) {
* Given the list of params in the params array, fetch the object
* and store the values in the values array
*
- * @param array $params input parameters to find object
- * @param array $values output values of the object
- * @param array $ids the array that holds all the db ids
+ * @param array $params input parameters to find object
+ * @param array $values output values of the object
+ * @internal param array $ids the array that holds all the db ids
*
* @return array (reference) the values that could be potentially assigned to smarty
* @access public
*
* @access private
*
+ * @param $form
+ *
* @return void
*/
static function custom(&$form) {
*
* @access public
*
+ * @param $form
+ *
* @return void
*/
static function postProcess(&$form) {
*
* @param CRM_Core_Session $store
*
+ * @param int $mode
+ *
* @return void
* @access public
*/
/**
* Export data to a CSV file
*
- * @param string $filename
+ * @param $fileName
* @param array $header
* @param data $data
*
+ * @internal param string $filename
* @return void
* @access public
*/
* @param int $onDuplicate the code for what action to take on duplicates
* @param array $values the array of values belonging to this line
*
+ * @param bool $doGeocodeAddress
+ *
* @return boolean the result of this processing
* @access public
*/
/**
* Check if there is a contribution with the same trxn_id or invoice_id
*
- * @param array $params (reference ) an assoc array of name/value pairs
- * @param array $duplicates (reference ) store ids of duplicate contribs
+ * @param $input
+ * @param array $duplicates (reference ) store ids of duplicate contribs
+ *
+ * @param null $id
*
+ * @internal param array $params (reference ) an assoc array of name/value pairs
* @return boolean true if duplicate, false otherwise
* @access public
* static
/**
* Function to send the emails for Recurring Contribution Notication
*
- * @param string $type txnType
- * @param int $contactID contact id for contributor
- * @param int $pageID contribution page id
- * @param object $recur object of recurring contribution table
- * @param object $autoRenewMembership is it a auto renew membership.
+ * @param string $type txnType
+ * @param int $contactID contact id for contributor
+ * @param int $pageID contribution page id
+ * @param object $recur object of recurring contribution table
+ * @param bool|object $autoRenewMembership is it a auto renew membership.
*
* @return void
* @access public
/**
* Function to add the custom fields for contribution page (ie profile)
*
- * @param int $gid uf group id
+ * @param int $gid uf group id
* @param string $name
- * @param int $cid contact id
- * @param array $params params to build component whereclause
+ * @param int $cid contact id
+ * @param $template
+ * @param array $params params to build component whereclause
+ *
+ * @param null $fieldTypes
*
* @return void
* @access public
/**
* Function to get info for all sections enable/disable.
*
+ * @param array $contribPageIds
* @return array $info info regarding all sections.
* @access public
* @static
/**
* global form rule
*
- * @param array $fields the input form values
- * @param array $files the uploaded files if any
- * @param array $options additional user data
+ * @param array $fields the input form values
+ * @param array $files the uploaded files if any
+ * @param $self
+ *
+ * @internal param array $options additional user data
*
* @return true if no errors, else array of errors
* @access public
/**
* global form rule
*
- * @param array $fields the input form values
- * @param array $files the uploaded files if any
- * @param array $options additional user data
+ * @param array $fields the input form values
+ * @param array $files the uploaded files if any
+ * @param $self
+ *
+ * @internal param array $options additional user data
*
* @return true if no errors, else array of errors
* @access public
*
* @access private
*
+ * @param $filename
+ * @param $resizedName
+ * @param $width
+ * @param $height
+ *
* @return Path to image
*/
private function _resizeImage($filename, $resizedName, $width, $height) {
*
* @param array $fields posted values of the form
*
+ * @param $files
+ * @param $self
+ *
* @return array list of errors to be posted back to the form
* @static
* @access public
*
* @param CRM_Core_Session $store
*
+ * @param int $mode
+ *
* @return void
* @access public
*/
/**
* Export data to a CSV file
*
- * @param string $filename
+ * @param $fileName
* @param array $header
* @param data $data
*
+ * @internal param string $filename
* @return void
* @access public
*/
/**
* Browse all contribution pages
*
+ * @param null $action
+ *
* @return void
* @access public
* @static
*
* @access public
*
+ * @param null $pageType
+ * @param null $id
+ *
* @return array - array reference of all pcp if any
* @static
*/
* @access public
* @static
*
+ * @param string $column
* @return array - array reference of all PCP activity statuses
*/
public static function &pcpStatus($column = 'label') {
* @access public
* @static
*
+ * @param $financialTypeId
+ * @param null $relationTypeId
* @return array - array reference of all financial accounts for a Financial type
*/
public static function financialAccountType($financialTypeId, $relationTypeId = NULL) {
*
* @access public
*
+ * @param null $id
* @return array - array reference of all batches if any
* @static
*/
/**
* Add the formatted address to $this-> display
*
- * @param NULL
+ * @param bool $microformat
+ *
+ * @internal param $NULL
*
* @return void
*
* @access public
- *
*/
function addDisplay($microformat = FALSE) {
$fields = array(
*
* @param int $id the contact id
*
+ * @param bool $updateBlankLocInfo
+ *
* @return array the array of adrress data
* @access public
* @static
/**
* Sort location array so primary element is first
- * @param Array $location
+ *
+ * @param $locations
+ *
+ * @internal param Array $location
*/
static function sortPrimaryFirst(&$locations){
uasort($locations, 'self::primaryComparison');
/**
* Return the field ids and names (with groups) for import purpose.
*
- * @param int $contactType Contact type
- * @param boolean $showAll If true returns all fields (includes disabled fields)
- * @param boolean $onlyParent return fields ONLY related to basic types
- * @param boolean $search when called from search and multiple records need to be returned
- * @param boolean $checkPermission if false, do not include permissioning clause
+ * @param int|string $contactType Contact type
+ * @param boolean $showAll If true returns all fields (includes disabled fields)
+ * @param boolean $onlyParent return fields ONLY related to basic types
+ * @param boolean $search when called from search and multiple records need to be returned
+ * @param boolean $checkPermission if false, do not include permissioning clause
+ *
+ * @param bool $withMultiple
*
* @return array $fields -
*
/**
* Get the field id from an import key
*
- * @param string $key The key to parse
+ * @param string $key The key to parse
*
+ * @param bool $all
* @return int|null The id (if exists)
* @access public
* @static
/**
* This function for building custom fields
*
- * @param CRM_Core_Form $qf form object (reference)
- * @param string $elementName name of the custom field
+ * @param CRM_Core_Form $qf form object (reference)
+ * @param string $elementName name of the custom field
+ * @param $fieldId
* @param boolean $inactiveNeeded
- * @param boolean $userRequired true if required else false
- * @param boolean $search true if used for search else false
- * @param string $label label for custom field
+ * @param bool $useRequired
+ * @param boolean $search true if used for search else false
+ * @param string $label label for custom field
*
+ * @internal param bool $userRequired true if required else false
* @access public
* @static
*/
* @param integer $entityID id of entity for whom we are checking data for
* @param string $table table that we are checking
*
+ * @param bool $getCount
+ *
* @return boolean does this entity have data in this custom table
*/
static public function customGroupDataExistsForEntity($entityID, $table, $getCount = FALSE){
*
* @array $params
*
+ * @param $params
+ *
+ * @throws Exception
* @return array
* @static
*/
*
* @array $params
*
+ * @param $params
+ *
+ * @throws Exception
* @return array
* @static
*/
/**
* Delete Dashlet
*
+ * @param $dashletID
+ *
* @return void
* @static
*/
/**
* Get Label Format field from associative array
*
- * @param string $field name of a label format field
- * @param array (reference) $values associative array of name/value pairs containing
+ * @param string $field name of a label format field
+ * @param array (reference) $values associative array of name/value pairs containing
* label format field selections
*
+ * @param null $default
+ *
* @return value
* @access public
* @static
/**
* Function to get log record count for a Contact
*
- * @param int $contactId Contact ID
+ * @param $contactID
+ *
+ * @internal param int $contactId Contact ID
*
* @return int $count count of log records
*
* function to delete all note related to contact when contact is deleted
*
* @param int $contactID contact id whose notes to be deleted
- * @param array $deleteNoteID to store all deleted note ids
+ *
+ * @internal param array $deleteNoteID to store all deleted note ids
*
* @return void
* @static
/**
* updates options values weights.
*
- * @param int $opGroupIde option group id.
- * @param array $opWeights options value , weight pair
+ * @param $opGroupId
+ * @param array $opWeights options value , weight pair
*
+ * @internal param int $opGroupIde option group id.
* @return void
* @access public
* @static
* _setItem() is the common logic shared by setItem() and setItems().
*
* @param array $params (required) An api formatted array of keys and values
+ * @param null $domains
+ *
+ * @throws api_Exception
* @domains array an array of domains to get settings for. Default is the current domain
* @return void
* @static
* @params string $name Name of specific setting e.g customCSSURL
* @params integer $componentID id of relevant component.
*
+ * @param null $componentID
+ * @param array $filters
+ * @param null $domainID
+ * @param null $profile
+ *
* @return array $result - the following information as appropriate for each setting
* - name
* - type
/**
* Function to get the tags that are not children of a tagset.
*
- * @return $tags associated array of tag name and id
- * @access public
+ * @return array $tags associated array of tag name and id@access public
* @static
*/
static function getTagsNotInTagset() {
/**
* check the data validity
*
- * @param int $userID the user id that we are actually editing
- * @param string $title the title of the group we are interested in
- * @pram boolean $register is this the registrtion form
- * @param int $action the action of the form
+ * @param int $userID the user id that we are actually editing
+ * @param string $title the title of the group we are interested in
+ * @param bool $register
+ * @param int $action the action of the form
*
+ * @pram boolean $register is this the registrtion form
* @return boolean true if form is valid
* @static
* @access public
/**
* get the html for the form that represents this particular group
*
- * @param int $userID the user id that we are actually editing
- * @param string $title the title of the group we are interested in
- * @param int $action the action of the form
- * @param boolean $register is this the registration form
- * @param boolean $reset should we reset the form?
- * @param int $profileID do we have the profile ID?
+ * @param int $userID the user id that we are actually editing
+ * @param string $title the title of the group we are interested in
+ * @param int $action the action of the form
+ * @param boolean $register is this the registration form
+ * @param boolean $reset should we reset the form?
+ * @param int $profileID do we have the profile ID?
+ *
+ * @param bool $doNotProcess
+ * @param null $ctype
*
* @return string the html for the form on success, otherwise empty string
* @static
* searches for a contact in the db with similar attributes
*
* @param array $params the list of values to be used in the where clause
- * @param int $id the current contact id (hence excluded from matching)
- * @param boolean $flatten should we flatten the input params
+ * @param int $id the current contact id (hence excluded from matching)
+ * @param string $contactType
+ *
+ * @internal param bool $flatten should we flatten the input params
*
* @return contact_id if found, null otherwise
* @access public
* Given a contact id and a field set, return the values from the db
* for this contact
*
- * @param int $id the contact id
- * @param array $fields the profile fields of interest
- * @param array $values the values for the above fields
- * @param boolean $searchable searchable or not
- * @param array $componentWhere component condition
- * @param boolean $absolute return urls in absolute form (useful when sending an email)
+ * @param $cid
+ * @param array $fields the profile fields of interest
+ * @param array $values the values for the above fields
+ * @param boolean $searchable searchable or not
+ * @param array $componentWhere component condition
+ * @param boolean $absolute return urls in absolute form (useful when sending an email)
+ *
+ * @param null $additionalWhereClause
*
+ * @internal param int $id the contact id
* @return void
* @access public
* @static
* Update the email value for the contact and user profile
*
* @param $contactId Int Contact ID of the user
- * @param $email String email to be modified for the user
+ * @param $emailAddress
+ *
+ * @internal param String $email email to be modified for the user
*
* @return void
* @access public
* see if this user exists, and if so, if they're allowed to login
*
*
+ * @param $openId
+ *
* @return bool true if allowed to login, false otherwise
* @access public
* @static
* add pages to the controller. Note that the controller does not really care
* the order in which the pages are added
*
- * @param object $stateMachine the state machine object
- * @param int $action the mode in which the state machine is operating
+ * @param object $stateMachine the state machine object
+ * @param \const|int $action the mode in which the state machine is operating
* typicaly this will be add/view/edit
*
* @return void
* @access public
- *
*/
function addPages(&$stateMachine, $action = CRM_Core_Action::NONE) {
$pages = $stateMachine->getPages();
* Returns an array containing template variables
*
* @param string $name
- * @param string $type
+ *
+ * @internal param string $type
* @return array
*/
function get_template_vars($name=null) {
*
* @param string $tableName
*
+ * @param int $maxTablesToCheck
+ * @param string $fieldName
+ *
* @return array
* @static
*/
/**
* Checks if CONSTRAINT keyword exists for a specified table.
*
- * @param string $tableName
+ * @param array $tables
+ *
+ * @throws Exception
+ * @internal param string $tableName
*
* @return boolean true if CONSTRAINT keyword exists, false otherwise
*/
*
* @param string $query query to be executed
*
+ * @param array $params
+ * @param bool $abort
+ * @param null $daoName
+ * @param bool $freeDAO
+ * @param bool $i18nRewrite
+ * @param bool $trapException
+ *
* @return Object CRM_Core_DAO object that holds the results of the query
* @static
* @access public
* Similar to the function debug. Only difference is
* in the formatting of the output.
*
- * @param string variable name
- * @param mixed reference to variables that we need a trace of
- * @param bool should we use print_r ? (else we use var_dump)
- * @param bool should we log or return the output
+ * @param $variable_name
+ * @param $variable
+ * @param bool $print
+ * @param bool $log
+ * @param string $comp variable name
+ *
+ * @internal param \reference $mixed to variables that we need a trace of
+ * @internal param \should $bool we use print_r ? (else we use var_dump)
+ * @internal param \should $bool we log or return the output
*
* @return string the generated output
*
/**
* display the error message on terminal
*
- * @param string message to be output
- * @param bool should we log or return the output
+ * @param $message
+ * @param bool $out should we log or return the output
*
+ * @param string $comp message to be output
* @return string format of the backtrace
*
* @access public
/**
* Set a status message in the session, then bounce back to the referrer.
*
- * @param string $status The status message to set
+ * @param string $status The status message to set
*
+ * @param null $redirect
+ * @param string $title
* @return void
* @access public
* @static
/**
* assign value to name in template
*
- * @param array|string $name name of variable
+ * @param $var
* @param mixed $value value of varaible
*
+ * @internal param array|string $name name of variable
* @return void
* @access public
*/
/**
* assign value to name in template by reference
*
- * @param array|string $name name of variable
+ * @param $var
* @param mixed $value value of varaible
*
+ * @internal param array|string $name name of variable
* @return void
* @access public
*/
* Returns an array containing template variables
*
* @param string $name
- * @param string $type
+ *
+ * @internal param string $type
* @return array
*/
function get_template_vars($name=null) {
* not messed up. Currently deletes the old group
*
* @param string $groupName the name of the option group - make sure there is no conflict
- * @param array $values the associative array that has information on the option values
+ * @param array $values the associative array that has information on the option values
* the keys of this array are:
* string 'title' (required)
* string 'value' (required)
* int 'weight' (optional) - the order in which the value are displayed
* bool 'is_default' (optional) - is this the default one to display when rendered in form
* bool 'is_active' (optional) - should this element be rendered
- * @param int $defaultID (reference) - the option value ID of the default element (if set) is returned else 'null'
- * @param string $groupLabel - the optional label of the option group else set to group name
+ * @param int $defaultID (reference) - the option value ID of the default element (if set) is returned else 'null'
+ * @param null $groupTitle
+ *
+ * @internal param string $groupLabel - the optional label of the option group else set to group name
*
* @access public
* @static
*
* @return int the option group ID
- *
*/
static function createAssoc($groupName, &$values, &$defaultID, $groupTitle = NULL) {
self::deleteAssoc($groupName);
/**
* build select query in case of option-values
*
+ * @param $query
+ *
* @return void
* @access public
*/
* @param string $transaction_id Transaction id generated by the gateway
* @param string $amount Purchase amount
*
+ * @param bool $ipn
+ *
* @return bool
*/
function checkMD5($responseMD5, $transaction_id, $amount, $ipn = FALSE) {
*
* @param string $field the field
*
+ * @param bool $xmlSafe
* @return mixed value of the field, or empty string if the field is
* not set
*/
* The date format for this field should typically be "M Y" (ex: Feb 2011) or "m Y" (02 2011)
* See CRM-9017
*
+ * @param $src
+ *
* @return int
* @static
*/
* The date format for this field should typically be "M Y" (ex: Feb 2011) or "m Y" (02 2011)
* This function exists only to make it consistant with getCreditCardExpirationMonth
*
+ * @param $src
+ *
* @return int
* @static
*/
*
* @param string $mode the mode of operation: live or test
*
+ * @param $component
+ * @param $paymentProcessor
+ *
* @return object
* @static
*/
/**
* The function returns the component(Event/Contribute..), given the google-order-no and merchant-private-data
*
- * @param xml $xml_response response send by google in xml format
- * @param array $privateData contains the name value pair of <merchant-private-data>
- * @param int $orderNo <order-total> send by google
- * @param string $root root of xml-response
+ * @param array $privateData contains the name value pair of <merchant-private-data>
+ * @param int $orderNo <order-total> send by google
+ * @param string $root root of xml-response
*
+ * @param $response
+ * @param $serial
+ * @internal param \xml $xml_response response send by google in xml format
* @return array context of this call (test, module, payment processor id)
* @static
*/
* @access public
* @static
*
- * @param boolean $name pseudoconstant to be flushed
- *
+ * @param bool|string $name pseudoconstant to be flushed
*/
public static function flush($name = 'cache') {
if (isset(self::$$name)) {
*
* The static array activityType is returned
*
- * @param boolean $all - get All Activity types - default is to get only active ones.
+ * @internal param bool $all - get All Activity types - default is to get only active ones.
*
* @access public
* @static
* @access public
* @static
*
- * @param int $id - Optional id to return
+ * @param bool|int $id - Optional id to return
*
- * @return array - array reference of all State/Provinces.
+ * @param bool $limit
*
+ * @return array - array reference of all State/Provinces.
*/
public static function &stateProvince($id = FALSE, $limit = TRUE) {
if (($id && !CRM_Utils_Array::value($id, self::$stateProvince)) || !self::$stateProvince || !$id) {
* @access public
* @static
*
- * @param int $id - Optional id to return
+ * @param bool|int $id - Optional id to return
+ *
+ * @param bool $limit
*
* @return array - array reference of all State/Province abbreviations.
*/
* @param $ext string, extension name; use 'civicrm' for core
* @param $file string, file path -- relative to the extension base dir
*
- * @return (string|bool), full file path or FALSE if not found
+ * @return bool|string (string|bool), full file path or FALSE if not found
*/
public function getPath($ext, $file) {
// TODO consider caching results
*
* @param $ext string, extension name; use 'civicrm' for core
* @param $file string, file path -- relative to the extension base dir
+ * @param bool $addCacheCode
+ *
* @return string, URL
*/
public function getUrl($ext, $file = NULL, $addCacheCode = FALSE) {
* TODO: Separate the functional code (like addStyle/addScript) from the policy code
* (like addCoreResources/addCoreStyles).
*
+ * @param string $region
* @return CRM_Core_Resources
* @access public
*/
/**
* function to retrieve rows.
*
+ * @param $form
+ *
* @return array of rows
* @access public
*/
/**
* function to get the information to map a event
*
- * @param array $ids the list of ids for which we want map info
+ * @param $id
+ *
+ * @internal param array $ids the list of ids for which we want map info
*
* @return null|string title of the event
* @static
* This function is to make a copy of a Event, including
* all the fields in the event Wizard
*
- * @param int $id the event id to copy
+ * @param int $id the event id to copy
* obj $newEvent object of CRM_Event_DAO_Event
* boolean $afterCreate call to copy after the create function
+ * @param null $newEvent
+ * @param bool $afterCreate
+ *
* @return void
* @access public
*/
/**
* Function to build the form
*
+ * @param $form
+ *
* @return void
* @access public
*/
/**
* Function to build Confirmation Block
*
- * @param int $pageId
+ * @param $form
+ *
+ * @internal param int $pageId
* @static
*/
function buildConfirmationBlock(&$form) {
/**
* Function to build Email Block
*
- * @param int $pageId
+ * @param $form
+ *
+ * @internal param int $pageId
* @static
*/
function buildMailBlock(&$form) {
/**
* global validation rules for the form
*
- * @param array $fields posted values of the form
+ * @param $values
+ * @param $files
+ * @param $form
+ *
+ * @internal param array $fields posted values of the form
*
* @return array list of errors to be posted back to the form
* @static
/**
* Collect all email fields for an array of profile ids
*
+ * @param $profileIds
* @return boolean
*/
static function getEmailFields($profileIds) {
/**
* Check if a profile contains required fields
*
+ * @param $profileIds
* @return boolean
*/
static function isProfileComplete($profileIds) {
/**
* Check if the profiles collect enough information to dedupe
*
+ * @param $profileIds
+ * @param int $rgId
* @return boolean
*/
/**
* global validation rules for the form
*
- * @param array $fields posted values of the form
+ * @param $values
+ * @param $files
+ * @param $self
+ *
+ * @internal param array $fields posted values of the form
*
* @return array list of errors to be posted back to the form
* @static
/**
* Function to handle process after the confirmation of payment by User
*
+ * @param null $contactID
+ * @param null $contribution
+ * @param null $payment
+ *
* @return void
* @access public
*/
/**
* check whether call current participant is last one
*
+ * @param bool $isButtonJs
+ *
* @return boolean ture on success.
* @access public
*/
if (empty($this->_values['event']['is_monetary'])) {
$js = array('onclick' => "return submitOnce(this,'" . $this->_name . "','" . ts('Processing') . "');");
}
-
+
// CRM-11182 - Optional confirmation screen
// Change button label depending on whether the next action is confirm or register
if (
} else {
$buttonLabel = ts('Continue >>');
}
-
+
$this->addButtons(array(
array(
'type' => 'upload',
// CRM-14492 Admin price fields should show up on event registration if user has 'administer CiviCRM' permissions
$adminFieldVisible = false;
if (CRM_Core_Permission::check('administer CiviCRM')) {
- $adminFieldVisible = true;
+ $adminFieldVisible = true;
}
foreach ($form->_feeBlock as $field) {
/**
* global form rule
*
- * @param array $fields the input form values
- * @param array $files the uploaded files if any
- * @param array $options additional user data
+ * @param array $fields the input form values
+ * @param array $files the uploaded files if any
+ * @param $self
+ *
+ * @internal param array $options additional user data
*
* @return true if no errors, else array of errors
* @access public
/**
* Export data to a CSV file
*
- * @param string $filename
+ * @param $fileName
* @param array $header
* @param data $data
*
+ * @internal param string $filename
* @return void
* @access public
*/
/**
* Find the $info and $typeManager for a $key
*
- * @return array (0 => CRM_Extension_Info, 1 => CRM_Extension_Manager_Interface)
+ * @param $key
+ *
* @throws CRM_Extension_Exception
+ * @return array (0 => CRM_Extension_Info, 1 => CRM_Extension_Manager_Interface)
*/
private function _getMissingInfoTypeHandler($key) {
$info = $this->createInfoFromDB($key);
* Auto-generate a place-holder for a missing extension using info from
* database.
*
+ * @param $key
* @return CRM_Extension_Info|NULL
*/
public function createInfoFromDB($key) {
/**
* Function to get grant record count for a Contact
*
- * @param int $contactId Contact ID
+ * @param $contactID
+ *
+ * @internal param int $contactId Contact ID
*
* @return int count of grant records
* @access public
/**
* Send the mailing
*
- * @param object $mailer A Mail object to send the messages
+ * @param object $mailer A Mail object to send the messages
+ *
+ * @param null $testParams
*
* @return void
* @access public
/**
* Get row count for the event selector
*
- * @param int $mailing_id ID of the mailing
- * @param int $job_id Optional ID of a job to filter on
- * @param boolean $is_distinct Group by queue ID?
+ * @param int $mailing_id ID of the mailing
+ * @param int $job_id Optional ID of a job to filter on
+ * @param boolean $is_distinct Group by queue ID?
+ *
+ * @param null $org_unsubscribe
*
* @return int Number of rows in result set
* @access public
/**
* Get rows for the event browser
*
- * @param int $mailing_id ID of the mailing
- * @param int $job_id optional ID of the job
- * @param boolean $is_distinct Group by queue id?
- * @param int $offset Offset
- * @param int $rowCount Number of rows
- * @param array $sort sort array
+ * @param int $mailing_id ID of the mailing
+ * @param int $job_id optional ID of the job
+ * @param boolean $is_distinct Group by queue id?
+ * @param int $offset Offset
+ * @param int $rowCount Number of rows
+ * @param array $sort sort array
*
+ * @param null $org_unsubscribe
* @return array Result set
* @access public
* @static
*
* @param array $params (ref.) an assoc array of name/value pairs
*
+ * @param $files
+ * @param $self
+ *
* @return mixed true or array of errors
* @access public
* @static
*
* @param array $params (ref.) an assoc array of name/value pairs
*
+ * @param $files
+ * @param $self
+ *
+ * @throws CiviCRM_API3_Exception
* @return mixed true or array of errors
* @access public
* @static
/**
* to calculate join, start and end dates
*
- * @param Array $calcDates array of dates returned by getDatesForMembershipType()
+ * @param Array $calcDates array of dates returned by getDatesForMembershipType()
*
- * @return Array formatted containing date values
+ * @param $formatted
*
- * @access public
+ * @return Array formatted containing date values
+ *
+ * @access public
*/
function formattedDates($calcDates, &$formatted) {
$dates = array(
$urlParams .= "&qfKey=$qfKey";
}
$form->assign('searchKey', $qfKey);
-
+
if ($searchContext) {
$url = CRM_Utils_System::url("civicrm/$searchContext/search", $urlParams);
}
/**
* Get action links
*
+ * @param string $status
+ * @param null $isPaymentProcessor
+ * @param null $accessContribution
+ * @param bool $isCancelSupported
+ * @param bool $isUpdateBilling
+ *
* @return array (reference) of action links
* @static
*/
* 1. when their PCP status is changed by site admin.
* 2. when supporter initially creates a Personal Campaign Page ($isInitial set to true).
*
- * @param int $pcpId campaign page id
- * @param int $newStatus pcp status id
- * @param int $isInitial is it the first time, campaign page has been created by the user
+ * @param int $pcpId campaign page id
+ * @param int $newStatus pcp status id
+ * @param bool|int $isInitial is it the first time, campaign page has been created by the user
*
+ * @param string $component
+ *
+ * @throws Exception
* @return null
* @access public
* @static
- *
*/
static function sendStatusUpdate($pcpId, $newStatus, $isInitial = FALSE, $component = 'contribute') {
$pcpStatus = CRM_Core_OptionGroup::values("pcp_status");
*
* @param int $id campaign page id
*
+ * @param $is_active
* @return null
* @access public
* @static
- *
*/
static function setDisable($id, $is_active) {
return CRM_Core_DAO::setFieldValue('CRM_PCP_DAO_PCP', $id, 'is_active', $is_active);
/**
* Function to get pcp block is active
*
- * @param int $id campaign page id
+ * @param $pcpId
+ * @param $component
+ * @internal param int $id campaign page id
*
* @return int
* @access public
* @static
- *
*/
static function getStatus($pcpId, $component) {
$query = "
/**
* Function to get pcp block is enabled for component page
*
- * @param int $id contribution page id
+ * @param $pageId
+ * @param $component
+ * @internal param int $id contribution page id
*
* @return String
* @access public
* @static
- *
*/
static function getPcpBlockStatus($pageId, $component) {
$query = "
/**
* Function to get pcp entity table given a component.
*
- * @param int $id campaign page id
+ * @param $component
+ *
+ * @internal param int $id campaign page id
*
* @return String
* @access public
* @static
- *
*/
static function getPcpEntityTable($component) {
$entity_table_map = array(
/**
* Function to get pledge record count for a Contact
*
- * @param int $contactId Contact ID
+ * @param $contactID
+ *
+ * @internal param int $contactId Contact ID
*
* @return int count of pledge records
* @access public
*
* @param int $pledgeID pledge id
*
+ * @param int $limit
+ *
* @return array associated array of pledge details
* @static
*/
/**
* global form rule
*
- * @param array $fields the input form values
- * @param array $files the uploaded files if any
- * @param array $options additional user data
+ * @param array $fields the input form values
+ * @param array $files the uploaded files if any
+ * @param $self
+ *
+ * @internal param array $options additional user data
*
* @return true if no errors, else array of errors
* @access public
* global validation rules for the form
*
* @param array $fields posted values of the form
- * @param array $errors list of errors to be posted back to the form
+ *
+ * @internal param array $errors list of errors to be posted back to the form
*
* @return void
* @static
/**
* Validate the priceset
*
- * @param int $priceSetId, array $fields
+ * @param int $priceSetId , array $fields
*
* retrun the error string
*
+ * @param $fields
+ * @param $error
+ * @param bool $allowNoneSelection
+ *
* @access public
* @static
- *
*/
public static function priceSetValidation($priceSetId, $fields, &$error, $allowNoneSelection = FALSE) {
*
* An array containing price set details (including price fields) is returned
*
- * @param int $setId - price set id whose details are needed
+ * @param $setID
+ * @param bool $required
+ * @param bool $validOnly
+ *
+ * @internal param int $setId - price set id whose details are needed
*
* @return array $setTree - array consisting of field details
*/
/**
* Setter for $_id
- * @param integer $id
+ *
+ * @param $instanceid
+ *
+ * @internal param int $id
*/
function setID($instanceid) {
$this->_id = $instanceid;
/**
* Setter for $_force
- * @param boolean $force
- */
+ * @param $isForce
+ * @internal param bool $force
+*/
function setForce($isForce) {
$this->_force = $isForce;
}
/**
* Validate the priceset
*
- * @param int $priceSetId, array $fields
+ * @param int $priceSetId , array $fields
*
* retrun the error string
*
+ * @param $fields
+ * @param $error
+ *
* @access public
* @static
- *
*/
public static function priceSetValidation($priceSetId, $fields, &$error) {
}
}
-/**
- * Function to set daefult the price set fields.
- *
- * @return array $defaults
- * @access public
- */
+ /**
+ * Function to set daefult the price set fields.
+ *
+ * @param $form
+ * @param $defaults
+ *
+ * @return array $defaults
+ * @access public
+ */
static function setDefaultPriceSet(&$form, &$defaults) {
if (!isset($form->_priceSet) || empty($form->_priceSet['fields'])) {
return $defaults;
}
/**
- * @param CRM_Core_DAO $object
* @param string $objectName business-entity/xml-tag name
+ * @param CRM_Core_DAO $object
+ * @param $mappedFields
+ *
* @return array
*/
function exportDAO($objectName, $object, $mappedFields) {
/**
* @param string $tagName
* @param array $keyValues
- * @param string $additional XML
+ * @throws Exception
+ * @internal param string $additional XML
* @return string XML
*/
public function renderKeyValueXML($tagName, $keyValues) {
/**
* @param string $entity
* @param string $action
+ * @param $version
+ *
* @return string
*/
protected function getFunctionName($entity, $action, $version) {
}
}
-}
\ No newline at end of file
+}
/**
* @param \Symfony\Component\EventDispatcher\EventDispatcher $dispatcher
+ * @param $magicFunctionProvider
+ *
* @return \Civi\API\Kernel
*/
public function createApiKernel($dispatcher, $magicFunctionProvider) {
* This function creates destination directory
*
* @param $dir directory name to be created
- * @param $peram mode for that directory
+ * @param int $perm
*
+ * @internal param \mode $peram for that directory
*/
function createDir($dir, $perm = 0755) {
if (!is_dir($dir)) {
/**
* Construct a SQL WHERE clause
*
+ * @param bool $includeContactIDs
+ *
* @return string, sql fragment with conditional expressions
*/
function where($includeContactIDs = FALSE) {
/**
* Run a series of cron jobs and make an assertion about email deliveries
*
- * @param $jobSchedule array specifying when to run cron and what messages to expect; each item is an array with keys:
+ * @param $cronRuns
+ *
+ * @internal param array $jobSchedule specifying when to run cron and what messages to expect; each item is an array with keys:
* - time: string, e.g. '2012-06-15 21:00:01'
* - recipients: array(array(string)), list of email addresses which should receive messages
*/
/**
* Generate a mock HTTP client with the expectation that it is called once.
*
+ * @param $response
+ *
* @return CRM_Utils_HttpClient|PHPUnit_Framework_MockObject_MockObject
*/
protected function expectOneHttpRequest($response) {
/**
* @param CRM_Utils_Cache_Interface $cache
* @param null $cacheKey
- * @param string $appendPathGarbage
+ *
+ * @internal param string $appendPathGarbage
* @return array(string $basedir, CRM_Extension_Container_Interface, CRM_Extension_Mapper)
*/
function _createMapper(CRM_Utils_Cache_Interface $cache = NULL, $cacheKey = NULL) {
}
/**
+ * @param $module
* @param array $counts expected hook invocation counts ($hookName => $count)
*/
function assertHookCounts($module, $counts) {
}
/**
- * @param $customGroupParams
- * @param $fieldParams
- * @param $expectedXmlFilePath
+ * @param $expectCustomGroup
+ * @param $expectCustomField
+ * @param $inputXmlFilePath
+ *
+ * @throws CRM_Core_Exception
+ * @internal param $customGroupParams
+ * @internal param $fieldParams
+ * @internal param $expectedXmlFilePath
* @dataProvider basicXmlTestCases
*/
function testBasicXMLImports($expectCustomGroup, $expectCustomField, $inputXmlFilePath) {
$this->assertEquals($expectValue, $customField[$expectKey]);
}
}
-}
\ No newline at end of file
+}
* Add listeners to $this->dispatcher which record each invocation of $monitoredEvents
* in $this->actualEventSequence.
*
- * @param EventDispatcher $this->dispatcher
* @param array $monitoredEvents list of event names
+ *
+ * @internal param \Symfony\Component\EventDispatcher\EventDispatcher $this ->dispatcher
*/
public function monitorEvents($monitoredEvents) {
foreach ($monitoredEvents as $monitoredEvent) {
}, 2 * Events::W_EARLY);
}
}
-}
\ No newline at end of file
+}
* of that class to decide how to set up the test.
*
* @param string $name
- * @param array $data
+ * @param array $data
* @param string $dataName
+ * @param array $browser
*/
function __construct($name = NULL, array$data = array(), $dataName = '', array$browser = array()) {
parent::__construct($name, $data, $dataName, $browser);
*
* @param string $fname contact’s first name
* @param string $lname contact’s last name
- * @param mixed $email contact’s email (when string) or random email (when true) or no email (when null)
+ * @param mixed $email contact’s email (when string) or random email (when true) or no email (when null)
+ *
+ * @param null $contactSubtype
*
* @return mixed either a string with the (either generated or provided) email or null (if no email)
*/
*
* @strings array array of strings or a single string
*
+ * @param $strings
* @return void
*/
function assertStringsPresent($strings) {
*
* @url string url to parse or retrieve current url if null
*
+ * @param null $url
* @return array returns an associative array containing any of the various components
* of the URL that are present. Querystring elements are returned in sub-array (elements.queryString)
* http://php.net/manual/en/function.parse-url.php
- *
*/
function parseURL($url = NULL) {
if (!$url) {
*
* @param string $processorName Name assigned to new processor
* @param string $processorType Name for processor type (e.g. PayPal, Dummy, etc.)
- * @param array $processorSettings Array of fieldname => value for required settings for the processor
+ * @param array $processorSettings Array of fieldname => value for required settings for the processor
*
+ * @param string $financialAccount
+ * @throws PHPUnit_Framework_AssertionFailedError
* @return void
*/
* Create new online contribution page w/ user specified params or defaults.
* FIXME: this function take an absurd number of params - very unwieldy :(
*
- * @param User can define pageTitle, hash and rand values for later data verification
+ * @param null $hash
+ * @param null $rand
+ * @param null $pageTitle
+ * @param array $processor
+ * @param bool $amountSection
+ * @param bool $payLater
+ * @param bool $onBehalf
+ * @param bool $pledges
+ * @param bool $recurring
+ * @param bool $membershipTypes
+ * @param null $memPriceSetId
+ * @param bool $friend
+ * @param int $profilePreId
+ * @param int $profilePostId
+ * @param bool $premiums
+ * @param bool $widget
+ * @param bool $pcp
+ * @param bool $isAddPaymentProcessor
+ * @param bool $isPcpApprovalNeeded
+ * @param bool $isSeparatePayment
+ * @param bool $honoreeSection
+ * @param bool $allowOtherAmmount
+ * @param bool $isConfirmEnabled
+ * @param string $financialType
+ * @param bool $fixedAmount
+ * @param bool $membershipsRequired
+ * @internal param \can $User define pageTitle, hash and rand values for later data verification
*
- * @return $pageId of newly created online contribution page.
+ * @return null $pageId of newly created online contribution page.
*/
function webtestAddContributionPage($hash = NULL,
$rand = NULL,
* Function to update default strict rule.
*
* @params string $contactType Contact type
- * @param array $fields Fields to be set for strict rule
- * @param Integer $threshold Rule's threshold value
+ * @param string $contactType
+ * @param array $fields Fields to be set for strict rule
+ * @param Integer $threshold Rule's threshold value
*/
function webtestStrictDedupeRuleDefault($contactType = 'Individual', $fields = array(), $threshold = 10) {
// set default strict rule.
$this->clickAt("//*[@class='select2-results']/li[1]/div");
}
else {
- if ($xpath)
+ if ($xpath)
$this->clickAt($fieldName);
else
$this->clickAt("//*[@id='$fieldName']/../div/a");
/**
* Add all test classes *Test and all test suites *Tests in subdirectories
*
- * @param &object Test suite object to add tests to
- * @param object Directory to scan
+ * @param PHPUnit_Framework_TestSuite $suite
+ * @param $myfile
+ * @param SplFileInfo $dirInfo
+ *
+ * @internal param $ &object Test suite object to add tests to
+ * @internal param \Directory $object to scan
* @return Test suite has been updated
*/
protected function addAllTests(PHPUnit_Framework_TestSuite & $suite,
/**
* check that api returned 'is_error' => 1
* else provide full message
+ *
* @param array $apiResult api result
* @param string $prefix extra test to add to message
+ * @param null $expectedError
*/
function assertAPIFailure($apiResult, $prefix = '', $expectedError = NULL) {
if (!empty($prefix)) {
/**
* check that api returned 'is_error' => 1
* else provide full message
- * @param array $apiResult api result
+ * @param $result
+ * @param $expected
+ * @param array $valuesToExclude
* @param string $prefix extra test to add to message
+ * @internal param array $apiResult api result
*/
function assertAPIArrayComparison($result, $expected, $valuesToExclude = array(), $prefix = '') {
$valuesToExclude = array_merge($valuesToExclude, array('debug', 'xdebug', 'sequential'));
}
return $result;
}
+
/**
* This function exists to wrap api getValue function & check the result
* so we can ensure they succeed & throw exceptions without litterering the test with checks
* There is a type check in this
* @param string $entity
* @param array $params
- * @param string $type - per http://php.net/manual/en/function.gettype.php possible types
+ * @param null $count
+ * @throws Exception
+ * @return array|int
+ * @internal param string $type - per http://php.net/manual/en/function.gettype.php possible types
* - boolean
* - integer
* - double
* @param string $action
* @param array $params
* @param string $expectedErrorMessage error
+ * @param null $extraOutput
+ * @return array|int
*/
function callAPIFailure($entity, $action, $params, $expectedErrorMessage = NULL, $extraOutput = NULL) {
if (is_array($params)) {
/**
* Function to delete Membership Type
*
- * @param int $membershipTypeID
+ * @param $params
+ * @internal param int $membershipTypeID
*/
function membershipTypeDelete($params) {
$result = $this->callAPISuccess('MembershipType', 'Delete', $params);
/**
* Function to create contribution page
*
+ * @param $params
* @return object of contribution page
*/
function contributionPageCreate($params) {
/**
* Function to create Tag
*
+ * @param array $params
* @return array result of created tag
*/
function tagCreate($params = array()) {
/**
* Function to delete contribution
*
- * @param int $contributionId
+ * @param $pledgeId
+ * @internal param int $contributionId
*/
function pledgeDelete($pledgeId) {
$params = array(
/**
* Function to create contribution
*
- * @param int $cID contact_id
- * @param int $cTypeID id of financial type
+ * @param int $cID contact_id
+ * @param int $cTypeID id of financial type
*
+ * @param int $invoiceID
+ * @param int $trxnID
+ * @param int $paymentInstrumentID
+ * @param bool $isFee
* @return int id of created contribution
*/
function contributionCreate($cID, $cTypeID = 1, $invoiceID = 67890, $trxnID = 12345, $paymentInstrumentID = 1, $isFee = TRUE) {
/**
* Function to create online contribution
*
- * @param int $financialType id of financial type
+ * @param $params
+ * @param int $financialType id of financial type
*
+ * @param int $invoiceID
+ * @param int $trxnID
* @return int id of created contribution
*/
function onlineContributionCreate($params, $financialType, $invoiceID = 67890, $trxnID = 12345) {
/**
* Function to create participant payment
*
+ * @param $participantID
+ * @param null $contributionID
* @return int $id of created payment
*/
function participantPaymentCreate($participantID, $contributionID = NULL) {
/**
* Function to add a Location
*
+ * @param $contactID
* @return int location id of created location
*/
function locationAdd($contactID) {
/**
* Function to add a Location Type
*
+ * @param null $params
* @return int location id of created location
*/
function locationTypeCreate($params = NULL) {
*
* @params array to add group
*
+ * @param array $params
* @return int groupId of created group
- *
*/
function groupCreate($params = array()) {
$params = array_merge(array(
/**
* Function to delete a Group
*
- * @param int $id
+ * @param $gid
+ * @internal param int $id
*/
function groupDelete($gid) {
), $params);
$this->callAPISuccess('uf_field', 'create', $params);
}
+
/**
* Function to add a UF Join Entry
*
+ * @param null $params
* @return int $id of created UF Join
*/
function ufjoinCreate($params = NULL) {
/**
* Function to delete Group for a contact
*
- * @param array $params
+ * @param $contactId
+ * @internal param array $params
*/
function contactGroupDelete($contactId) {
$params = array(
/**
* Function to create Activity
*
- * @param int $contactId
+ * @param null $params
+ * @return array|int
+ * @internal param int $contactId
*/
function activityCreate($params = NULL) {
/**
* Function to create custom group
*
- * @param string $className
- * @param string $title name of custom group
+ * @param array $params
+ * @return array|int
+ * @internal param string $className
+ * @internal param string $title name of custom group
*/
function customGroupCreate($params = array()) {
$defaults = array(
* participant:testCreateWithCustom for how to use this
*
* @param string $function __FUNCTION__
- * @param string $file __FILE__
+ * @param $filename
+ * @internal param string $file __FILE__
*
* @return array $ids ids of created objects
- *
*/
function entityCustomGroupWithSingleFieldCreate($function, $filename) {
$params = array('title' => $function);
* Function to create custom field
*
* @param array $params (custom_group_id) is required
- * @param string $name name of custom field
- * @param int $apiversion API version to use
+ * @return array|int
+ * @internal param string $name name of custom field
+ * @internal param int $apiversion API version to use
*/
function customFieldCreate($params) {
$params = array_merge(array(
*
* @params array $params name-value pair for an event
*
+ * @param $cId
* @return array $note
*/
function noteCreate($cId) {
/**
* Tidy up examples array so that fields that change often ..don't
* and debug related fields are unset
- * @param array $params
+ *
+ * @param $result
+ *
+ * @internal param array $params
*/
function tidyExampleResult(&$result){
if(!is_array($result)) {
/**
* Generate a temporary folder
*
- * @return $string
+ * @param string $prefix
+ * @return string $string
*/
function createTempDir($prefix = 'test-') {
$tempDir = CRM_Utils_File::tempdir($prefix);
* Helper function to create
* a contact
*
- * @return $contactID id of created contact
+ * @param $params
+ *
+ * @return int $contactID id of created contact
*/
static function create($params) {
require_once "CRM/Contact/BAO/Contact.php";
* Helper function to create
* a contact of type Individual
*
- * @return $contactID id of created Individual
+ * @param null $params
+ * @return int $contactID id of created Individual
*/
static function createIndividual($params = NULL) {
//compose the params, when not passed
* Helper function to create
* a contact of type Household
*
- * @return $contactID id of created Household
+ * @param null $params
+ * @return mixed $contactID id of created Household
*/
static function createHousehold($params = NULL) {
//compose the params, when not passed
* Helper function to create
* a contact of type Organisation
*
- * @return $contactID id of created Organisation
+ * @param null $params
+ * @return mixed $contactID id of created Organisation
*/
static function createOrganisation($params = NULL) {
//compose the params, when not passed
* Helper function to create
* a Contribution Page
*
- * @return $contributionPage id of created Contribution Page
+ * @param null $id
+ *
+ * @return mixed $contributionPage id of created Contribution Page
*/
static function create($id = NULL) {
require_once "CRM/Contribute/BAO/ContributionPage.php";
* Helper function to create Custom Group
*
* @deprecated - use functions on test case parent class
+ *
+ * @param $group
+ * @param null $extends
+ * @param bool $isMultiple
+ *
* @return object of created group
*/
static function createGroup($group, $extends = NULL, $isMultiple = FALSE) {
/**
* Helper function to create Custom Field
* @deprecated use parent object create fn
+ * @param $params
+ * @param null $fields
* @return object of created field
- */
+*/
static function createField($params, $fields = NULL) {
if (empty($params)) {
$params = array(
* Helper function to create
* an Event
*
- * @return $event id of created Event
+ * @param $contactId
+ *
+ * @return mixed $event id of created Event
*/
static function create($contactId) {
require_once "CRM/Event/BAO/Event.php";
/**
* Helper function to delete an Event
*
- * @param int $eventID id of the event to delete
+ * @param $eventId
+ * @internal param int $eventID id of the event to delete
* @return boolean true if event deleted, false otherwise
- *
*/
static function delete($eventId) {
return CRM_Event_BAO_Event::del($eventId);
/**
* Helper function to create a Participant
*
- * @return $participant id of created Participant
+ * @param $contactId
+ * @param $eventId
+ *
+ * @return mixed $participant id of created Participant
*/
static function create($contactId, $eventId) {
$params = array(
/**
* Helper function to delete a participant
*
- * @param int $participantID id of the participant to delete
+ * @param $participantId
+ * @internal param int $participantID id of the participant to delete
* @return boolean true if participant deleted, false otherwise
*/
static function delete($participantId) {
* Helper function to create
* a payment processor of type Paypal Pro
*
- * @return $paymentProcessor id of created payment processor
- * @todo this appears not to be working but because it doesn't extend the test class
+ * @return int $paymentProcessor id of created payment processor@todo this appears not to be working but because it doesn't extend the test class
* callAPISuccess won't work
* I have duplicated this on the main test class as a work around
*/
* Click on an inline-edit block and wait for it to open
*
* @param $block string selector
+ * @param bool $wait
*/
private function openInlineForm($block, $wait = TRUE) {
$this->mouseDown($block);
*
* @param $block string selector
* @param $params array
- * @param $valid str: submit behavior
+ * @param \str|string $valid str: submit behavior
* 'error' if we are expecting a form validation error,
* 're_open' (default) after saving, opens the form and validate inputs
* 'keep_open' same as 're_open' but doesn't automatically cancel at the end
* @params sting $fileName file name to be download.
* @params string $downloadDir download dir.
*
+ * @param $selector
+ * @param string $fileName
+ * @param string $downloadDir
+ *
* @return string downloaded file path.
*/
function downloadCSV($selector, $fileName = 'CiviCRM_Contact_Search.csv', $downloadDir = '/tmp') {
* ReflectionClass of the Test class and checks the constructor
* of that class to decide how to set up the test.
*
- * @param string $name
- * @param array $data
- * @param string $dataName
+ * @param string $name
+ * @param array $data
+ * @param string $dataName
+ * @param array $browser
*/
function __construct($name = NULL, array$data = array(
), $dataName = '', array$browser = array()) {
*
* @param $all boolean true if auctions all are required else returns current and future auctions
*
+ * @param bool $id
+ *
+ * @return array
* @static
*/
static
/**
* Function to check if email is enabled for a given profile
*
- * @param int $id profile id
+ * @param $profileId
+ *
+ * @internal param int $id profile id
*
* @return boolean
* @access public
* @static
- *
*/
static
function isEmailInProfile($profileId) {
/**
* global form rule
*
- * @param array $fields the input form values
- * @param array $files the uploaded files if any
- * @param array $options additional user data
+ * @param array $fields the input form values
+ * @param array $files the uploaded files if any
+ * @param $self
+ *
+ * @internal param array $options additional user data
*
* @return true if no errors, else array of errors
* @access public
/**
* global form rule
*
- * @param array $fields the input form values
- * @param array $files the uploaded files if any
- * @param array $options additional user data
+ * @param array $fields the input form values
+ * @param array $files the uploaded files if any
+ * @param $self
+ *
+ * @internal param array $options additional user data
*
* @return true if no errors, else array of errors
* @access public
/**
* global form rule
*
- * @param array $fields the input form values
- * @param array $files the uploaded files if any
- * @param array $options additional user data
+ * @param array $fields the input form values
+ * @param array $files the uploaded files if any
+ * @param $self
+ *
+ * @internal param array $options additional user data
*
* @return true if no errors, else array of errors
* @access public
/**
* class constructor
*
- * @param object CRM_Auction_Controller
- * @param int $action
+ * @param object $controller
+ * @param \const|int $action
*
- * @return object CRM_Contact_Import_StateMachine
+ * @internal param \CRM_Auction_Controller $object
+ * @return \CRM_Auction_StateMachine_Item CRM_Contact_Import_StateMachine
*/
function __construct($controller, $action = CRM_Core_Action::NONE) {
parent::__construct($controller, $action);
*
* @access public
*
+ * @param null $id
+ *
* @return array - array reference of all $pseudoConst values
*/
public static function &pseudoConst($id = NULL) {
/**
* Determine if a version is valid
*
+ * @param $ver
+ *
* @return bool
*/
function ccrm_extensionvalidation_version_isValid($ver) {
* Normalize version, producing a code that can be correclty
* sorted in SQL.
*
+ * @param $ver
* @return string
*/
function ccrm_extensionvalidation_version_normalize($ver) {
* - Explode into numeric and alphabetic parts
* - Make numerals higher than alphas (1.2.0 > 1.2.alpha)
*
+ * @param $ver
+ * @param $pad
* @return array of version parts
*/
function ccrm_extensionvalidation_version_split($ver, $pad = CCRM_EXTENSIONVALIDATION_PAD) {
} else {
$newCharType = 'ALPHA';
}
-
+
// printf("ver=[%s] state=%-5s newCharType=%-5s char=[%s] parts=[%-12s] buf=[%s]\n", $ver, $state, $newCharType, $ver{$i}, implode('/', $parts), $buf);
switch ($state) {
case 'NEW':
break;
}
}
-
+
$codes = array(
'alpha' => 'pre010',
'beta' => 'pre020',
* @parm $entityAliases array($niceName => $sqlIdExpression) list of entities
* which are (mentally) part of the query -- and the SQL expressions which
* identify them
+ * @param $entityAliases
+ *
+ * @return \ExtdirQueryHelper
*/
function create($query, $entityAliases) {
return new ExtdirQueryHelper($query, $entityAliases);
}
/**
+ *
+ * @param int $permission
*
* @return NULL|integer $groupID
*/
*
* @param string $mode the mode of operation: live or test
*
- * @return void
- */ function __construct($mode, &$paymentProcessor) {
+ * @param $paymentProcessor
+ *
+ * @return \org_civicrm_payment_googlecheckout
+ */
+ function __construct($mode, &$paymentProcessor) {
$this->_mode = $mode;
$this->_paymentProcessor = $paymentProcessor;
$this->_processorName = ts('Google Checkout');
*
* @param string $mode the mode of operation: live or test
*
+ * @param object $paymentProcessor
* @return object
* @static
- *
*/
static
function &singleton($mode, &$paymentProcessor) {
/**
* Sets appropriate parameters for checking out to google
*
- * @param array $params name value pair of contribution datat
+ * @param array $params name value pair of contribution datat
*
+ * @param $component
+ * @throws Exception
* @return void
* @access public
- *
*/
function doTransferCheckout(&$params, $component) {
$component = strtolower($component);
*
* @param string $mode the mode of operation: live or test
*
- * @return void
+ * @param $paymentProcessor
+ *
+ * @return \org_civicrm_payment_googlecheckout_GoogleIPN
*/
function __construct($mode, &$paymentProcessor) {
parent::__construct();
/**
* The function gets called when a new order takes place.
*
- * @param xml $dataRoot response send by google in xml format
+ * @param xml $dataRoot response send by google in xml format
* @param array $privateData contains the name value pair of <merchant-private-data>
*
+ * @param $component
* @return void
- *
*/
function newOrderNotify($dataRoot, $privateData, $component) {
$ids = $input = $params = array();
/**
* The function gets called when the state(CHARGED, CANCELLED..) changes for an order
*
- * @param string $status status of the transaction send by google
- * @param array $privateData contains the name value pair of <merchant-private-data>
+ * @param string $status status of the transaction send by google
+ * @param $dataRoot
+ * @param $component
+ * @internal param array $privateData contains the name value pair of <merchant-private-data>
*
* @return void
- *
*/
function orderStateChange($status, $dataRoot, $component) {
$input = $objects = $ids = array();
*
* @param string $mode the mode of operation: live or test
*
+ * @param $component
+ * @param $paymentProcessor
* @return object
* @static
*/
*
* Create and auth a Clickatell session.
*
- * @return void
+ * @param array $provider
+ * @param bool $skipAuth
+ *
+ * @return \org_civicrm_sms_clickatell
*/
function __construct($provider = array( ), $skipAuth = FALSE) {
// initialize vars
/**
* singleton function used to manage this object
*
+ * @param array $providerParams
+ * @param bool $force
* @return object
* @static
- *
*/
static function &singleton($providerParams = array(
), $force = FALSE) {
/**
* Send an SMS Message via the Clickatell API Server
*
- * @param array the message with a to/from/text
+ * @param $recipients
+ * @param $header
+ * @param $message
+ * @param null $jobID
+ * @param null $userID
+ * @internal param \the $array message with a to/from/text
*
* @return mixed true on sucess or PEAR_Error object
* @access public
// Save to entities table
$entities = array(
'Activity', 'Case', 'Contact', 'Contribution', 'ContributionPage',
- 'ContributionProduct', 'Discount', 'Event', 'Friend', 'Grant', 'Mailing', 'Membership',
+ 'ContributionProduct', 'Discount', 'Event', 'Friend', 'Grant', 'Mailing', 'Membership',
'MembershipBlock', 'Participant', 'Pledge', 'PledgeBlock', 'PriceSetEntity',
'Relationship', 'UFGroup', 'Widget',
);
/**
* Insert the child records
- * @param table: table name
- * @param id: primary record id
+ *
+ * @param $table
+ * @param $data
+ * @param $id
+ *
+ * @internal param $table : table name
+ * @internal param $id : primary record id
*/
function insert_children($table, $data, $id) {
global $link;