}
/**
- * @param $activity
- * @param null $logMessage
+ * Create an activity.
+ *
+ * @todo elaborate on what this does.
+ *
+ * @param CRM_Core_DAO_Activity $activity
+ * @param string $logMessage
*
* @return bool
*/
}
/**
- * Get the list Activities
+ * Get the list Activities.
*
* @param array $input
* Array of parameters.
* - activity_type_id int|string the activitiy types we want to restrict by
*
* @return array
- * (reference) $values the relevant data object values of open activities
- *
+ * Relevant data object values of open activities
*/
public static function &getActivities($input) {
//step 1: Get the basic activity data
}
/**
- * Get the component id and name those are enabled and logged in
- * user has permission. To decide whether we are going to include
- * component related activities w/ core activity retrieve process.
+ * Get the component id and name if those are enabled and allowed.
+ *
+ * Checks whether logged in user has permission.
+ * To decide whether we are going to include
+ * component related activities with core activity retrieve process.
+ * (what did that just mean?)
*
* @return array
* Array of component id and name.
}
/**
- * Get the activity Count
+ * Get the activity Count.
*
* @param array $input
* Array of parameters.
*
* @return int
* count of activities
- *
*/
public static function &getActivitiesCount($input) {
$input['count'] = TRUE;
}
/**
- * Get the activity sql clause to pick activities
+ * Get the activity sql clause to pick activities.
*
* @param array $input
* Array of parameters.
*
* @return int
* count of activities
- *
*/
public static function getActivitySQLClause($input) {
$params = array();
}
/**
- * Send the message to all the contacts and also insert a
- * contact activity in each contacts record
+ * Send the message to all the contacts.
+ *
+ * Also insert a contact activity in each contacts record.
*
* @param array $contactDetails
* The array of contact details to send the email.
}
/**
+ * Send SMS.
+ *
* @param array $contactDetails
* @param array $activityParams
* @param array $smsParams
}
/**
- * Fetch object based on array of properties
+ * Fetch object based on array of properties.
*
* @param array $params
* (reference ) an assoc array of name/value pairs.
}
/**
- * Get the display name of a contact
+ * Get the display name of a contact.
*
* @param int $id
* Id of the contact.
}
/**
- * Return relative path
+ * Return relative path.
+ *
* @todo make this a method of $config->userSystem (i.e. UF classes) rather than a static function
*
* @param string $absolutePath
* Absolute path.
*
- * @return String
+ * @return string
* Relative url of uploaded image
*/
public static function getRelativePath($absolutePath) {
}
/**
- * Return proportional height and width of the image
+ * Return proportional height and width of the image.
*
* @param int $imageWidth
* Width of image.
* @param int $imageHeight
* Height of image.
*
- * @return Array
- * thumb dimension of image
+ * @return array
+ * Thumb dimension of image
*/
public static function getThumbSize($imageWidth, $imageHeight) {
$thumbWidth = 100;
}
/**
- * Validate type of contact image
+ * Validate type of contact image.
*
* @param array $params
* @param string $imageIndex
* @param string $opType
* Type of operation like fatal, bounce etc.
*
- * @return boolean
+ * @return bool
* true if valid image extension
*/
public static function processImageParams(
}
/**
- * Extract contact id from url for deleting contact image
+ * Extract contact id from url for deleting contact image.
*/
public static function processImage() {
}
/**
- * Function to set is_delete true or restore deleted contact
+ * Function to set is_delete true or restore deleted contact.
*
* @param int $contact
* Contact DAO object.
* @param bool $restore
* True to set the is_delete = 1 else false to restore deleted contact,
* i.e. is_delete = 0
- *
- * @return void
*/
public static function contactTrashRestore($contact, $restore = FALSE) {
$op = ($restore ? 'restore' : 'trash');
*
* @return string
* contact_type if $id found else null ""
- *
- *
*/
public static function getContactType($id) {
return CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $id, 'contact_type');
*
* @return string
* contact_sub_type if $id found else null ""
- *
- *
*/
public static function getContactSubType($id, $implodeDelimiter = NULL) {
$subtype = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', $id, 'contact_sub_type');
* Id of the contact whose contact sub/contact type is needed.
*
* @return array
- *
- *
*/
public static function getContactTypes($id) {
$params = array('id' => $id);
if ($contact) {
$contactTypes = array();
- if ($contact->contact_sub_type)
+ if ($contact->contact_sub_type) {
$contactTypes = explode(CRM_Core_DAO::VALUE_SEPARATOR, trim($contact->contact_sub_type, CRM_Core_DAO::VALUE_SEPARATOR));
+ }
array_unshift($contactTypes, $contact->contact_type);
return $contactTypes;
}
/**
- * Combine all the importable fields from the lower levels object
+ * Combine all the importable fields from the lower levels object.
*
* The ordering is important, since currently we do not have a weight
* scheme. Adding weight is super important
}
/**
- * Combine all the exportable fields from the lower levels object
+ * Combine all the exportable fields from the lower levels object.
*
- * currentlty we are using importable fields as exportable fields
+ * Currently we are using importable fields as exportable fields
*
* @param int|string $contactType contact Type
* @param bool $status
CRM_Core_DAO_Worldregion::export()
);
-
$fields = array_merge($fields,
CRM_Contact_DAO_Contact::export()
);
}
/**
- * Get the all contact details(Hierarchical)
+ * Get the all contact details (Hierarchical).
*
* @param int $contactId
* Contact id.
* @param array $fields
* Fields array.
*
- * @return $values array contains the contact details
+ * @return array
+ * Contact details
*/
public static function getHierContactDetails($contactId, &$fields) {
$params = array(array('contact_id', '=', $contactId, 0, 0));
}
/**
+ * Generate contact ID query.
+ *
* @param array $params
* @param $action
* @param int $sortID
*
* @return Object
*/
- public function &contactIDQuery($params, $action, $sortID, $displayRelationshipType = NULL, $queryOperator = 'AND') {
+ public function contactIDQuery($params, $action, $sortID, $displayRelationshipType = NULL, $queryOperator = 'AND') {
$params = array();
$sql = $this->_search->contactIDs($params);
}
/**
- * @param $rows
+ * Add actions.
+ *
+ * @param array $rows
*/
public function addActions(&$rows) {
$links = self::links($this->_key);
}
/**
- * @param $rows
+ * Remove actions.
+ *
+ * @param array $rows
*/
public function removeActions(&$rows) {
foreach ($rows as $rid => & $rValue) {
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2014
* $Id$
- *
*/
class CRM_Core_QuickForm_Action_Upload extends CRM_Core_QuickForm_Action {
}
/**
- * Upload and move the file if valid to the uploaded directory
+ * Upload and move the file if valid to the uploaded directory.
*
* @param CRM_Core_Form $page
* The CRM_Core_Form object.
* The name of the page which index the data container with.
* @param string $uploadName
* The name of the uploaded file.
- *
- * @return void
*/
public function upload(&$page, &$data, $pageName, $uploadName) {
// make sure uploadName exists in the QF array
if (!$status) {
CRM_Core_Error::statusBounce(ts('We could not move the uploaded file %1 to the upload directory %2. Please verify that the \'Temporary Files\' setting points to a valid path which is writable by your web server.', array(
1 => $value['name'],
- 2 => $this->_uploadDir
+ 2 => $this->_uploadDir,
)));
}
if (!empty($data['values'][$pageName][$uploadName]['name'])) {
* CRM_Core_Form the current form-page.
* @param string $actionName
* Current action name, as one Action object can serve multiple actions.
- *
- * @return void
*/
public function perform(&$page, $actionName) {
// like in Action_Next
// the above buildForm potentially changes the action function with different args
// so basically the rug might have been pulled from us, so we actually just check
// and potentially call the right one
- // this allows standalong form uploads to work nicely
+ // this allows standalone form uploads to work nicely
$page->controller->_actions['upload']->realPerform($page, $actionName);
}
/**
+ * @todo what do I do?
+ *
* @param CRM_Core_Form $page
* @param string $actionName
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2014
* $Id: Email.php 45499 2013-02-08 12:31:05Z kurund $
- *
*/
/**
/**
* Build all the data structures needed to build the form
- *
- * @return void
*/
function preProcess() {
CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this);
}
/**
- * Build the form object
- *
- *
- * @return void
+ * Build the form object.
*/
public function buildQuickForm() {
//enable form element
}
/**
- * Process the form after the input has been submitted and validated
- *
- *
- * @return void
+ * Process the form after the input has been submitted and validated.
*/
public function postProcess() {
CRM_Contact_Form_Task_EmailCommon::postProcess($this);
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2014
* $Id$
- *
*/
/**
* This class is used to retrieve and display a range of
* contacts that match the given criteria (specifically for
* results of advanced search options.
- *
*/
class CRM_Pledge_Selector_Search extends CRM_Core_Selector_Base {
protected $_query;
/**
- * Class constructor
+ * Class constructor.
*
* @param array $queryParams
* Array of parameters for query.
/**
* This method returns the links that are given for each search row.
- * currently the links added for each row are
*
+ * Currently the links added for each row are:
* - View
* - Edit
*
/**
* Returns total number of rows for the query.
*
- * @param
+ * @param int $action
*
* @return int
* Total number of rows
}
/**
- * Returns all the rows in the given offset and rowCount
+ * Returns all the rows in the given offset and rowCount.
*
* @param string $action
* The action being performed.
}
/**
+ * Get qill (display what was searched on).
+ *
* @inheritDoc
*/
public function getQILL() {
}
/**
- * Returns the column headers as an array of tuples:
- * (name, sortName (key to the sort array))
+ * Returns the column headers as an array of tuples.
+ *
+ * Keys are name, sortName, key to the sort array
*
* @param string $action
* The action being performed.
}
/**
+ * Get sql query string.
+ *
* @return string
*/
public function &getQuery() {
*/
/**
- * {@getfields EntityTag_get}
- * @example EntityTagGet.php
+ * Get entity tags.
*
* @param array $params
*
}
/**
- * Adjust Metadata for Get action
+ * Adjust Metadata for Get action.
+ *
+ * The metadata is used for setting defaults, documentation & validation.
*
- * The metadata is used for setting defaults, documentation & validation
* @param array $params
* Array or parameters determined by getfields.
*/
}
/**
+ * Create an entity tag.
*
* @param array $params
*
* @return array
- * {@getfields EntityTag_create}
- * @example EntityTagCreate.php
*/
function civicrm_api3_entity_tag_create($params) {
return _civicrm_api3_entity_tag_common($params, 'add');
}
/**
- * {@getfields EntityTag_delete}
- * @example EntityTagGet.php
+ * Mark entity tag as removed.
*
* @param array $params
*
}
/**
- * modify metadata
+ * Modify metadata.
+ *
* @param array $params
*/
function _civicrm_api3_entity_tag_delete_spec(&$params) {
}
/**
+ * Helper function for formatting tags (part of api v2 legacy).
*
* @param array $params
* @param string $op
*
* @return array
- * <type>
*/
function _civicrm_api3_entity_tag_common($params, $op = 'add') {
* @subpackage API_MailerGroup
* @copyright CiviCRM LLC (c) 2004-2014
* $Id$
- *
*/
/**
}
/**
- * Adjust Metadata for Create action
+ * Adjust Metadata for Create action.
+ *
+ * The metadata is used for setting defaults, documentation & validation.
*
- * The metadata is used for setting defaults, documentation & validation
* @param array $params
* Array or parameters determined by getfields.
*/
* @subpackage API_MailerGroup
* @copyright CiviCRM LLC (c) 2004-2014
* $Id$
- *
*/
/**
- * Subscribe from mailing group
+ * Subscribe from mailing group.
*
* @param array $params
- * Associative array of property.
- * name/value pairs to insert in new 'survey'
*
* @return array
* api result array
- * {@getfields mailing_event_subscribe_create}
*/
function civicrm_api3_mailing_event_resubscribe_create($params) {
}
/**
- * Adjust Metadata for Create action
+ * Adjust Metadata for Create action.
+ *
+ * The metadata is used for setting defaults, documentation & validation.
*
- * The metadata is used for setting defaults, documentation & validation
* @param array $params
* Array or parameters determined by getfields.
*/