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
}
/**