Commit 77b97be7 authored by Eileen McNaughton's avatar Eileen McNaughton

mass update of comment blocks

parent 0ae89576
......@@ -83,13 +83,14 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
/**
* Construct a WHERE clause to handle permissions to $object_*
*
* @param array ref $tables - Any tables that may be needed in the FROM
* @param $tables
* @param string $operation - The operation being attempted
* @param string $object_table - The table of the object in question
* @param int $object_id - The ID of the object in question
* @param int $acl_id - If it's a grant/revoke operation, the ACL ID
* @param int $object_id - The ID of the object in question
* @param int $acl_id - If it's a grant/revoke operation, the ACL ID
* @param boolean $acl_role - For grant operations, this flag determines if we're granting a single acl (false) or an entire group.
*
* @internal param \ref $array $tables - Any tables that may be needed in the FROM
* @return string - The WHERE clause, or 0 on failure
* @access public
* @static
......@@ -319,11 +320,13 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
* Given a table and id pair, return the filter clause
*
* @param string $table - The table owning the object
* @param int $id - The ID of the object
* @param array ref $tables - Tables that will be needed in the FROM
* @param int $id - The ID of the object
* @param $tables
*
* @internal param \ref $array $tables - Tables that will be needed in the FROM
*
* @return string|null - WHERE-style clause to filter results,
or null if $table or $id is null
* or null if $table or $id is null
* @access public
* @static
*/
......
......@@ -271,6 +271,8 @@ ORDER BY entity_id
/**
* Get user context.
*
* @param null $mode
*
* @return string user context.
*/
function userContext($mode = NULL) {
......
......@@ -208,6 +208,8 @@ ORDER BY entity_id
/**
* Get user context.
*
* @param null $mode
*
* @return string user context.
*/
function userContext($mode = NULL) {
......
......@@ -215,6 +215,8 @@ class CRM_ACL_Page_EntityRole extends CRM_Core_Page_Basic {
/**
* Get user context.
*
* @param null $mode
*
* @return string user context.
*/
function userContext($mode = NULL) {
......
......@@ -1483,9 +1483,13 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
/**
* send the sms message to a specific contact
*
* @param int $toID the contact id of the recipient
* @param int $activityID the activity ID that tracks the message
* @param array $smsParams the params used for sending sms
* @param int $toID the contact id of the recipient
* @param $tokenText
* @param $tokenHtml
* @param array $smsParams the params used for sending sms
*
* @param int $activityID the activity ID that tracks the message
* @param null $userID
*
* @return mixed true on success or PEAR_Error object
* @access public
......@@ -1555,13 +1559,20 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
/**
* send the message to a specific contact
*
* @param string $from the name and email of the sender
* @param int $toID the contact id of the recipient
* @param string $subject the subject of the message
* @param string $message the message contents
* @param string $from the name and email of the sender
* @param $fromID
* @param int $toID the contact id of the recipient
* @param string $subject the subject of the message
* @param $text_message
* @param $html_message
* @param string $emailAddress use this 'to' email address instead of the default Primary address
* @param int $activityID the activity ID that tracks the message
* @param int $activityID the activity ID that tracks the message
*
* @param null $attachments
* @param null $cc
* @param null $bcc
*
* @internal param string $message the message contents
* @return boolean true if successfull else false.
* @access public
* @static
......@@ -1903,7 +1914,9 @@ SELECT display_name
/**
* Function to get total count of prior revision of currently viewd activity
*
* @param int $activityId current activity id
* @param $activityID
*
* @internal param int $activityId current activity id
*
* @return int $params count of prior activities otherwise false.
* @access public
......@@ -1941,7 +1954,10 @@ AND id < {$activityID}
* Function to get all prior activities of currently viewe
* d activity
*
* @param int $activityId current activity id
* @param $activityID
* @param bool $onlyPriorRevisions
*
* @internal param int $activityId current activity id
*
* @return array $result prior activities info.
* @access public
......@@ -1990,7 +2006,9 @@ AND cl.modified_id = c.id
/**
* Function to find the latest revision of a given activity
*
* @param int $activityId prior activity id
* @param $activityID
*
* @internal param int $activityId prior activity id
*
* @return int $params current activity id.
* @access public
......@@ -2024,7 +2042,11 @@ AND cl.modified_id = c.id
*
* @activityId int activity id of parent activity
*
* @param array $activity details
* @param $activityId
* @param $params
*
* @return $this|null|object
* @internal param array $activity details
*
* @access public
*/
......@@ -2061,7 +2083,9 @@ AND cl.modified_id = c.id
/**
* Function to get Activity specific File according activity type Id.
*
* @param int $activityTypeId activity id
* @param int $activityTypeId activity id
*
* @param string $crmDir
*
* @return if file exists returns $activityTypeFile activity filename otherwise false.
*
......
......@@ -109,12 +109,14 @@ AND contact_a.is_deleted = 0
/**
* function to retrieve id of target contact by activity_id
*
* @param int $id ID of the activity
* @param $activityID
* @param $recordTypeID
*
* @internal param int $id ID of the activity
*
* @return mixed
*
* @access public
*
*/
static function retrieveContactIdsByActivityId($activityID, $recordTypeID) {
$activityContact = array();
......
......@@ -38,6 +38,8 @@ class CRM_Activity_BAO_Query {
/**
* build select for Case
*
* @param $query
*
* @return void
* @access public
*/
......@@ -194,7 +196,7 @@ class CRM_Activity_BAO_Query {
//get the component activity types.
$compActTypes = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE, TRUE);
$activityTypeIds = self::buildWhereAndQill($query, $value, $types, $op, $grouping, array('Activity Type', 'civicrm_activity.activity_type_id'));
foreach ($activityTypeIds as $activityTypeId) {
if (array_key_exists($activityTypeId, $compActTypes)) {
CRM_Contact_BAO_Query::$_considerCompActivities = TRUE;
......@@ -248,7 +250,7 @@ class CRM_Activity_BAO_Query {
case 'activity_status':
$status = CRM_Core_PseudoConstant::activityStatus();
$activityTypeIds = self::buildWhereAndQill($query, $value, $status, $op, $grouping, array('Activity Status', 'civicrm_activity.status_id'));
break;
......@@ -523,7 +525,7 @@ class CRM_Activity_BAO_Query {
);
}
}
$form->assign('buildEngagementLevel', $buildEngagementLevel);
$form->assign('buildSurveyResult', $buildSurveyResult);
$form->setDefaults(array('activity_test' => 0));
......@@ -567,17 +569,17 @@ class CRM_Activity_BAO_Query {
return $properties;
}
static function buildWhereAndQill(&$query, $value, $pseudoconstantType, $op, $grouping, $params) {
$matches = $val = $clause = array();
if (is_array($value)) {
foreach ($value as $k => $v) {
if ($k) {
$val[] = $k;
}
}
if (count($val) > 0) {
// Overwrite $op so it works with an IN where statement.
$op = 'IN';
......@@ -594,7 +596,7 @@ class CRM_Activity_BAO_Query {
foreach ($matches[0] as $qill) {
$clause[] = CRM_Utils_Array::value($qill, $pseudoconstantType);
}
$query->_qill[$grouping][] = ts($params[0] . ' %1 ', array(1 => $op)) . implode(' ' . ts('or') . ' ', $clause);
$query->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause($params[1],
$op, $value, "Integer"
......
......@@ -955,6 +955,8 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
* Process activity creation
*
* @param array $params associated array of submitted values
*
* @return $this|null|object
* @access protected
*/
protected function processActivity(&$params) {
......@@ -1050,7 +1052,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
$mailStatus .= ts("A copy of the activity has also been sent to assignee contacts(s).");
}
}
// Also send email to follow-up activity assignees if set
if ($followupActivity) {
$mailToFollowupContacts = array();
......
......@@ -366,10 +366,11 @@ abstract class CRM_Activity_Import_Parser extends CRM_Import_Parser {
/**
* 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
*/
......
......@@ -95,11 +95,17 @@ class CRM_Activity_Selector_Activity extends CRM_Core_Selector_Base implements C
*
* - View
*
* @param string $activityType type of activity
* @param $activityTypeId
* @param null $sourceRecordId
* @param bool $accessMailingReport
* @param null $activityId
* @param null $key
* @param null $compContext
*
* @internal param string $activityType type of activity
*
* @return array
* @access public
*
*/
public static function actionLinks($activityTypeId,
$sourceRecordId = NULL,
......
......@@ -67,7 +67,10 @@ class CRM_Admin_Form_CaseType extends CRM_Admin_Form {
/**
* global form rule
*
* @param array $fields the input form values
* @param array $fields the input form values
*
* @param $files
* @param $self
*
* @return true if no errors, else array of errors
* @access public
......
......@@ -83,7 +83,10 @@ class CRM_Admin_Form_ContactType extends CRM_Admin_Form {
/**
* global form rule
*
* @param array $fields the input form values
* @param array $fields the input form values
*
* @param $files
* @param $self
*
* @return true if no errors, else array of errors
* @access public
......
......@@ -64,6 +64,8 @@ class CRM_Admin_Form_Job extends CRM_Admin_Form {
/**
* Function to build the form
*
* @param bool $check
*
* @return void
* @access public
*/
......
......@@ -349,6 +349,10 @@ class CRM_Admin_Form_PaymentProcessor extends CRM_Admin_Form {
/**
* Save a payment processor
*
* @param $values
* @param $domainID
* @param $test
*
* @return Void
*/
function updatePaymentProcessor(&$values, $domainID, $test) {
......
......@@ -50,6 +50,8 @@ class CRM_Admin_Page_APIDoc extends CRM_Core_Page {
/**
* Get user context.
*
* @param null $mode
*
* @return string user context.
*/
function userContext($mode = NULL) {
......
......@@ -208,6 +208,8 @@ class CRM_Admin_Page_Job extends CRM_Core_Page_Basic {
/**
* Get user context.
*
* @param null $mode
*
* @return string user context.
*/
function userContext($mode = NULL) {
......
......@@ -208,6 +208,8 @@ class CRM_Admin_Page_MessageTemplates extends CRM_Core_Page_Basic {
/**
* Get user context.
*
* @param null $mode
*
* @return string user context.
*/
function userContext($mode = NULL) {
......@@ -217,7 +219,7 @@ class CRM_Admin_Page_MessageTemplates extends CRM_Core_Page_Basic {
/**
* browse all entities.
*
* @param int $action
* @internal param int $action
*
* @return void
* @access public
......
......@@ -116,6 +116,8 @@ class CRM_Admin_Page_PaymentProcessor extends CRM_Core_Page_Basic {
/**
* Browse all payment processors.
*
* @param null $action
*
* @return void
* @access public
* @static
......
......@@ -116,6 +116,8 @@ class CRM_Admin_Page_ScheduleReminders extends CRM_Core_Page_Basic {
/**
* Get user context.
*
* @param null $mode
*
* @return string user context.
*/
function userContext($mode = NULL) {
......
......@@ -82,7 +82,8 @@ class CRM_Badge_BAO_Layout extends CRM_Core_DAO_PrintLabel {
* Function to add a name label
*
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
*
* @internal param array $ids reference array contains the id
*
* @access public
* @static
......
......@@ -83,6 +83,8 @@ class CRM_Batch_Page_Batch extends CRM_Core_Page_Basic {
/**
* Get user context.
*
* @param null $mode
*
* @return string user context.
*/
function userContext($mode = NULL) {
......@@ -92,7 +94,7 @@ class CRM_Batch_Page_Batch extends CRM_Core_Page_Basic {
/**
* browse all entities.
*
* @param int $action
* @internal param int $action
*
* @return void
* @access public
......
......@@ -102,6 +102,8 @@ Class CRM_Campaign_BAO_Campaign extends CRM_Campaign_DAO_Campaign {
* function to delete the campaign
*
* @param int $id id of the campaign
*
* @return bool|mixed
*/
public static function del($id) {
if (!$id) {
......@@ -117,9 +119,10 @@ Class CRM_Campaign_BAO_Campaign extends CRM_Campaign_DAO_Campaign {
* retrieves the relevant objects. Typically the valid params are only
* campaign_id.
*
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $defaults (reference ) an assoc array to hold the flattened values
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return \CRM_Campaign_DAO_Campaign|null
* @access public
*/
public function retrieve(&$params, &$defaults) {
......@@ -464,6 +467,7 @@ SELECT campaign.id as id,
*
* @param int $campaignId campaign id
*
* @return array
* @static
*/
static function getCampaignGroups($campaignId) {
......
......@@ -271,8 +271,11 @@ AND tag_id = ( SELECT id FROM civicrm_tag WHERE name = %2 )";
/**
* Function to get Petition Signature Total
*
* @param boolean $all
* @param int $id
* @param $surveyId
*
* @return array
* @internal param bool $all
* @internal param int $id
* @static
*/
static function getPetitionSignatureTotalbyCountry($surveyId) {
......@@ -313,8 +316,11 @@ AND tag_id = ( SELECT id FROM civicrm_tag WHERE name = %2 )";
/**
* Function to get Petition Signature Total
*
* @param boolean $all
* @param int $id
* @param $surveyId
*
* @return array
* @internal param bool $all
* @internal param int $id
* @static
*/
static function getPetitionSignatureTotal($surveyId) {
......@@ -368,8 +374,12 @@ AND tag_id = ( SELECT id FROM civicrm_tag WHERE name = %2 )";
/**
* Function to get Petition Signature Details
*
* @param boolean $all
* @param int $id
* @param $surveyId
* @param null $status_id
*
* @return array
* @internal param bool $all
* @internal param int $id
* @static
*/
static function getPetitionSignature($surveyId, $status_id = NULL) {
......@@ -466,6 +476,8 @@ AND tag_id = ( SELECT id FROM civicrm_tag WHERE name = %2 )";
*
* @param int $surveyId
* @param int $contactId
*
* @return array
* @static
*/
static function checkSignature($surveyId, $contactId) {
......
......@@ -49,7 +49,11 @@ class CRM_Campaign_BAO_Survey extends CRM_Campaign_DAO_Survey {
/**
* The action links that we need to display for the browse screen
*
* @var array
* @param $params
* @param $defaults
*
* @return \CRM_Campaign_DAO_Survey|null
* @internal param array $
*/
static function retrieve(&$params, &$defaults) {
$dao = new CRM_Campaign_DAO_Survey();
......@@ -70,6 +74,8 @@ class CRM_Campaign_BAO_Survey extends CRM_Campaign_DAO_Survey {
* survey object.
*
*
* @param $params
*
* @return object CRM_Survey_DAO_Survey object
* @access public
* @static
......@@ -326,6 +332,7 @@ SELECT survey.id as id,
*
* @param $surveyTypes array an array of survey type id.
*
* @return array
* @static
*/
static function getSurveyCustomGroups($surveyTypes = array(
......@@ -379,6 +386,7 @@ SELECT survey.id as id,
*
* @param int $id survey id
*
* @return mixed|null
* @access public
* @static
*
......@@ -533,7 +541,7 @@ INNER JOIN civicrm_activity_contact activityAssignment
}
$query .= "AND activityTarget.contact_id IN {$targetContactIds}
$whereClause";
$activity = CRM_Core_DAO::executeQuery($query, $params);
$activity = CRM_Core_DAO::executeQuery($query, $params);
while ($activity->fetch()) {
$activityDetails[$activity->voter_id] = array(
'voter_id' => $activity->voter_id,
......
......@@ -74,6 +74,8 @@ class CRM_Campaign_StateMachine_Search extends CRM_Core_StateMachine {
*
* @param CRM_Core_Controller $controller the controller object
*
* @param string $formName
*
* @return string the name of the form that will handle the task
* @access protected
*/
......
......@@ -59,7 +59,8 @@ class CRM_Case_BAO_Case extends CRM_Case_DAO_Case {
* pairs
*
* @param array $params (reference ) an assoc array of name/value pairs