Commit c490a46a authored by colemanw's avatar colemanw

Mass cleanup of docblocks/code/comments

parent ec712c07
......@@ -92,14 +92,13 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
/**
* Construct a WHERE clause to handle permissions to $object_*
*
* @param $tables
* @param array $tables - Any tables that may be needed in the FROM
* @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 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
......@@ -330,9 +329,7 @@ class CRM_ACL_BAO_ACL extends CRM_ACL_DAO_ACL {
*
* @param string $table - The table owning the object
* @param int $id - The ID of the object
* @param $tables
*
* @internal param \ref $array $tables - Tables that will be needed in the FROM
* @param 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
......@@ -657,7 +654,7 @@ SELECT $acl.*
}
/**
* @param $params
* @param array $params
*
* @return CRM_ACL_DAO_ACL
*/
......@@ -669,7 +666,7 @@ SELECT $acl.*
}
/**
* @param $params
* @param array $params
* @param $defaults
*/
static function retrieve(&$params, &$defaults) {
......@@ -734,7 +731,6 @@ SELECT count( a.id )
*/
public static function whereClause($type, &$tables, &$whereTables, $contactID = NULL) {
$acls = CRM_ACL_BAO_Cache::build($contactID);
//CRM_Core_Error::debug( "a: $contactID", $acls );
$whereClause = NULL;
$clauses = array();
......@@ -850,7 +846,7 @@ SELECT g.*
}
/**
* @param $type
* @param int $type
* @param null $contactID
* @param string $tableName
* @param null $allGroups
......@@ -921,7 +917,7 @@ ORDER BY a.object_id
}
/**
* @param $type
* @param int $type
* @param $operation
*
* @return bool
......@@ -967,7 +963,7 @@ ORDER BY a.object_id
}
/**
* Function to delete ACL records
* delete ACL records
*
* @param int $aclId ID of the ACL record to be deleted.
*
......
......@@ -53,7 +53,7 @@ class CRM_ACL_BAO_EntityRole extends CRM_ACL_DAO_EntityRole {
}
/**
* @param $params
* @param array $params
*
* @return CRM_ACL_DAO_EntityRole
*/
......@@ -65,7 +65,7 @@ class CRM_ACL_BAO_EntityRole extends CRM_ACL_DAO_EntityRole {
}
/**
* @param $params
* @param array $params
* @param $defaults
*/
static function retrieve(&$params, &$defaults) {
......@@ -86,7 +86,7 @@ class CRM_ACL_BAO_EntityRole extends CRM_ACL_DAO_EntityRole {
}
/**
* Function to delete Entity Role records
* delete Entity Role records
*
* @param int $entityRoleId ID of the EntityRole record to be deleted.
*
......
......@@ -43,7 +43,7 @@
class CRM_ACL_Form_ACL extends CRM_Admin_Form {
/**
* This function sets the default values for the form.
* Set default values for the form.
*
* @access public
*
......@@ -113,7 +113,7 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
}
/**
* Function to build the form
* Build the form object
*
* @return void
* @access public
......@@ -138,7 +138,8 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
$operations, TRUE
);
$objTypes = array('1' => ts('A group of contacts'),
$objTypes = array(
'1' => ts('A group of contacts'),
'2' => ts('A profile'),
'3' => ts('A set of custom data fields'),
);
......@@ -157,24 +158,29 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
$label = ts('Role');
$role = array('-1' => ts('- select role -'),
$role = array(
'-1' => ts('- select role -'),
'0' => ts('Everyone'),
) + CRM_Core_OptionGroup::values('acl_role');
$this->add('select', 'entity_id', $label, $role, TRUE);
$group = array('-1' => ts('- select -'),
$group = array(
'-1' => ts('- select -'),
'0' => ts('All Groups'),
) + CRM_Core_PseudoConstant::group();
$customGroup = array('-1' => ts('- select -'),
$customGroup = array(
'-1' => ts('- select -'),
'0' => ts('All Custom Groups'),
) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_CustomField', 'custom_group_id');
$ufGroup = array('-1' => ts('- select -'),
$ufGroup = array(
'-1' => ts('- select -'),
'0' => ts('All Profiles'),
) + CRM_Core_PseudoConstant::get('CRM_Core_DAO_UFField', 'uf_group_id');
$event = array('-1' => ts('- select -'),
$event = array(
'-1' => ts('- select -'),
'0' => ts('All Events'),
) + CRM_Event_PseudoConstant::event(NULL, FALSE, "( is_template IS NULL OR is_template != 1 )");
......@@ -189,7 +195,7 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
}
/**
* @param $params
* @param array $params
*
* @return bool
*/
......@@ -262,7 +268,7 @@ class CRM_ACL_Form_ACL extends CRM_Admin_Form {
}
/**
* Function to process the form
* Process the form submission
*
* @access public
*
......
......@@ -43,7 +43,7 @@
class CRM_ACL_Form_ACLBasic extends CRM_Admin_Form {
/**
* This function sets the default values for the form.
* Set default values for the form.
*
* @access public
*
......@@ -75,7 +75,7 @@ SELECT object_table
}
/**
* Function to build the form
* Build the form object
*
* @return void
* @access public
......@@ -111,7 +111,7 @@ SELECT object_table
}
/**
* @param $params
* @param array $params
*
* @return array|bool
*/
......@@ -125,7 +125,7 @@ SELECT object_table
}
/**
* Function to process the form
* Process the form submission
*
* @access public
*
......
......@@ -43,7 +43,7 @@
class CRM_ACL_Form_EntityRole extends CRM_Admin_Form {
/**
* Function to build the form
* Build the form object
*
* @return void
* @access public
......@@ -72,7 +72,7 @@ class CRM_ACL_Form_EntityRole extends CRM_Admin_Form {
}
/**
* Function to process the form
* Process the form submission
*
* @access public
*
......
......@@ -40,7 +40,7 @@
class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
/**
* Function to build the form
* Build the form object
*
* @access public
* @return void
......@@ -99,7 +99,7 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
}
/**
* Function to process the form
* Process the form submission
*
* @access public
* @return void
......
......@@ -71,18 +71,12 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
}
/**
* Takes a bunch of params that are needed to match certain criteria and
* retrieves the relevant objects. Typically the valid params are only
* contact_id. We'll tweak this function to be more full featured over a period
* of time. This is the inverse function of create. It also stores all the retrieved
* values in the default array
* Fetch object based on array of properties
*
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @internal param string $activityType activity type
*
* @return object CRM_Core_BAO_Meeting object
* @return CRM_Core_BAO_Meeting object
* @access public
*/
public static function retrieve(&$params, &$defaults) {
......@@ -146,10 +140,9 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
}
/**
* Function to delete the activity
* delete the activity
*
* @param array $params associated array
*
* @param bool $moveToTrash
*
* @return void
......@@ -256,11 +249,9 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
/**
* Delete activity assignment record
*
* @param $activityId
* @param int $activityId
* @param null $recordTypeID
*
* @internal param int $id activity id
*
* @return null
* @access public
*/
......@@ -274,15 +265,11 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
}
/**
* Function to process the activities
* process the activities
*
* @param array $params associated array of the submitted values
*
* @throws CRM_Core_Exception
* @internal param object $form form object
* @internal param array $ids array of ids
* @internal param string $activityType activity Type
* @internal param bool $record true if it is Record Activity
* @access public
*
* @return $this|null|object
......@@ -656,7 +643,7 @@ class CRM_Activity_BAO_Activity extends CRM_Activity_DAO_Activity {
}
/**
* function to get the list Activities
* get the list Activities
*
* @param array $input array of parameters
* Keys include
......@@ -919,7 +906,7 @@ ORDER BY fixed_sort_order
* user has permission. To decide whether we are going to include
* component related activities w/ core activity retrieve process.
*
* return an array of component id and name.
* @return array of component id and name.
* @static
**/
static function activityComponents() {
......@@ -948,7 +935,7 @@ ORDER BY fixed_sort_order
}
/**
* function to get the activity Count
* get the activity Count
*
* @param array $input array of parameters
* Keys include
......@@ -1180,7 +1167,6 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
* @param array $contactIds contact ids
* @param string $additionalDetails the additional information of CC and BCC appended to the activity Details
*
* @internal param string $message the message contents
* @return array ( sent, activityId) if any email is sent and activityId
* @access public
* @static
......@@ -1518,7 +1504,6 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
* @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
*
......@@ -1598,12 +1583,10 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
* @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 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
......@@ -1676,8 +1659,6 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
*
* @param bool $status
*
* @internal param $NULL
*
* @return array array of importable Fields
* @access public
* @static
......@@ -1730,8 +1711,7 @@ LEFT JOIN civicrm_activity_contact src ON (src.activity_id = ac.activity_id AND
/**
* To get the Activities of a target contact
*
* @param $contactId Integer ContactId of the contact whose activities
* need to find
* @param int $contactId Id of the contact whose activities need to find
*
* @return array array of activity fields
* @access public
......@@ -1806,9 +1786,7 @@ WHERE activity.id IN ($activityIds)";
*
* @param object $activity (reference) particular component object
* @param string $activityType for Membership Signup or Renewal
*
*
* @param null $targetContactID
* @param int $targetContactID
*
* @return bool
* @static
......@@ -1922,7 +1900,7 @@ SELECT display_name
}
/**
* Function to get Parent activity for currently viewed activity
* Get Parent activity for currently viewed activity
*
* @param int $activityId current activity id
*
......@@ -1949,11 +1927,9 @@ SELECT display_name
}
/**
* Function to get total count of prior revision of currently viewd activity
*
* @param $activityID
* Get total count of prior revision of currently viewd activity
*
* @internal param int $activityId current activity id
* @param $activityID current activity id
*
* @return int $params count of prior activities otherwise false.
* @access public
......@@ -1988,14 +1964,11 @@ AND id < {$activityID}
}
/**
* Function to get all prior activities of currently viewe
* d activity
* Get all prior activities of currently viewed activity
*
* @param $activityID
* @param $activityID current activity id
* @param bool $onlyPriorRevisions
*
* @internal param int $activityId current activity id
*
* @return array $result prior activities info.
* @access public
*/
......@@ -2043,9 +2016,7 @@ AND cl.modified_id = c.id
/**
* Function to find the latest revision of a given activity
*
* @param $activityID
*
* @internal param int $activityId prior activity id
* @param $activityID prior activity id
*
* @return int $params current activity id.
* @access public
......@@ -2077,13 +2048,10 @@ AND cl.modified_id = c.id
/**
* Function to create a follow up a given activity
*
* @activityId int activity id of parent activity
*
* @param $activityId
* @param $params
* @param $activityId int activity id of parent activity
* @param array $params
*
* @return $this|null|object
* @internal param array $activity details
*
* @access public
*/
......@@ -2121,10 +2089,9 @@ AND cl.modified_id = c.id
* Function to get Activity specific File according activity type Id.
*
* @param int $activityTypeId activity id
*
* @param string $crmDir
*
* @return if file exists returns $activityTypeFile activity filename otherwise false.
* @return string|bool if file exists returns $activityTypeFile activity filename otherwise false.
*
* @static
*/
......@@ -2313,7 +2280,7 @@ AND cl.modified_id = c.id
}
/**
* Does user has sufficient permission for view/edit activity record.
* Does user has sufficient permission for view/edit activity record?
*
* @param int $activityId activity record id.
* @param int $action edit/view
......@@ -2609,12 +2576,11 @@ INNER JOIN civicrm_option_group grp ON ( grp.id = val.option_group_id AND grp.n
return $contactActivities;
}
/*
* Used to copy custom fields and attachments from an existing activity to another.
* see CRM_Case_Page_AJAX::_convertToCaseActivity() for example
*/
/**
* @param $params
* Used to copy custom fields and attachments from an existing activity to another.
* @see CRM_Case_Page_AJAX::_convertToCaseActivity() for example
*
* @param array $params
*/
static function copyExtendedActivityData($params) {
// attach custom data to the new activity
......@@ -2688,7 +2654,7 @@ INNER JOIN civicrm_option_group grp ON ( grp.id = val.option_group_id AND grp.n
}
/**
* @param $params
* @param array $params
*/
function setApiFilter(&$params) {
if (CRM_Utils_Array::value('target_contact_id', $params)) {
......
......@@ -51,8 +51,6 @@ class CRM_Activity_BAO_ActivityAssignment extends CRM_Activity_DAO_ActivityConta
*
* @param array $params (reference ) an assoc array of name/value pairs
*
* @internal param array $ids (reference ) the array that holds all the db ids
*
* @return object activity type of object that is added
* @access public
*/
......@@ -70,9 +68,7 @@ class CRM_Activity_BAO_ActivityAssignment extends CRM_Activity_DAO_ActivityConta
/**
* Retrieve assignee_id by activity_id
*
* @param $activity_id
*
* @internal param int $id ID of the activity
* @param int $activity_id
*
* @return array
*
......
......@@ -66,15 +66,12 @@ class CRM_Activity_BAO_ActivityContact extends CRM_Activity_DAO_ActivityContact
}
/**
* function to retrieve names of contact by activity_id
* retrieve names of contact by activity_id
*
* @param $activityID
* @param $recordTypeID
* @param int $activityID
* @param int $recordTypeID
* @param bool $alsoIDs
*
* @internal param int $id ID of the activity
* @internal param string $type type of interaction
*
* @return array
*
* @access public
......@@ -110,13 +107,11 @@ AND contact_a.is_deleted = 0
}
/**
* function to retrieve id of target contact by activity_id
* retrieve id of target contact by activity_id
*
* @param $activityID
* @param $recordTypeID
*
* @internal param int $id ID of the activity
*
* @return mixed
*
* @access public
......
......@@ -47,12 +47,9 @@ class CRM_Activity_BAO_ActivityTarget extends CRM_Activity_DAO_ActivityContact {
}
/**
* function to add activity target
* add activity target
*
* @param $params
*
* @internal param array $activity_id (reference ) an assoc array of name/value pairs
* @internal param array $target_contact_id (reference ) the array that holds all the db ids
* @param array $params
*
* @return object activity type of object that is added
* @access public
......@@ -68,11 +65,9 @@ class CRM_Activity_BAO_ActivityTarget extends CRM_Activity_DAO_ActivityContact {
}
/**
* function to retrieve id of target contact by activity_id
*
* @param $activity_id
* retrieve id of target contact by activity_id
*
* @internal param int $id ID of the activity
* @param int $activity_id
*
* @return mixed
*
......@@ -103,11 +98,9 @@ AND civicrm_contact.is_deleted = 0
}
/**
* function to retrieve names of target contact by activity_id
*
* @param $activityID
* retrieve names of target contact by activity_id
*
* @internal param int $id ID of the activity
* @param int $activityID
*
* @return array
*
......
......@@ -631,7 +631,7 @@ class CRM_Activity_BAO_Query {
* @param $pseudoconstantType
* @param $op
* @param $grouping
* @param $params
* @param array $params
*
* @return array
*/
......
......@@ -111,12 +111,11 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
*/
protected $_crmDir = 'Activity';
/*
* Survey activity
*
* @var boolean
*/
/**
* Survey activity
*
* @var boolean