/**
* 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
*
* @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
}
/**
- * @param $params
+ * @param array $params
*
* @return CRM_ACL_DAO_ACL
*/
}
/**
- * @param $params
+ * @param array $params
* @param $defaults
*/
static function retrieve(&$params, &$defaults) {
*/
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();
}
/**
- * @param $type
+ * @param int $type
* @param null $contactID
* @param string $tableName
* @param null $allGroups
}
/**
- * @param $type
+ * @param int $type
* @param $operation
*
* @return bool
}
/**
- * Function to delete ACL records
+ * delete ACL records
*
* @param int $aclId ID of the ACL record to be deleted.
*
}
/**
- * @param $params
+ * @param array $params
*
* @return CRM_ACL_DAO_EntityRole
*/
}
/**
- * @param $params
+ * @param array $params
* @param $defaults
*/
static function retrieve(&$params, &$defaults) {
}
/**
- * Function to delete Entity Role records
+ * delete Entity Role records
*
* @param int $entityRoleId ID of the EntityRole record to be deleted.
*
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
*
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
$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'),
);
$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 )");
}
/**
- * @param $params
+ * @param array $params
*
* @return bool
*/
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
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
*
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * @param $params
+ * @param array $params
*
* @return array|bool
*/
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
class CRM_ACL_Form_EntityRole extends CRM_Admin_Form {
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form {
/**
- * Function to build the form
+ * Build the form object
*
* @access public
* @return void
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
* @return void
}
/**
- * 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) {
}
/**
- * Function to delete the activity
+ * delete the activity
*
* @param array $params associated array
- *
* @param bool $moveToTrash
*
* @return void
/**
* Delete activity assignment record
*
- * @param $activityId
+ * @param int $activityId
* @param null $recordTypeID
*
- * @internal param int $id activity id
- *
* @return null
* @access public
*/
}
/**
- * 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
}
/**
- * function to get the list Activities
+ * get the list Activities
*
* @param array $input array of parameters
* Keys include
* 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() {
}
/**
- * function to get the activity Count
+ * get the activity Count
*
* @param array $input array of parameters
* Keys include
* @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
* @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
*
* @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
*
* @param bool $status
*
- * @internal param $NULL
- *
* @return array array of importable Fields
* @access public
* @static
/**
* 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
*
* @param object $activity (reference) particular component object
* @param string $activityType for Membership Signup or Renewal
- *
- *
- * @param null $targetContactID
+ * @param int $targetContactID
*
* @return bool
* @static
}
/**
- * Function to get Parent activity for currently viewed activity
+ * Get Parent activity for currently viewed activity
*
* @param int $activityId current activity id
*
}
/**
- * 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
}
/**
- * 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
*/
/**
* 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
/**
* 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
*/
* 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
*/
}
/**
- * 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
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
}
/**
- * @param $params
+ * @param array $params
*/
function setApiFilter(&$params) {
if (CRM_Utils_Array::value('target_contact_id', $params)) {
*
* @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
*/
/**
* Retrieve assignee_id by activity_id
*
- * @param $activity_id
- *
- * @internal param int $id ID of the activity
+ * @param int $activity_id
*
* @return array
*
}
/**
- * 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
}
/**
- * 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
}
/**
- * 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
}
/**
- * 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
*
}
/**
- * 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
*
* @param $pseudoconstantType
* @param $op
* @param $grouping
- * @param $params
+ * @param array $params
*
* @return array
*/
*/
protected $_crmDir = 'Activity';
- /*
- * Survey activity
- *
- * @var boolean
- */
-
+ /**
+ * Survey activity
+ *
+ * @var boolean
+ */
protected $_isSurveyActivity;
protected $_values = array();
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
* @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
* @static
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * Function to let injecting activity type file do any processing
+ * let injecting activity type file do any processing
* needed, before the activity is added/updated
*
*/
}
/**
- * Function to let injecting activity type file do any processing
+ * let injecting activity type file do any processing
* needed, after the activity has been added/updated
*
*/
class CRM_Activity_Form_ActivityView extends CRM_Core_Form {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
function preProcess() {
$this->set('searchFormName', 'Search');
- /**
- * set the button names
- */
+ // set the button names
$this->_searchButtonName = $this->getButtonName('refresh');
$this->_actionButtonName = $this->getButtonName('next', 'action');
$this->_done = FALSE;
$this->defaults = array();
- /*
- * we allow the controller to set force/reset externally, useful when we are being
- * driven by the wizard framework
- */
+ // we allow the controller to set force/reset externally, useful when we are being
+ // driven by the wizard framework
$this->_reset = CRM_Utils_Request::retrieve('reset', 'Boolean', CRM_Core_DAO::$_nullObject);
$this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE);
$this->_limit = CRM_Utils_Request::retrieve('limit', 'Positive', $this);
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param bool $useTable
*/
static function preProcessCommon(&$form, $useTable = FALSE) {
* the form with a customized title for the main Submit
*
* @param string $title title of the main button
- * @param string $nextType
+ * @param string $nextType button type for the form after processing
* @param string $backType
* @param bool $submitOnce
*
- * @internal param string $type button type for the form after processing
- *
* @return void
* @access public
*/
protected $_tags;
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param $rule
*
* @return array
}
}
- //end of function
}
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
CRM_Core_Session::setStatus("", ts("No Updates Saved"), "info");
}
}
- //end of function
}
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
// also reset the batch page so it gets new values from the db
$this->controller->resetPage('Batch');
}
- //end of function
}
}
/**
- * Build the form - it consists of
+ * Build the form object - it consists of
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
protected $_tags;
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param $rule
*
* @return array
CRM_Core_Session::setStatus($status, ts("Removed Tag <em>%1</em>", array(1 => $this->_tags[$key])), 'success', array('expires' => 0));
}
}
- //end of function
}
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Activity_Import_Form_DataSource extends CRM_Core_Form {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Activity_Import_Form_Preview extends CRM_Import_Form_Preview {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
class CRM_Activity_Import_Form_Summary extends CRM_Import_Form_Summary {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * function to format the field values for input to the api
+ * format the field values for input to the api
*
* @return array (reference ) associative array of name/value pairs
* @access public
/**
* Export data to a CSV file
*
- * @param $fileName
+ * @param string $fileName
* @param array $header
- * @param data $data
+ * @param array $data
*
- * @internal param string $filename
* @return void
* @access public
*/
}
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
class CRM_Activity_Page_UserDashboard extends CRM_Contact_Page_View_UserDashBoard {
/**
- * Function to list participations for the UF user
+ * list participations for the UF user
*
* return null
* @access public
*
* - View
*
- * @param $activityTypeId
+ * @param int $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
*/
* getter for array of the parameters required for creating pager.
*
* @param $action
- * @param $params
+ * @param array $params
*
- * @internal param $
* @access public
*/
function getPagerParams($action, &$params) {
);
$this->_query->_distinctComponentClause = '( civicrm_activity.id )';
$this->_query->_groupByComponentClause = " GROUP BY civicrm_activity.id ";
- //CRM_Core_Error::debug( $this->_query ); exit();
}
- //end of constructor
/**
* getter for array of the parameters required for creating pager.
*
* @param $action
- * @param $params
+ * @param array $params
*
- * @internal param $
* @access public
*/
function getPagerParams($action, &$params) {
$params['buttonTop'] = 'PagerTopButton';
$params['buttonBottom'] = 'PagerBottomButton';
}
- //end of function
/**
* Returns total number of rows for the query.
}
/**
- *
* @return array $qill which contains an array of strings
* @access public
*/
return ts('CiviCRM Activity Search');
}
}
-//end of class
-
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
class CRM_Admin_Form_CMSUser extends CRM_Core_Form {
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
class CRM_Admin_Form_ContactType extends CRM_Admin_Form {
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
class CRM_Admin_Form_Extensions extends CRM_Admin_Form {
/**
- * Function to for pre-processing
+ * for pre-processing
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * Function to build the form
+ * Build the form object
*
* @param bool $check
*
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
- //end of function
}
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
class CRM_Admin_Form_LocationType extends CRM_Admin_Form {
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
class CRM_Admin_Form_MailSettings extends CRM_Admin_Form {
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
class CRM_Admin_Form_Mapping extends CRM_Admin_Form {
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* The default values are retrieved from the database.
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
protected $_defaults = array();
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
class CRM_Admin_Form_OptionGroup extends CRM_Admin_Form {
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
protected $_gLabel;
/**
- * Function to pre-process
+ * pre-process
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * Function to build the form
+ * Build the form object
*
* @param bool $check
*
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * Function to build the form
+ * Build the form object
*
* @param bool $check
*
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
protected $_id = NULL;
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
$this->postProcessCommon();
}
- //end of function
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
$this->postProcessCommon();
}
- //end of function
}
*/
class CRM_Admin_Form_Preferences_Contribute extends CRM_Admin_Form_Preferences {
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
$this->postProcessCommon();
}
- //end of function
}
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Admin_Form_PreferencesDate extends CRM_Admin_Form {
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
class CRM_Admin_Form_RelationshipType extends CRM_Admin_Form {
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
public $_freqUnits;
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
protected $_settings = array();
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * @param $params
+ * @param array $params
*/
public function commonProcess(&$params) {
protected $_components;
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Admin_Form_Setting_Date extends CRM_Admin_Form_Setting {
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
'fatalErrorHandler' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME,
);
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
protected $_currencySymbols;
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Admin_Form_Setting_Mail extends CRM_Admin_Form_Setting {
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Admin_Form_Setting_Mapping extends CRM_Admin_Form_Setting {
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Admin_Form_Setting_Path extends CRM_Admin_Form_Setting {
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
);
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
protected $_testButtonName;
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* default values are retrieved from the database
*
* @access public
protected $_uf = NULL;
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
protected $_oldSiteName;
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
'disable_core_css' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME,
);
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
protected $_isTagSet;
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * Function to process drag/move action for menu tree
+ * process drag/move action for menu tree
*/
static function menuTree() {
CRM_Core_BAO_Navigation::processNavigation($_GET);
}
/**
- * Function to build status message while
+ * build status message while
* enabling/ disabling various objects
*/
static function getStatusMsg() {
}
/**
- * function to get userContext params
+ * get userContext params
*
* @param int $mode mode that we are in
*
/**
* browse all entities.
*
- * @internal param int $action
- *
* @return void
* @access public
*/
}
/**
- * function to build badges parameters before actually creating badges.
+ * build badges parameters before actually creating badges.
*
* @param array $params associated array of submitted values
- * @param $form
- * @params object $form form/controller object
+ * @param CRM_Core_Form $form
*
* @return void
* @access public
// get name badge layout info
$layoutInfo = CRM_Badge_BAO_Layout::buildLayout($params);
- // spit / get actual field names from tokeni and individual contact image URLs
+ // split/get actual field names from token and individual contact image URLs
$returnProperties = array();
if (!empty($layoutInfo['data']['token'])) {
foreach ($layoutInfo['data']['token'] as $index => $value) {
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
- * @return object CRM_Core_DAO_PrintLabel object on success, null otherwise
+ * @return CRM_Core_DAO_PrintLabel object on success, null otherwise
* @access public
* @static
*/
}
/**
- * Function to add a name label
+ * add a name label
*
* @param array $params reference array contains the values submitted by the form
*
- * @internal param array $ids reference array contains the id
- *
* @access public
* @static
*
}
/**
- * Function to delete name labels
+ * delete name labels
*
* @param int $printLabelId ID of the name label to be deleted.
*
}
/**
- * Function to decode encoded data and return as an array
+ * decode encoded data and return as an array
*
* @param json $jsonData json object
*
const FIELD_ROWCOUNT = 6;
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. MobileProvider that in edit/view mode
+ * Set default values for the form. MobileProvider that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * @param $params
+ * @param array $params
*/
public function buildPreview(&$params) {
// get a max participant id
/**
* Remove entries from entity batch
* @param array $params associated array
- * @return object CRM_Batch_DAO_EntityBatch
+ * @return CRM_Batch_DAO_EntityBatch
*/
static function removeBatchEntity($params) {
$entityBatch = new CRM_Batch_DAO_EntityBatch();
}
/**
- * function to delete batch entry
+ * delete batch entry
*
* @param int $batchId batch id
*
}
/**
- * Function to define action links
+ * define action links
*
* @param null $context
*
}
/**
- * function to get batch list
+ * get batch list
*
* @return array array of all batches
* excluding batches with data entry in progress
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
$session->replaceUserContext(CRM_Utils_System::url('civicrm/batch/entry', "id={$batch->id}&reset=1"));
}
}
- //end of function
}
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
}
return TRUE;
}
- //end of function
/**
* process membership records
/**
* browse all entities.
*
- * @internal param int $action
- *
* @return void
* @access public
*/
class CRM_Bridge_OG_Drupal {
/**
- * @param $params
+ * @param array $params
* @param $op
*/
static function nodeapi(&$params, $op) {
}
/**
- * @param $params
+ * @param array $params
* @param $op
* @param null $groupType
*/
}
/**
- * @param $params
+ * @param array $params
* @param $op
*/
static function updateCiviACLRole(&$params, $op) {
}
/**
- * @param $params
+ * @param array $params
* @param $op
*/
static function updateCiviACLEntityRole(&$params, $op) {
}
/**
- * @param $params
+ * @param array $params
* @param $op
*/
static function updateCiviACL(&$params, $op) {
}
/**
- * @param $params
+ * @param array $params
* @param $op
*
* @throws Exception
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return object CRM_Campaign_DAO_Campaign object
+ * @return CRM_Campaign_DAO_Campaign object
* @access public
* @static
*/
}
/**
- * function to delete the campaign
+ * delete the campaign
*
* @param int $id id of the campaign
*
}
/**
- * Function to retrieve campaigns for dashboard.
+ * retrieve campaigns for dashboard.
*
* @static
*/
- static function getCampaignSummary($params = array(
- ), $onlyCount = FALSE) {
+ static function getCampaignSummary($params = array(), $onlyCount = FALSE) {
$campaigns = array();
//build the limit and order clause.
}
/**
- * Function to get Campaigns groups
+ * get Campaigns groups
*
* @param int $campaignId campaign id
*
*
*/
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param null $connectedCampaignId
*/
public static function addCampaign(&$form, $connectedCampaignId = NULL) {
* Add campaign in compoent search.
* and assign needful info to templates.
*
- * @param $form
+ * @param CRM_Core_Form $form
* @param string $elementName
*/
public static function addCampaignInComponentSearch(&$form, $elementName = 'campaign_id') {
}
/**
- * Function to get Petition Details for dashboard.
+ * get Petition Details for dashboard.
*
* @static
*/
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return object CRM_Campaign_BAO_Petition
+ * @return CRM_Campaign_BAO_Petition
* @access public
* @static
*/
}
/**
- * Function to get Petition Signature Total
+ * get Petition Signature Total
*
- * @param $surveyId
+ * @param int $surveyId
*
* @return array
- * @internal param bool $all
- * @internal param int $id
* @static
*/
static function getPetitionSignatureTotalbyCountry($surveyId) {
}
/**
- * Function to get Petition Signature Total
+ * get Petition Signature Total
*
- * @param $surveyId
+ * @param int $surveyId
*
* @return array
- * @internal param bool $all
- * @internal param int $id
* @static
*/
static function getPetitionSignatureTotal($surveyId) {
/**
* Function to get Petition Signature Details
*
- * @param $surveyId
- * @param null $status_id
+ * @param int $surveyId
+ * @param int $status_id
*
* @return array
- * @internal param bool $all
- * @internal param int $id
* @static
*/
static function getPetitionSignature($surveyId, $status_id = NULL) {
* @static
*/
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
/**
* The action links that we need to display for the browse screen
*
- * @param $params
+ * @param array $params
* @param $defaults
*
- * @return \CRM_Campaign_DAO_Survey|null
- * @internal param array $
+ * @return CRM_Campaign_DAO_Survey|null
*/
static function retrieve(&$params, &$defaults) {
$dao = new CRM_Campaign_DAO_Survey();
* survey object.
*
*
- * @param $params
+ * @param array $params
*
- * @return object CRM_Survey_DAO_Survey object
+ * @return CRM_Survey_DAO_Survey object
* @access public
* @static
*/
}
/**
- * Function to retrieve surveys for dashboard.
+ * retrieve surveys for dashboard.
*
* @static
*/
- static function getSurveySummary($params = array(
- ), $onlyCount = FALSE) {
+ static function getSurveySummary($params = array(), $onlyCount = FALSE) {
//build the limit and order clause.
$limitClause = $orderByClause = $lookupTableJoins = NULL;
if (!$onlyCount) {
}
/**
- * Function to get Surveys
+ * get Surveys
*
* @param boolean $onlyActive retrieve only active surveys.
* @param boolean $onlyDefault retrieve only default survey.
}
/**
- * Function to get Surveys activity types
+ * get Surveys activity types
*
*
* @static
* @return array
* @static
*/
- static function getSurveyCustomGroups($surveyTypes = array(
- )) {
+ static function getSurveyCustomGroups($surveyTypes = array()) {
$customGroups = array();
if (!is_array($surveyTypes)) {
$surveyTypes = array($surveyTypes);
/**
* This function retrieve contact information.
*
- * @param $voterIds
+ * @param array $voterIds
* @param array $returnProperties an array of return elements.
*
- * @internal param array $voter an array of contact Ids.
- * @return array $voterDetails array of contact info.@static
+ * @return array $voterDetails array of contact info.
+ * @static
*/
- static function voterDetails($voterIds, $returnProperties = array(
- )) {
+ static function voterDetails($voterIds, $returnProperties = array()) {
$voterDetails = array();
if (!is_array($voterIds) || empty($voterIds)) {
return $voterDetails;
* This function is to check survey activity.
*
* @param int $activityId activity id.
- * @internal param int $activityTypeId activity type id.
- * @return boolean $isSurveyActivity true/false boolean.
+ * @return boolean $isSurveyActivity true/false
* @static
*/
static function isSurveyActivity($activityId) {
/**
* Check and update the survey respondents.
*
- * @param $params
+ * @param array $params
*
* @return array success message
*/
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @param null
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
}
/**
- * Function to build the petition profile form
+ * build the petition profile form
*
* @param $id
* @param $name
// check if user has already signed this petition
/**
- * @param $params
+ * @param array $params
*/
function redirectIfSigned($params) {
$signature = $this->bao->checkSignature($this->_surveyId, $this->_contactId);
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @param null
*
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @param null
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @param null
*
class CRM_Campaign_Form_Survey_Questions extends CRM_Campaign_Form_Survey {
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @param null
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @param null
*
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @param null
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @param null
*
class CRM_Campaign_Form_Survey_TabHeader {
/**
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array
*/
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array
*/
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
static function reset(&$form) {
$tabs = self::process($form);
protected $_action;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @param null
*
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database.
*
* @param null
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
* the form with a customized title for the main Submit
*
* @param string $title title of the main button
- * @param string $nextType
+ * @param string $nextType button type for the form after processing
* @param string $backType
* @param bool $submitOnce
*
- * @internal param string $type button type for the form after processing
- *
* @return void
* @access public
*/
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
}
/**
- * @param $params
+ * @param array $params
*
* @return mixed
*/
}
/**
- * Build the form - it consists of
+ * Build the form object - it consists of
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
function preProcess() {}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
*
* @return array
*/
- public static function getCampaignSummary($params = array(
- )) {
+ public static function getCampaignSummary($params = array()) {
$campaignsData = array();
//get the campaigns.
*
* @return array
*/
- function getSurveySummary($params = array(
- )) {
+ function getSurveySummary($params = array()) {
$surveysData = array();
//get the survey.
*
* @return array
*/
- function getPetitionSummary($params = array(
- )) {
+ function getPetitionSummary($params = array()) {
$config = CRM_Core_Config::singleton();
$petitionsData = array();
}
/**
- * function to get userContext params
+ * get userContext params
*
* @param int $mode mode that we are in
*
TRUE
);
}
- //end of constructor
/**
* This method returns the links that are given for each search row.
* getter for array of the parameters required for creating pager.
*
* @param $action
- * @param $params
+ * @param array $params
*
- * @internal param $
* @access public
*/
function getPagerParams($action, &$params) {
}
/**
- *
* @return array $qill which contains an array of strings
* @access public
**/
return ts('CiviCRM Respondent Search');
}
}
-//end of class
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @internal param array $ids the array that holds all the db ids
- *
- * @return object CRM_Case_BAO_Case object
+ * @return CRM_Case_BAO_Case object
* @access public
* @static
*/
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @internal param array $ids the array that holds all the db ids
- *
- * @return object CRM_Case_BAO_Case object
+ * @return CRM_Case_BAO_Case object
* @access public
* @static
*/
* in a hierarchical manner
* @param array $ids (reference) the array that holds all the db ids
*
- * @return object CRM_Case_BAO_Case object
+ * @return CRM_Case_BAO_Case object
* @access public
* @static
*/
}
/**
- * Function to process case activity add/delete
+ * process case activity add/delete
* takes an associative array and
*
* @param array $params (reference ) an assoc array of name/value pairs
}
/**
- * Function to get the case subject for Activity
+ * get the case subject for Activity
*
* @param int $activityId activity id
*
}
/**
- * Function to get the case type.
+ * get the case type.
*
* @param int $caseId
*
*
* @param $activityId
*
- * @internal param $activity_id
- *
* @return int, case ID
*/
static function getCaseIdByActivityId($activityId) {
*
* @param $contactID
* @param boolean $includeDeleted include the deleted cases in result
- *
* @param null $caseType
*
- * @internal param int $contactId ID of the contact
* @return array
*
* @access public
* @param $caseId
* @param int $relationshipId relationship id
* @param int $relContactId case role assignee contactId.
- *
* @param null $contactId
*
- * @internal param int $caseID case id
* @return void on success creates activity and case activity
*
* @static
static $_exportableFields = NULL;
/**
- * takes an associative array and creates a Case Type object
+ * Takes an associative array and creates a Case Type object
*
* the function extract all the params it needs to initialize the create a
* case type object. the params array could contain additional unused name/value
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @internal param array $ids the array that holds all the db ids
+ * @throws CRM_Core_Exception
*
- * @return object CRM_Case_BAO_CaseType object
+ * @return CRM_Case_BAO_CaseType object
* @access public
* @static
*/
/**
- * Function to format / convert submitted array to xml for case type definition
+ * format / convert submitted array to xml for case type definition
*
* @param string $name
* @param array $definition the case-type defintion expressed as an array-tree
}
/**
- * Function to get the case definition either from db or read from xml file
+ * get the case definition either from db or read from xml file
*
* @param SimpleXmlElement $xml a single case-type record
*
* @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 CRM_Case_BAO_CaseType|null the found object or null
* @access public
* @static
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @internal param array $ids the array that holds all the db ids
- *
- * @return object CRM_Case_BAO_CaseType object
+ * @return CRM_Case_BAO_CaseType object
* @access public
* @static
*/
* @param array $defaults (reference ) an assoc array to hold the name / value pairs
* in a hierarchical manner
*
- * @internal param array $ids (reference) the array that holds all the db ids
- *
- * @return object CRM_Case_BAO_CaseType object
+ * @return CRM_Case_BAO_CaseType object
* @access public
* @static
*/
/**
* @param $caseTypeId
*
+ * @throws CRM_Core_Exception
* @return mixed
*/
static function del($caseTypeId) {
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
* @static
public $_relatedContacts;
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
* @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
* @static
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
class CRM_Case_Form_Activity_ChangeCaseStartDate {
/**
- * @param $form
+ * @param CRM_Core_Form $form
*
* @throws Exception
*/
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
*/
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
static function buildQuickForm(&$form) {
$form->removeElement('status_id');
* @param array $values posted values of the form
*
* @param $files
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array list of errors to be posted back to the form
* @static
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
- * @param $form
- * @param $params
+ * @param CRM_Core_Form $form
+ * @param array $params
*
* @return void
*/
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
- * @param $form
- * @param $params
+ * @param CRM_Core_Form $form
+ * @param array $params
* @param $activity
*
* @return void
class CRM_Case_Form_Activity_ChangeCaseStatus {
/**
- * @param $form
+ * @param CRM_Core_Form $form
*
* @throws Exception
*/
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
*/
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
static function buildQuickForm(&$form) {
$form->removeElement('status_id');
* @param array $values posted values of the form
*
* @param $files
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array list of errors to be posted back to the form
* @static
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
- * @param $form
- * @param $params
+ * @param CRM_Core_Form $form
+ * @param array $params
*
* @return void
*/
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
- * @param $form
- * @param $params
+ * @param CRM_Core_Form $form
+ * @param array $params
* @param $activity
*
* @return void
class CRM_Case_Form_Activity_ChangeCaseType {
/**
- * @param $form
+ * @param CRM_Core_Form $form
*
* @throws Exception
*/
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
*/
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
static function buildQuickForm(&$form) {
$form->removeElement('status_id');
* @param array $values posted values of the form
*
* @param $files
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array list of errors to be posted back to the form
* @static
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
- * @param $form
- * @param $params
+ * @param CRM_Core_Form $form
+ * @param array $params
*
* @return void
*/
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
- * @param $form
- * @param $params
+ * @param CRM_Core_Form $form
+ * @param array $params
* @param $activity
*
* @return void
*/
class CRM_Case_Form_Activity_LinkCases {
/**
- * @param $form
+ * @param CRM_Core_Form $form
*
* @throws Exception
*/
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
*/
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
static function buildQuickForm(&$form) {
$form->add('text', 'link_to_case_id', ts('Link To Case'), array('class' => 'huge'), TRUE);
* @param array $values posted values of the form
*
* @param $files
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array list of errors to be posted back to the form
* @static
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
- * @param $form
- * @param $params
+ * @param CRM_Core_Form $form
+ * @param array $params
*
* @return void
*/
static function beginPostProcess(&$form, &$params) {}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
- * @param $form
- * @param $params
+ * @param CRM_Core_Form $form
+ * @param array $params
* @param $activity
*
* @return void
public $_contactID;
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
static function preProcess(&$form) {
//get multi client case configuration
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
*/
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
- * @param $form
- * @param $params
+ * @param CRM_Core_Form $form
+ * @param array $params
*
* @return void
*/
*
* @param $fields
* @param $files
- * @param $form
- *
- * @internal param array $values posted values of the form
+ * @param CRM_Core_Form $form
*
* @return array list of errors to be posted back to the form
* @static
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
* @param $form
- * @param $params
+ * @param array $params
*
* @return void
*/
class CRM_Case_Form_ActivityChangeStatus extends CRM_Core_Form {
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Case_Form_ActivityView extends CRM_Core_Form {
/**
- * Function to process the view
+ * process the view
*
* @access public
*
public $_caseTypeId = NULL;
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
* @param array $values posted values of the form
*
* @param $files
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array list of errors to be posted back to the form
* @static
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
*
*/
class CRM_Case_Form_CaseView extends CRM_Core_Form {
- /*
- * check for merge cases.
- */
-
+ /**
+ * check for merge cases.
+ * @var bool
+ */
private $_mergeCases = FALSE;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
/**
* @param $vals
* @param $rule
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array
*/
public $_report = NULL;
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
*
* @param array $fields posted values of the form
*
- * @internal param array $errors list of errors to be posted back to the form
- *
* @return void
* @static
* @access public
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param bool $useTable
*/
static function preProcessCommon(&$form, $useTable = FALSE) {
* the form with a customized title for the main Submit
*
* @param string $title title of the main button
- * @param string $nextType
+ * @param string $nextType button type for the form after processing
* @param string $backType
* @param bool $submitOnce
*
- * @internal param string $type button type for the form after processing
- *
* @return void
* @access public
*/
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form - it consists of
+ * Build the form object - it consists of
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
function preProcess() {}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to delete relationships specific to case and relationship type
+ * delete relationships specific to case and relationship type
*/
static function deleteCaseRoles() {
$caseId = CRM_Utils_Type::escape($_POST['case_id'], 'Integer');
$this->_query->_distinctComponentClause = " civicrm_case.id ";
$this->_query->_groupByComponentClause = " GROUP BY civicrm_case.id ";
}
- //end of constructor
/**
* This method returns the links that are given for each search row.
return $actionLinks;
}
- //end of function
/**
* getter for array of the parameters required for creating pager.
*
* @param $action
- * @param $params
+ * @param array $params
*
- * @internal param $
* @access public
*/
function getPagerParams($action, &$params) {
$params['buttonTop'] = 'PagerTopButton';
$params['buttonBottom'] = 'PagerBottomButton';
}
- //end of function
/**
* Returns total number of rows for the query.
}
/**
- *
* @return array $qill which contains an array of strings
* @access public
*/
return ts('Case Search');
}
}
-//end of class
class CRM_Case_XMLProcessor_Process extends CRM_Case_XMLProcessor {
/**
* @param $caseType
- * @param $params
+ * @param array $params
*
* @throws Exception
*/
/**
* @param $xml
- * @param $params
+ * @param array $params
*
* @throws Exception
*/
/**
* @param $activitySetXML
- * @param $params
+ * @param array $params
*/
function processStandardTimeline($activitySetXML, &$params) {
if ('Change Case Type' == CRM_Utils_Array::value('activityTypeName', $params)
/**
* @param $activitySetXML
- * @param $params
+ * @param array $params
*/
function processActivitySet($activitySetXML, &$params) {
foreach ($activitySetXML->ActivityTypes as $activityTypesXML) {
/**
* @param $relationshipTypeName
- * @param $params
+ * @param array $params
*
* @return bool
* @throws Exception
}
/**
- * @param $params
+ * @param array $params
*
* @return bool
*/
}
/**
- * @param $params
+ * @param array $params
*/
function deleteEmptyActivity(&$params) {
$activityContacts = CRM_Core_OptionGroup::values('activity_contacts', FALSE, FALSE, FALSE, NULL, 'name');
}
/**
- * @param $params
+ * @param array $params
*
* @return bool
*/
/**
* @param $activityTypeXML
- * @param $params
+ * @param array $params
*
* @return bool
* @throws CRM_Core_Exception
* @param $clientID
* @param $caseID
* @param $activitySetName
- * @param $params
+ * @param array $params
*
* @return mixed
*/
*
* @return mixed
*/
- private function redact($string, $printReport = FALSE, $replaceString = array(
- )) {
+ private function redact($string, $printReport = FALSE, $replaceString = array()) {
if ($printReport) {
return CRM_Utils_String::redaction($string, $replaceString);
}
* @param $clientID
* @param $caseID
* @param $activitySetName
- * @param $params
- * @param $form
+ * @param array $params
+ * @param CRM_Core_Form $form
*
* @return mixed
*/
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return object CRM_Contact_BAO_Contact object
+ * @return CRM_Contact_BAO_Contact object
* @access public
* @static
*/
}
/**
- * Function to create contact
+ * create contact
* takes an associative array and creates a contact object and all the associated
* derived objects (i.e. individual, location, email, phone etc)
*
* @param bool $skipDelete
*
* @throws Exception
- * @return object CRM_Contact_BAO_Contact object
+ * @return CRM_Contact_BAO_Contact object
* @access public
* @static
*/
}
/**
- *
* Get the values for pseudoconstants for name->value and reverse.
*
* @param array $defaults (reference) the default values, some of which need to be resolved.
}
/**
- * 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 name / value pairs
* in a hierarchical manner
* @param boolean $microformat for location in microformat
*
- * @return object CRM_Contact_BAO_Contact object
+ * @return CRM_Contact_BAO_Contact object
* @access public
* @static
*/
}
/**
- * function to get the display name of a contact
+ * get the display name of a contact
*
* @param int $id id of the contact
*
}
/**
- * function to delete the image of a contact
+ * delete the image of a contact
*
* @param int $id id of the contact
*
}
/**
- * function to return relative path
+ * Return relative path
* @todo make this a method of $config->userSystem (i.e. UF classes) rather than a static function
*
- * @param $absolutePath
- *
- * @internal param String $absPath absolute path
+ * @param string $absolutePath absolute path
*
* @return String $relativePath Relative url of uploaded image
*/
}
/**
- * function to validate type of contact image
+ * Validate type of contact image
*
- * @param $params
+ * @param array $params
* @param String $imageIndex index of image field
- *
* @param String $statusMsg status message to be set after operation
- *
- * @param string $opType
- *
- * @internal param Array $param array of contact/profile field to be edited/added
- *
- * @opType String $opType type of operation like fatal, bounce etc
+ * @param string $opType type of operation like fatal, bounce etc
*
* @return boolean true if valid image extension
*/
* @param $fields
* @param int $contactId contact id
*
- * @internal param array $properties a flat return properties name value array
* @return array a hierarchical property tree if appropriate
* @access public
* @static
/**
* function to add/edit/register contacts through profile.
*
- * @params array $params Array of profile fields to be edited/added.
- * @params int $contactID contact_id of the contact to be edited/added.
- * @params array $fields array of fields from UFGroup
- * @params int $addToGroupID specifies the default group to which contact is added.
- * @params int $ufGroupId uf group id (profile id)
- * @param $params
- * @param $fields
- * @param null $contactID
- * @param null $addToGroupID
- * @param null $ufGroupId
- * @param string $ctype contact type
- * @param boolean $visibility basically lets us know where this request is coming from
+ * @param array $params Array of profile fields to be edited/added.
+ * @param array $fields Array of fields from UFGroup
+ * @param int $contactID id of the contact to be edited/added.
+ * @param int $addToGroupID specifies the default group to which contact is added.
+ * @param int $ufGroupId uf group id (profile id)
+ * @param ctype
+ * @param boolean $visibility basically lets us know where this request is coming from
* if via a profile from web, we restrict what groups are changed
*
- * @return int contact id created/edited
+ * @return int contact id created/edited
* @static
* @access public
*/
}
/**
- * @param $params
+ * @param array $params
* @param $fields
* @param null $contactID
* @param null $ufGroupId
class CRM_Contact_BAO_Contact_Location {
/**
- * function to get the display name, primary email, location type and location id of a contact
+ * get the display name, primary email, location type and location id of a contact
*
* @param int $id id of the contact
*
}
/**
- * function to get the sms number and display name of a contact
+ * get the sms number and display name of a contact
*
* @param int $id id of the contact
*
}
/**
- * function to get the information to map a contact
+ * get the information to map a contact
*
* @param array $ids the list of ids for which we want map info
* $param int $locationTypeID
/**
* fill the acl contact cache for this contact id if empty
*
- * @param $userID
+ * @param int $userID
* @param int|string $type the type of operation (view|edit)
* @param boolean $force should we force a recompute
*
- * @internal param int $id contact id
* @return void
* @access public
* @static
}
/**
- * Function to check if there are any contacts in cache table
+ * check if there are any contacts in cache table
*
* @param int|string $type the type of operation (view|edit)
* @param int $contactID contact id
}
/**
- * Function to get the permission base on its relationship
+ * get the permission base on its relationship
*
- * @param $selectedContactID
- * @param null $contactID
- *
- * @internal param int $selectedContactId contact id of selected contact
- * @internal param int $contactId contact id of the current contact
+ * @param int $selectedContactID contact id of selected contact
+ * @param int $contactID contact id of the current contact
*
- * @return booleab true if logged in user has permission to view
- * selected contact record else false
+ * @return bool true if logged in user has permission to view
+ * selected contact record else false
* @static
*/
static function relationship($selectedContactID, $contactID = NULL) {
/**
* @param $contactID
- * @param $form
+ * @param CRM_Core_Form $form
* @param bool $redirect
*
* @return bool
/**
* @param $contactID
- * @param $form
+ * @param CRM_Core_Form $form
* @param bool $redirect
*
* @return bool
}
/**
- * Function to get the count of contact loctions
+ * get the count of contact loctions
*
* @param int $contactId contact id
*
*
* @param int $contactID contact id of the individual
* @param $organization (id or name)
- * @param null $previousEmployerID
- *
- * @internal param string $organization it can be name or id of organization
+ * @param int $previousEmployerID
+ * @param bool $newContact
*
* @access public
* @static
}
/**
- * Function to set current employer id and organization name
+ * set current employer id and organization name
*
* @param array $currentEmployerParams associated array of contact id and its employer id
*
}
/**
- * Function to update cached current employer name
+ * update cached current employer name
*
* @param int $organizationId current employer id
*
/**
* Function to build form for related contacts / on behalf of organization.
*
- * @param $form object invoking Object
+ * @param CRM_Core_Form $form
* @param $contactType string contact type
* @param $countryID
* @param $stateID
* @param $title string fieldset title
*
- * @internal param int $maxLocationBlocks number of location blocks
- *
* @static
*/
static function buildOnBehalfForm(&$form, $contactType, $countryID, $stateID, $title) {
*
* @return array $contactDetails array of contact info.@static
*/
- static function contactDetails($componentIds, $componentName, $returnProperties = array(
- )) {
+ static function contactDetails($componentIds, $componentName, $returnProperties = array()) {
$contactDetails = array();
if (empty($componentIds) ||
!in_array($componentName, array('CiviContribute', 'CiviMember', 'CiviEvent', 'Activity'))
}
/**
- * @param $params
+ * @param array $params
*
* @throws Exception
*/
class CRM_Contact_BAO_ContactType extends CRM_Contact_DAO_ContactType {
/**
- * 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
*
- * @return object CRM_Contact_BAO_ContactType object on success, null otherwise
+ * @return CRM_Contact_BAO_ContactType object on success, null otherwise
* @access public
* @static
*/
}
/**
- *
- *function to retrieve basic contact type information.
+ * Retrieve basic contact type information.
*
* @param bool $all
*
}
/**
- *
- *function to retrieve all basic contact types.
+ * Retrieve all basic contact types.
*
* @param bool $all
*
}
/**
- *
- *function to retrieve all subtypes Information.
+ * Retrieve all subtypes Information.
*
* @param array $contactType .
* @param bool $all
/**
*
- *function to retrieve all subtypes
+ * retrieve all subtypes
*
* @param array $contactType .
* @param bool $all
/**
*
- *function to retrieve subtype pairs with name as 'subtype-name' and 'label' as value
+ * retrieve subtype pairs with name as 'subtype-name' and 'label' as value
*
* @param array $contactType .
* @param bool $all
/**
*
- *function to retrieve list of all types i.e basic + subtypes.
+ * retrieve list of all types i.e basic + subtypes.
*
* @param bool $all
*
/**
*
- *function to retrieve info array about all types i.e basic + subtypes.
+ * retrieve info array about all types i.e basic + subtypes.
*
* @param bool $all
* @param bool $reset
}
/**
- *
- *function to retrieve basic type pairs with name as 'built-in name' and 'label' as value
+ * Retrieve basic type pairs with name as 'built-in name' and 'label' as value
*
* @param bool $all
* @param null $typeName
* @param null $delimiter
*
- * @internal param array $contactType .
- * @return list of basictypes with name as 'built-in name' and 'label' as value
+ * @return array of basictypes with name as 'built-in name' and 'label' as value
* @static
*/
static function contactTypePairs($all = FALSE, $typeName = NULL, $delimiter = NULL) {
}
/**
- * function to check if a given type is a subtype
+ * check if a given type is a subtype
*
* @param string $subType contact subType.
* @param bool $ignoreCache
}
/**
- *function to retrieve the basic contact type associated with
- *given subType.
+ * retrieve the basic contact type associated with given subType.
*
*@param array/string $subType contact subType.
*@return array/string of basicTypes.
}
/**
+ * Suppress all subtypes present in given array.
*
- *function to suppress all subtypes present in given array.
- *
- * @param $subTypes
+ * @param array $subTypes contact subTypes
* @param bool $ignoreCache
*
- * @internal param array $subType contact subType.
- * @return array of suppresssubTypes .
+ * @return array of suppressed subTypes.
* @static
*/
static function suppressSubTypes(&$subTypes, $ignoreCache = FALSE) {
}
/**
- *
- *function to verify if a given subtype is associated with a given basic contact type.
+ * verify if a given subtype is associated with a given basic contact type.
*
* @param string $subType contact subType
* @param string $contactType contact Type
}
/**
+ * create shortcuts menu for contactTypes
*
- *function to create shortcuts menu for contactTypes
- *
- *@return array of contactTypes
- *@static
- *
+ * @return array of contactTypes
+ * @static
*/
static function getCreateNewList() {
$shortCuts = array();
}
/**
- * Function to delete Contact SubTypes
+ * delete Contact SubTypes
*
* @param int $contactTypeId ID of the Contact Subtype to be deleted.
*
*
* @return array
*/
- static function getSubtypeCustomPair($contactType, $subtypeSet = array(
- )) {
+ static function getSubtypeCustomPair($contactType, $subtypeSet = array()) {
if (empty($subtypeSet)) {
return $subtypeSet;
}
*/
/**
- *
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2014
* $Id$
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
- * @return object CRM_Contact_BAO_Group object
+ * @return CRM_Contact_BAO_Group object
* @access public
* @static
*/
}
/**
- * Function to delete the group and all the object that connect to
+ * delete the group and all the object that connect to
* this group. Incredibly destructive
*
* @param int $id group id
* @param $groupID
* @param bool $useCache
*
- * @internal param int $lngGroupId this is group id
- *
- * @return array $aMembers this arrray contains the list of members for this group id
+ * @return array $aMembers this array contains the list of members for this group id
* @access public
* @static
*/
/**
* Returns array of group object(s) matching a set of one or Group properties.
*
- * @param null $params
+ * @param array $params Limits the set of groups returned.
* @param array $returnProperties Which properties should be included in the returned group objects.
* (member_count should be last element.)
*
* @param null $offset
* @param null $rowCount
*
- * @internal param array $param Array of one or more valid property_name=>value pairs.
- * Limits the set of groups returned.
- * @return An array of group objects.
+ * @return array of group objects.
*
* @access public
*
* get permission relevant clauses
* CRM-12209
*
- * @internal param $existingClauses
- *
- * @internal param $clauses
- *
* @param bool $force
*
* @return array
}
/**
- * @param $params
+ * @param array $params
*
* @return null|string
*/
/**
* Generate permissioned where clause for group search
- * @param $params
+ * @param array $params
* @param bool $sortBy
* @param bool $excludeHidden
*
}
/**
- * Function to define action links
+ * define action links
*
* @return array $links array of action links
* @access public
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return object CRM_Contact_BAO_Group object
+ * @return CRM_Contact_BAO_Group object
* @access public
* @static
*/
* @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
* @static
}
/**
- * Function to get list of all the groups and groups for a contact
+ * get list of all the groups and groups for a contact
*
* @param int $contactId contact id
*
}
/**
- * Function to get the list of groups for contact based on status of group membership
+ * get the list of groups for contact based on status of group membership
*
* @param int $contactId contact id
* @param string $status state of membership
/**
* Given an array of contact ids, add all the contacts to the group
*
- * @param $contactIDs
- * @param $groupID
+ * @param array $contactIDs the array of contact ids to be added
+ * @param int $groupID the id of the group
* @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
* Check to see if we have cache entries for this group
* if not, regenerate, else return
*
- * @param $groupIDs
- *
- * @internal param int $groupID groupID of group that we are checking against
+ * @param $groupIDs of group that we are checking against
*
* @return boolean true if we did not regenerate, false if we did
*/
* Adds a new child group identified by $childGroupId to the group
* identified by $groupId
*
- * @param $parentID
- * @param $childID
+ * @param int $parentID id of the group to add the child to
+ * @param int $childID id of the new child group
*
- * @internal param \The $groupId id of the group to add the child to
- * @internal param \The $childGroupId id of the new child group
- *
- * @return void
*
+ * @return void
* @access public
*/
static function add($parentID, $childID) {
* identified by $groupId; does not delete child group, just the
* association between the two
*
- * @param $childID The id of the child group being removed
+ * @param int $childID The id of the child group being removed
*
- * @internal param \The $parentID id of the group to remove the child from
* @return void
*
* @access public
/**
* Method to check group organization relationship exist
*
- * @param $contactID
- *
- * @internal param int $contactId
+ * @param int $contactID
*
* @return boolean
* @access public
}
/**
- * Function to delete Group Organization
+ * delete Group Organization
*
* @param int $groupOrganizationID group organization id that needs to be deleted
*
}
/**
- * function to update the household with primary contact id
+ * update the household with primary contact id
*
* @param integer $primaryContactId null if deleting primary contact
* @param integer $contactId contact id
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $contact contact object
*
- * @return object CRM_Contact_BAO_Contact object
+ * @return CRM_Contact_BAO_Contact object
* @access public
* @static
*/
/**
* Given a result dao, extract the values and return that array
*
- * @param Object $dao
+ * @param CRM_Core_DAO $dao
*
* @return array values for this query
*/
* @param string $sort
* @param int $offset
* @param int $row_count
- * @param bool $smartGroupCache
+ * @param bool $smartGroupCache ?? update smart group cache?
* @param bool $count return count obnly
* @param bool $skipPermissions Should permissions be ignored or should the logged in user's permissions be applied
*
- * @params bool $smartGroupCache ?? update smart group cache?
*
* @return array
* @access public
* @param $op string the sql operator, this function should handle ALL SQL operators
* @param $value string|integer|array depends on the operator and who's calling the query builder
* @param $grouping int the index where to place the where clause
- * @param $selectValues
+ * @param $selectValues the key value pairs for this element. This allows us to use this function for things besides option-value pairs
* @param $field array an array that contains various properties of the field identified by $name
* @param $label string The label for this field element
* @param $dataType string The data type for this element
- *
* @param bool $useIDsOnly
*
- * @internal param array $selectValue the key value pairs for this element. This allows us to use this function for things besides option-value pairs
* @return void adds the where clause and qill to the query object
*/
function optionValueQuery(
}
/**
- * function to check and explode a user defined numeric string into an array
+ * check and explode a user defined numeric string into an array
* this was the protocol used by search builder in the old old days before we had
* super nice js widgets to do the hard work
*
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param $type
*/
public function buildAdvancedSearchPaneForm(&$form, $type) {
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param $type
*
* @return null
* per http://wiki.civicrm.org/confluence/display/CRM/Database+layer
* "we are moving away from the $ids param "
*
- * @return object CRM_Contact_BAO_Relationship object
+ * @return CRM_Contact_BAO_Relationship object
* @access public
* @static
*/
* @param integer $contactId this is contact id for adding relationship
* @param array $ids the array that holds all the db ids
*
- * @return object CRM_Contact_BAO_Relationship
+ * @return CRM_Contact_BAO_Relationship
* @access public
* @static
*/
}
/**
- * Function to get get list of relationship type based on the contact type.
+ * get get list of relationship type based on the contact type.
*
* @param int $contactId this is the contact id of the current contact.
* @param null $contactSuffix
* @param string $contactType contact type
* @param boolean $all if true returns relationship types in both the direction
* @param string $column name/label that going to retrieve from db.
- *
- *
* @param bool $biDirectional
* @param string $contactSubType includes relationshiptypes between this subtype
- *
* @param boolean $onlySubTypeRelationTypes if set only subtype which is passed by $contactSubType
* related relationshiptypes get return
*
- * @internal param string $strContact this value is currently ignored, keeping it there for legacy reasons
* @access public
* @static
*
}
/**
- * Function to delete the relationship
+ * delete the relationship
*
* @param int $id relationship id
*
}
/**
- * Function to disable/enable the relationship
+ * disable/enable the relationship
*
* @param int $id relationship id
*
*
* @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
}
/**
- * 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
*
- * @return object CRM_Contact_BAO_RelationshipType object
+ * @return CRM_Contact_BAO_RelationshipType object
* @access public
* @static
*/
}
/**
- * Function to add the relationship type in the db
+ * add the relationship type in the db
*
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $ids the array that holds all the db ids
*
- * @return object CRM_Contact_DAO_RelationshipType
+ * @return CRM_Contact_DAO_RelationshipType
* @access public
* @static
*
}
/**
- * Function to delete Relationship Types
+ * delete Relationship Types
*
* @param int $relationshipTypeId
*
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
- * @return object CRM_Contact_BAO_SavedSearch
+ * @return CRM_Contact_BAO_SavedSearch
* @access public
* @static
*/
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to that checks for duplicate contacts
+ * that checks for duplicate contacts
*
* @param array $fields fields array which are submitted
* @param $errors
* @param int $contactID contact id
* @param string $contactType contact type
*
- * @internal param array $error error message array
*/
static function checkDuplicateContacts(&$fields, &$errors, $contactID, $contactType) {
// if this is a forced save, ignore find duplicate rule
* @return string
* @access public
*/
- /**
- * @return string
- */
function getTemplateFileName() {
if ($this->_contactSubType) {
$templateFile = "CRM/Contact/Form/Edit/SubType/{$this->_contactSubType}.tpl";
* This function either parse street address in to child
* elements or build street address from child elements.
*
- * @params $params an array of key value consist of address blocks.
- *
- * @param $params
+ * @param $params array of key value consist of address blocks.
*
* @return array $parseSuccess as array of sucess/fails for each address block@static
*/
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
public $_defaults;
/**
- * Function to pre processing
+ * pre processing
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
protected $_rgid;
/**
- * Function to pre processing
+ * pre processing
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. MobileProvider that in edit/view mode
+ * Set default values for the form. MobileProvider that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/*
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
/**
* build form for address input fields
*
- * @param object $form - CRM_Core_Form (or subclass)
+ * @param CRM_Core_Form $form
* @param int $addressBlockCount - the index of the address array (if multiple addresses on a page)
* @param boolean $sharing - false, if we want to skip the address sharing features
* @param boolean $inlineEdit true when edit used in inline edit
* @param $files
* @param $self
*
- * @internal param \reference $array $fields - submitted form values.
- * @internal param \reference $array $errors - if any errors found add to this array. please.
- *
- * @return true if no errors
- * array of errors if any present.
+ * @return array|bool if no errors
*
* @access public
* @static
}
/**
- * function to set default values for address block
+ * set default values for address block
*
* @param array $defaults defaults associated array
- * @param object $form form object
+ * @param CRM_Core_Form $form form object
*
* @static
* @access public
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param $groupTree
*/
static function storeRequiredCustomDataInfo(&$form, $groupTree) {
static $greetings = array();
/**
- * build the form elements for Communication Preferences object
+ * Build the form object elements for Communication Preferences object
*
* @param CRM_Core_Form $form reference to the form object
*
* @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
* @static
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
* @param $defaults
*
* @return void
/**
* build all the data structures needed to build the form
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
* @access public
}
/**
- * build the form elements for CustomData object
+ * Build the form object elements for CustomData object
*
* @param CRM_Core_Form $form reference to the form object
*
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
* @param $defaults
*
* @return void
class CRM_Contact_Form_Edit_Demographics {
/**
- * build the form elements for Demographics object
+ * Build the form object elements for Demographics object
*
* @param CRM_Core_Form $form reference to the form object
*
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
* @param $defaults
*
* @return void
class CRM_Contact_Form_Edit_Email {
/**
- * build the form elements for an email object
+ * Build the form object elements for an email object
*
* @param CRM_Core_Form $form reference to the form object
* @param int $blockCount block number to build
*/
class CRM_Contact_Form_Edit_Household {
- /**
+ /**
* This function provides the HTML form elements that are specific
* to the Household Contact Type
*
- * @param object $form form object
+ * @param CRM_Core_Form $form form object
* @param int $inlineEditMode ( 1 for contact summary
* top bar form and 2 for display name edit )
*
/**
* add rule for household
*
- * @params array $fields array of form values
- *
- * @param $fields
- * @param $files
- * @param null $contactID
+ * @param array $fields array of form values
+ * @param array $files - unused
+ * @param int $contactID
*
* @return array|bool $error@static
* @public
class CRM_Contact_Form_Edit_IM {
/**
- * build the form elements for an IM object
+ * Build the form object elements for an IM object
*
* @param CRM_Core_Form $form reference to the form object
* @param int $blockCount block number to build
* @param array $files the uploaded files if any
* @param null $contactID
*
- * @internal param array $options additional user data
- *
* @return true if no errors, else array of errors
* @access public
* @static
class CRM_Contact_Form_Edit_Lock {
/**
- * This function provides the HTML form elements
+ * Build the form object
*
- * @param object $form form object
- *
- * @internal param int $inlineEditMode ( 1 for contact summary
- * top bar form and 2 for display name edit )
+ * @param CRM_Core_Form $form form object
*
* @access public
* @return void
* @param array $files the uploaded files if any
* @param null $contactID
*
- * @internal param array $options additional user data
- *
* @return true if no errors, else array of errors
* @access public
* @static
class CRM_Contact_Form_Edit_OpenID {
/**
- * build the form elements for an open id object
+ * Build the form object elements for an open id object
*
* @param CRM_Core_Form $form reference to the form object
* @param int $blockCount block number to build
* This function provides the HTML form elements that are specific
* to the Organization Contact Type
*
- * @param object $form form object
+ * @param CRM_Core_Form $form form object
* @param int $inlineEditMode ( 1 for contact summary
* top bar form and 2 for display name edit )
*
class CRM_Contact_Form_Edit_Phone {
/**
- * build the form elements for a phone object
+ * Build the form object elements for a phone object
*
* @param CRM_Core_Form $form reference to the form object
* @param int $addressBlockCount block number to build
* This function is to build form elements
* params object $form object of the form
*
- * @param Object $form the form object that we are operating on
+ * @param CRM_Core_Form $form the form object that we are operating on
* @param int $contactId contact id
* @param int $type what components are we interested in
* @param boolean $visibility visibility of the field
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
* @param $defaults
*
* @return void
class CRM_Contact_Form_Edit_Website {
/**
- * build the form elements for an Website object
+ * Build the form object elements for an Website object
*
* @param CRM_Core_Form $form reference to the form object
* @param int $blockCount block number to build
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- *
* @access public
*
* @return void
CRM_Core_Session::setStatus(ts("Contact has been added to '%1'.", array(1 => $groups[$groupId])), ts('Added to Group'), 'success');
}
}
- //end of function
}
}
/**
- * build the form elements for an address object
+ * Build the form object elements for an address object
*
* @return void
* @access public
class CRM_Contact_Form_Inline_CommunicationPreferences extends CRM_Contact_Form_Inline {
/**
- * build the form elements for communication preferences
+ * Build the form object elements for communication preferences
*
* @return void
* @access public
class CRM_Contact_Form_Inline_ContactInfo extends CRM_Contact_Form_Inline {
/**
- * build the form elements
+ * Build the form object elements
*
* @return void
* @access public
class CRM_Contact_Form_Inline_ContactName extends CRM_Contact_Form_Inline {
/**
- * build the form elements
+ * Build the form object elements
*
* @return void
* @access public
}
/**
- * build the form elements for custom data
+ * Build the form object elements for custom data
*
* @return void
* @access public
class CRM_Contact_Form_Inline_Demographics extends CRM_Contact_Form_Inline {
/**
- * build the form elements
+ * Build the form object elements
*
* @return void
* @access public
}
/**
- * build the form elements for an email object
+ * Build the form object elements for an email object
*
* @return void
* @access public
}
/**
- * build the form elements for im object
+ * Build the form object elements for im object
*
* @return void
* @access public
/**
* This function provides the HTML form elements
*
- * @param object $form form object
- * @param $contactID
- *
- * @internal param int $inlineEditMode ( 1 for contact summary
- * top bar form and 2 for display name edit )
+ * @param CRM_Core_Form $form form object
+ * @param int $contactID
*
* @access public
* @return void
* @param array $files the uploaded files if any
* @param null $contactID
*
- * @internal param array $options additional user data
- *
* @return true if no errors, else array of errors
* @access public
* @static
}
/**
- * build the form elements for openID object
+ * Build the form object elements for openID object
*
* @return void
* @access public
}
/**
- * build the form elements for phone object
+ * Build the form object elements for phone object
*
* @return void
* @access public
}
/**
- * build the form elements for website object
+ * Build the form object elements for website object
*
* @return void
* @access public
class CRM_Contact_Form_Location {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
*/
}
/**
- * Function to build the form
+ * Build the form object
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
* @access public
protected $_mode;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
* @access public
}
/**
- * Function to build form for honoree contact / on behalf of organization.
- *
- * @param $form object invoking Object
+ * build form for honoree contact / on behalf of organization.
*
- * @internal param string $contactType contact type
- * @internal param string $title fieldset title
+ * @param CRM_Core_Form $form
*
* @static
*/
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. Relationship that in edit/view mode
+ * Set default values for the form. Relationship that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * function for date validation
+ * date validation
*
* @param array $params (reference ) an assoc array of name/value pairs
*
*/
protected $_ufGroupID;
- /*
- * csv - common search values
- *
- * @var array
- * @access protected
- * @static
- */
-
+ /**
+ * csv - common search values
+ *
+ * @var array
+ * @access protected
+ * @static
+ */
static $csv = array('contact_type', 'group', 'tag');
/**
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
static $csv = array('contact_type', 'group', 'tag');
/**
- * Build the form
+ * Build the form object
*
* @access public
*
public $_blockCount;
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
* @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
* @access public
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
static function activity(&$form) {
$form->add('hidden', 'hidden_activity', 1);
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
static function changeLog(&$form) {
$form->add('hidden', 'hidden_changeLog', 1);
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
static function task(&$form) {
$form->add('hidden', 'hidden_task', 1);
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
function buildForm(&$form) {
ON assignment.contact_id = contact_c.id ";
}
- /*
- * WHERE clause is an array built from any required JOINS plus conditional filters based on search criteria field values
- *
- */
/**
+ * WHERE clause is an array built from any required JOINS plus conditional filters based on search criteria field values
+ *
* @param bool $includeContactIDs
*
* @return string
/**
* @param $where
- * @param $params
+ * @param array $params
*
* @return string
*/
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
function buildForm(&$form) {
//@todo FIXME - using the CRM_Core_DAO::VALUE_SEPARATOR creates invalid html - if you can find the form
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
function buildForm(&$form) {
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
function buildForm(&$form) {
}
/*
- * Functions below generally don't need to be modified
- */
+ * Functions below generally don't need to be modified
+ */
function count() {
$sql = $this->all();
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
function buildForm(&$form) {
$form->assign('elements', array('sort_name', 'state_province_id'));
}
- /*
- * Set search form field defaults here.
- */
/**
+ * Set search form field defaults here.
+ *
* @return array
*/
function setDefaultValues() {
$sql .= "ORDER BY sort_name asc";
}
- /* Uncomment the next 2 lines to see the exact query you're generating */
-
- // CRM_Core_Error::debug('sql',$sql);
- // exit();
-
return $sql;
}
";
}
- /*
- * WHERE clause is an array built from any required JOINS plus conditional filters based on search criteria field values
- *
- */
/**
+ * WHERE clause is an array built from any required JOINS plus conditional filters based on search criteria field values
+ *
* @param bool $includeContactIDs
*
* @return string
}
/*
- * Functions below generally don't need to be modified
- */
+ * Functions below generally don't need to be modified
+ */
function count() {
$sql = $this->all();
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
function buildForm(&$form) {
$rowcount = CRM_Utils_Type::escape($rowcount, 'Int');
$sql .= " LIMIT $offset, $rowcount ";
}
-
- // Uncomment the next line to see the actual SQL generated:
- //CRM_Core_Error::debug('sql',$sql); exit();
return $sql;
}
( civicrm_option_value.value = civicrm_event.event_type_id AND civicrm_option_value.option_group_id = 14)";
}
- /*
- * WHERE clause is an array built from any required JOINS plus conditional filters based on search criteria field values
- *
- */
/**
+ * WHERE clause is an array built from any required JOINS plus conditional filters based on search criteria field values
+ *
* @param bool $includeContactIDs
*
* @return string
WHERE $where
";
- //CRM_Core_Error::debug('sql',$sql);
$dao = CRM_Core_DAO::executeQuery($sql,
CRM_Core_DAO::$_nullArray
);
}
/*
- * Functions below generally don't need to be modified
- */
+ * Functions below generally don't need to be modified
+ */
function count() {
$sql = $this->all();
}
/*
- * Functions below generally don't need to be modified
- */
+ * Functions below generally don't need to be modified
+ */
/**
* @return mixed
*/
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
function buildForm(&$form) {
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
function buildForm(&$form) {
$groups = array('' => ts('- select group -')) + CRM_Core_PseudoConstant::nestedGroup(FALSE);
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*
* @throws Exception
*/
$totalSize = $dao->N;
$multiplier = substr($this->_segmentSize, 0, strlen($this->_segmentSize) - 1);
$multiplier /= 100;
- //CRM_Core_Error::debug( "Total size: $totalSize<br/>Multiplier: $multiplier<br/>");
$this->_segmentSize = round($totalSize * $multiplier);
}
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
function buildForm(&$form) {
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
function buildForm(&$form) {
/*
- * Functions below generally don't need to be modified
- */
+ * Functions below generally don't need to be modified
+ */
/**
* @return mixed
*/
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
function buildForm(&$form) {
$form->add('text',
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param bool $useTable
*/
static function preProcessCommon(&$form, $useTable = FALSE) {
}
/**
- * Function to get the contact id for custom search
+ * get the contact id for custom search
* we are not using prev/next table incase of custom search
*/
public function getContactIds() {
/**
- * This function sets the default values for the form. Relationship that in edit/view action
+ * Set default values for the form. Relationship that in edit/view action
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
public function postProcess() {
}
- //end of function
-
/**
* simple shell that derived classes can call to add buttons to
* the form with a customized title for the main Submit
*
* @param string $title title of the main button
- * @param string $nextType
+ * @param string $nextType button type for the form after processing
* @param string $backType
* @param bool $submitOnce
*
- * @internal param string $type button type for the form after processing
- *
* @return void
* @access public
*/
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
/**
* global validation rules for the form
*
- * @param $params
- *
- * @internal param array $fields posted values of the form
+ * @param array $params
*
* @return array list of errors to be posted back to the form
* @static
CRM_Core_Session::singleton()->pushUserContext(CRM_Utils_System::url('civicrm/group/search', "reset=1&force=1&context=smog&gid=$groupID"));
}
}
- //end of function
}
class CRM_Contact_Form_Task_AddToHousehold extends CRM_Contact_Form_Task {
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Function to build the form
+ * Build the form object
*
* @access public
*
/**
* This function is to get the result of the search for Add to * forms
*
- * @param $form
+ * @param CRM_Core_Form $form
* @param array $params This contains elements for search criteria
*
* @access public
class CRM_Contact_Form_Task_AddToOrganization extends CRM_Contact_Form_Task {
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Function to build the form
+ * Build the form object
*
* @access public
*
protected $_tags;
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param $rule
*
* @return array
}
}
- //end of function
}
class CRM_Contact_Form_Task_AlterPreferences extends CRM_Contact_Form_Task {
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param $rule
*
* @return array
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
CRM_Core_Session::setStatus(ts('Contact Subtype field of 1 contact has not been updated.', array('plural' => 'Contact Subtype field of %count contacts has not been updated.', 'count' => $inValidSubtypeCnt)), ts('Invalid Subtype'));
}
}
- //end of function
/**
* parse street address
* @param array $contactValues contact values
- * @param object $form form object
+ * @param CRM_Core_Form $form form object
*/
public static function parseStreetAddress(&$contactValues, &$form) {
if (!is_array($contactValues) || !is_array($form->_fields)) {
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
$session->replaceUserContext(CRM_Utils_System::url($urlString, $urlParams));
}
}
- //end of function
}
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
*/
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
*/
}
}
}
- //end of function
}
}
/**
- * Build the form - it consists of
+ * Build the form object - it consists of
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @param null
*
return FALSE;
}
/**
- * function to create labels (pdf)
+ * create labels (pdf)
*
* @param array $contactRows assciated array of contact data
* @param string $format format in which labels needs to be printed
}
/**
- * function to create the array of returnProperties
+ * create the array of returnProperties
*
* @param string $format format for which return properties build
*
return FALSE;
}
/**
- * function to create labels (pdf)
+ * create labels (pdf)
*
* @param array $contactRows assciated array of contact data
* @param string $format format in which labels needs to be printed
/**
- * function to get the rows for the labels
+ * get the rows for the labels
*
* @param $contactIDs
* @param integer $locationTypeID
* @param boolean $respectDoNotMail
* @param $mergeSameAddress
- * @param $mergeSameHousehold
+ * @param bool $mergeSameHousehold UNUSED
*
- * @internal param array $contactIds Contact IDS to do labels for
* @return array of rows for labels
* @access public
*/
}
/**
- * function to extract the return properties from the mailing format
+ * extract the return properties from the mailing format
* @todo I'm placing bets this is a duplicate of code elsewhere - find & merge
* @param unknown_type $format
* @return multitype:number
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
* @return void
*/
public function postProcess() {}
- //end of function
/**
* assign smarty variables to the template that will be used by google api to plot the contacts
*
* @param $ids
* @param int $locationId location_id
- *
* @param $page
* @param $addBreadCrumb
* @param string $type
*
- * @internal param array $contactIds list of contact ids that we need to plot
* @return string the location of the file we have created
* @access protected
*/
}
/**
- * This function sets the default values for the form. Relationship that in edit/view action
+ * Set default values for the form. Relationship that in edit/view action
* the default values are retrieved from the database
*
* @access public
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
/**
* build all the data structures needed to build the form
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
* @access public
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param $cid
*/
static function preProcessSingle(&$form, $cid) {
}
/**
- * Build the form
+ * Build the form object
*
* @var CRM_Core_Form $form
*
*
* @access protected
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array( $categories, $html_message, $messageToken, $returnProperties )
*/
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
*/
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param $html_message
* @param $contactIds
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
// also reset the batch page so it gets new values from the db
$this->controller->resetPage('Batch');
}
- //end of function
}
}
/**
- * Build the form - it consists of
+ * Build the form object - it consists of
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
*
* @param array $fields the input form values
* @param array $files the uploaded files if any
- * @param $form
- *
- * @internal param array $options additional user data
+ * @param CRM_Core_Form $form
*
* @return true if no errors, else array of errors
* @access public
*
* @access protected
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array the default array reference
*/
class CRM_Contact_Form_Task_RemoveFromGroup extends CRM_Contact_Form_Task {
/**
- * Build the form
+ * Build the form object
*
* @access public
*
$status = '<ul><li>' . implode('</li><li>', $status) . '</li></ul>';
CRM_Core_Session::setStatus($status, ts("Removed Contact From Group", array('plural' => "Removed Contacts From Group", 'count' => $removed)), 'success', array('expires' => 0));
}
- //end of function
}
protected $_tags;
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param $rule
*
* @return array
CRM_Core_Session::setStatus($status, ts("Removed Tag <em>%1</em>", array(1 => $this->_tags[$key])), 'success', array('expires' => 0));
}
}
- //end of function
}
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
static function preProcessProvider(&$form) {
$form->_single = FALSE;
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
*/
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
*/
}
/**
- * Build the form - it consists of
+ * Build the form object - it consists of
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
* @access public
class CRM_Contact_Form_Task_Unhold extends CRM_Contact_Form_Task {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- *
* @access public
*
* @return void
private $_dataSourceClass;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Contact_Import_Form_Preview extends CRM_Import_Form_Preview {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Contact_Import_Form_Summary extends CRM_Import_Form_Summary {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * @param $params
+ * @param array $params
*/
public function setJobParams(&$params) {
foreach ($params as $param => $value) {
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param int $timeout
*/
public function runImport(&$form, $timeout = 55) {
class CRM_Contact_Import_Page_AJAX {
/**
- * Function to show import status
+ * show import status
*/
static function status() {
// make sure we get an id
}
/**
- * Function to set IM Service Provider type fields
+ * set IM Service Provider type fields
*
* @param array $elements IM service provider type ids
*
}
/**
- * Function to set IM Service Provider type fields for related contacts
+ * set IM Service Provider type fields for related contacts
*
* @param array $elements IM service provider type ids of related contact
*
}
/**
- * function to format the field values for input to the api
+ * format the field values for input to the api
*
* @return array (reference ) associative array of name/value pairs
* @access public
function &getActiveFieldParams() {
$params = array();
- //CRM_Core_Error::debug( 'Count', $this->_activeFieldCount );
for ($i = 0; $i < $this->_activeFieldCount; $i++) {
if ($this->_activeFields[$i]->_name == 'do_not_import') {
continue;
*
* @param $fileName
* @param array $header
- * @param data $data
+ * @param array $data
*
- * @internal param string $filename
* @return void
* @access public
*/
function fini() {}
/**
- * function to check if an error in custom data
+ * check if an error in custom data
*
- * @param $params
+ * @param array $params
* @param String $errorMessage A string containing all the error-fields.
*
* @param null $csType
}
/**
- * function to check if an error in Core( non-custom fields ) field
+ * check if an error in Core( non-custom fields ) field
*
- * @param $params
+ * @param array $params
* @param String $errorMessage A string containing all the error-fields.
*
* @access public
}
/**
- * function to ckeck a value present or not in a array
+ * ckeck a value present or not in a array
*
* @param $value
* @param $valueArray
/**
* @param $relKey
- * @param $params
+ * @param array $params
*
* @return bool
*/
}
/**
- * Function to fetch PCP ID by PCP Supporter sort_name, also displays PCP title and associated Contribution Page title
+ * fetch PCP ID by PCP Supporter sort_name, also displays PCP title and associated Contribution Page title
*/
static function getPCPList() {
$name = CRM_Utils_Array::value('s', $_GET);
}
/**
- * Function to fetch the custom field help
+ * fetch the custom field help
*/
static function customField() {
$fieldId = CRM_Utils_Type::escape($_REQUEST['id'], 'Integer');
}
/**
- * Function to delete custom value
+ * delete custom value
*
*/
static function deleteCustomValue() {
}
/**
- *Function to check the CMS username
+ * check the CMS username
*
*/
static public function checkUserName() {
*
* @access public
*
- * @internal param object $page - the view page which created this one
- *
* @return void
* @static
*/
/**
* This function is called when action is update
*
- * @param null $groupId
- *
- * @internal param int $groupID group id
+ * @param int $groupId
*
* return null
* @access public
}
/**
- * function to remove/ rejoin the group
+ * remove/ rejoin the group
*
* @param int $groupContactId id of crm_group_contact
* @param string $status this is the status that should be updated.
class CRM_Contact_Page_View_UserDashBoard extends CRM_Core_Page {
public $_contactId = NULL;
- /*
- * always show public groups
- */
-
+ /**
+ * always show public groups
+ * @var bool
+ */
public $_onlyPublicGroups = TRUE;
public $_edit = TRUE;
}
}
- /*
- * Heart of the viewing process. The runner gets all the meta data for
- * the contact and calls the appropriate type of page to view.
- *
- * @return void
- * @access public
- *
- */
+ /**
+ * Heart of the viewing process. The runner gets all the meta data for
+ * the contact and calls the appropriate type of page to view.
+ *
+ * @return void
+ * @access public
+ */
function preProcess() {
if (!$this->_contactId) {
CRM_Core_Error::fatal(ts('You must be logged in to view this page.'));
}
/**
- * Function to build user dashboard
+ * build user dashboard
*
* @return void
* @access public
/**
* This function is called when action is update
*
- * @param null $groupId
- *
- * @internal param int $groupID group id
+ * @param int $groupId
*
* return null
* @access public
$this->_options = &$this->_query->_options;
}
- //end of constructor
/**
* This method returns the links that are given for each search row.
}
return self::$_links;
}
- //end of function
/**
* getter for array of the parameters required for creating pager.
*
* @param $action
- * @param $params
+ * @param array $params
*
- * @internal param $
* @access public
*/
function getPagerParams($action, &$params) {
$params['buttonTop'] = 'PagerTopButton';
$params['buttonBottom'] = 'PagerBottomButton';
}
- //end of function
/**
* @param null $action
}
/**
- * @param $sort
+ * @param CRM_Utils_Sort $sort
*
* @return string
*/
}
/**
- * @param object $sort
+ * @param CRM_Utils_Sort $sort
* @param string $cacheKey
* @param int $start
* @param int $end
*
* @param int $start start for limit clause
* @param int $end end for limit clause
- * @param $sort
+ * @param CRM_Utils_Sort $sort
* @param string $cacheKey cache key
*
- * @internal param $object $sort sort object
* @return void
*/
function rebuildPreNextCache($start, $end, $sort, $cacheKey) {
}
/**
- * @param $params
+ * @param array $params
* @param $action
* @param $sortID
* @param null $displayRelationshipType
return $properties;
}
}
-//end of class
$this->_search = new $className($formValues);
}
}
- //end of constructor
/**
* This method returns the links that are given for each search row.
}
return self::$_links;
}
- //end of function
/**
* getter for array of the parameters required for creating pager.
*
* @param $action
- * @param $params
+ * @param array $params
*
- * @internal param $
* @access public
*/
function getPagerParams($action, &$params) {
$params['buttonTop'] = 'PagerTopButton';
$params['buttonBottom'] = 'PagerBottomButton';
}
- //end of function
/**
* returns the column headers as an array of tuples:
}
/**
- * @param $params
+ * @param array $params
* @param $action
* @param $sortID
* @param null $displayRelationshipType
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $ids the array that holds all the db ids
*
- * @return object CRM_Contribute_BAO_Contribution object
+ * @return CRM_Contribute_BAO_Contribution object
* @access public
* @static
*/
}
/**
- * @param $params
+ * @param array $params
*
* @return mixed
*/
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $ids the array that holds all the db ids
*
- * @return object CRM_Contribute_BAO_Contribution object
+ * @return CRM_Contribute_BAO_Contribution object
* @access public
* @static
*/
* in a hierarchical manner
* @param array $ids (reference) the array that holds all the db ids
*
- * @return object CRM_Contribute_BAO_Contribution object
+ * @return CRM_Contribute_BAO_Contribution object
* @access public
* @static
*/
/**
* Check if there is a contribution with the same trxn_id or invoice_id
*
- * @param $input
+ * @param array $input an assoc array of name/value pairs
* @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
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return object CRM_Contribute_BAO_ContributionProduct object
+ * @return CRM_Contribute_BAO_ContributionProduct object
* @access public
* @static
*/
}
/**
- * Function to get list of contribution fields for profile
+ * get list of contribution fields for profile
* For now we only allow custom contribution fields to be in
* profile
*
}
/**
- * Function to add extra fields specific to contribtion
+ * add extra fields specific to contribtion
*
* @static
*/
}
/**
- * Function to get list of contribution In Honor of contact Ids
+ * get list of contribution In Honor of contact Ids
*
* @param int $honorId In Honor of Contact ID
*
}
/**
- * Function to create address associated with contribution record.
+ * Create address associated with contribution record.
*
* @param array $params an associated array
- * @param $billingLocationTypeID
- *
- * @internal param int $billingID $billingLocationTypeID
+ * @param int $billingLocationTypeID
*
* @return address id
* @static
/**
* Delete billing address record related contribution
*
- * @param null $contributionId
- * @param null $contactId
+ * @param int $contributionId
+ * @param int $contactId
*
- * @internal param int $contact_id contact id
- * @internal param int $contribution_id contributionId
* @access public
* @static
*/
class CRM_Contribute_BAO_Contribution_Utils {
/**
- * Function to process payment after confirmation
+ * process payment after confirmation
*
- * @param object $form form object
+ * @param CRM_Core_Form $form form object
* @param array $paymentParams array with payment related key
* value pairs
* @param array $premiumParams array with premium related key
* @param int $contactID contact id
* @param int $contributionTypeId financial type id
* @param int|string $component component id
- *
* @param array $fieldTypes presumably relates to custom field types - used when building data for sendMail
- *
* @param $isTest
* @param $isPayLater
*
* Is a payment being made.
* Note that setting is_monetary on the form is somewhat legacy and the behaviour around this setting is confusing. It would be preferable
* to look for the amount only (assuming this cannot refer to payment in goats or other non-monetary currency
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return bool
*/
}
/**
- * Function to get the contribution details by month
+ * get the contribution details by month
* of the year
*
* @param int $param year
}
/**
- * Function to get the contribution details by year
+ * get the contribution details by year
*
* @return array associated array
*
}
/**
- * @param $params
+ * @param array $params
* @param $contactID
* @param $mail
*/
}
/**
- * @param $params
+ * @param array $params
* @param string $type
*
* @return bool
}
/**
- * @param $params
+ * @param array $params
*
* @return bool
*/
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return object CRM_Contribute_DAO_ContributionPage object
+ * @return CRM_Contribute_DAO_ContributionPage object
* @access public
* @static
*/
}
/**
- * Function to send the emails
+ * send the emails
*
* @param int $contactID contact id
* @param array $values associated array of fields
}
}
- /*
- * Construct the message to be sent by the send function
- *
- */
/**
+ * Construct the message to be sent by the send function
+ *
* @param $tplParams
* @param $contactID
* @param $isTest
}
/**
- * Function to send the emails for Recurring Contribution Notication
+ * send the emails for Recurring Contribution Notication
*
* @param string $type txnType
* @param int $contactID contact id for contributor
}
/**
- * Function to add the custom fields for contribution page (ie profile)
+ * add the custom fields for contribution page (ie profile)
*
* @param int $gid uf group id
* @param string $name
class CRM_Contribute_BAO_ContributionRecur extends CRM_Contribute_DAO_ContributionRecur {
/**
- * function to create recurring contribution
+ * create recurring contribution
*
* @param array $params (reference ) an assoc array of name/value pairs
*
}
/**
- * takes an associative array and creates a contribution object
+ * Takes an associative array and creates a contribution object
*
* the function extract all the params it needs to initialize the create a
* contribution object. the params array could contain additional unused name/value
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @internal param array $ids the array that holds all the db ids
- *
- * @return object CRM_Contribute_BAO_Contribution object
+ * @return CRM_Contribute_BAO_Contribution object
* @access public
* @static
* @todo move hook calls / extended logic to create - requires changing calls to call create not add
}
/**
- * Function to get the number of installment done/completed for each recurring contribution
+ * get the number of installment done/completed for each recurring contribution
*
* @param array $ids (reference ) an array of recurring contribution ids
*
}
/**
- * Function to get list of recurring contribution of contact Ids
+ * get list of recurring contribution of contact Ids
*
* @param int $contactId Contact ID
*
// handle context redirection for subscription url
$session = CRM_Core_Session::singleton();
if ($session->get('userID')) {
- $url = FALSE;
- $cid = CRM_Utils_Request::retrieve('cid', 'Integer', $this, FALSE);
- $mid = CRM_Utils_Request::retrieve('mid', 'Integer', $this, FALSE);
- $qfkey = CRM_Utils_Request::retrieve('key', 'String', $this, FALSE);
- $context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE);
+ $url = FALSE;
+ $cid = CRM_Utils_Request::retrieve('cid', 'Integer');
+ $mid = CRM_Utils_Request::retrieve('mid', 'Integer');
+ $qfkey = CRM_Utils_Request::retrieve('key', 'String');
+ $context = CRM_Utils_Request::retrieve('context', 'String');
if ($cid) {
switch ($context) {
case 'contribution':
}
/**
- * function to add contribution soft credit record
+ * add contribution soft credit record
*
* @param array $params (reference ) an assoc array of name/value pairs
*
}
/**
- * 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
*
- * @return object CRM_Contribute_BAO_ContributionSoft object
+ * @return CRM_Contribute_BAO_ContributionSoft object
* @access public
* @static
*/
}
/**
- * Function to delete soft credits
+ * delete soft credits
*
- * @param $params
+ * @param array $params
*
- * @internal param int $contributionTypeId
* @static
*/
static function del($params) {
}
/**
- * Function to retrieve soft contributions for contribution record.
+ * retrieve soft contributions for contribution record.
*
* @param $contributionID
* @param boolean $all include PCP data
*
- * @internal param array $params an associated array
* @return array of soft contribution ids, amounts, and associated contact ids
* @static
*/
*/
/**
- * @param $form
- * @param $params
+ * @param CRM_Core_Form $form
+ * @param array $params
* @param $honoreeprofileId
* @param null $honorId
*/
}
/**
- * 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
*
- * @return object CRM_Contribute_BAO_ManagePremium object
+ * @return CRM_Contribute_BAO_ManagePremium object
* @access public
* @static
*/
}
/**
- * function to add the financial types
+ * add the financial types
*
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
}
/**
- * Function to delete premium Types
+ * delete premium Types
*
* @param int $productID
* @static
}
/**
- * 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
*
- * @return object CRM_Contribute_BAO_ManagePremium object
+ * @return CRM_Contribute_BAO_ManagePremium object
* @access public
* @static
*/
}
/**
- * Function to delete financial Types
+ * delete financial Types
*
* @param $premiumID
*
- * @internal param int $contributionTypeId
* @static
*/
static function del($premiumID) {
}
/**
- * Function to build Premium Block im Contribution Pages
+ * build Premium Block im Contribution Pages
*
* @param $form CRM_Core_Form
* @param $pageID
* @param null $selectedProductID
* @param null $selectedOption
*
- * @internal param int $pageId
* @static
*/
static function buildPremiumBlock(&$form, $pageID, $formItems = FALSE, $selectedProductID = NULL, $selectedOption = NULL) {
}
/**
- * Function to build Premium B im Contribution Pages
+ * build Premium B im Contribution Pages
*
- * @param $form CRM_Core_Form
- * @param $productID
- * @param null $premiumProductID
+ * @param CRM_Core_Form $form
+ * @param int $productID
+ * @param int $premiumProductID
*
- * @internal param int $pageId
* @static
*/
function buildPremiumPreviewBlock($form, $productID, $premiumProductID = NULL) {
*
* @param $contributionPageID
*
- * @internal param int $contribution page id
* @static
*/
static function deletePremium($contributionPageID) {
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
* @static
class CRM_Contribute_Form extends CRM_Admin_Form {
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
class CRM_Contribute_Form_AdditionalInfo {
/**
- * Function to build the form for Premium Information.
+ * Build the form object for Premium Information.
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
*/
}
/**
- * Function to build the form for Additional Details.
+ * Build the form object for Additional Details.
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
*/
/**
* This function is used by CRM/Pledge/Form/Pledge.php
*
- * Function to build the form for PaymentReminders Information.
+ * Build the form object for PaymentReminders Information.
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
*/
}
/**
- * Function to process the Premium Information
+ * process the Premium Information
*
* @access public
*
- * @param $params
+ * @param array $params
* @param $contributionID
* @param null $premiumID
* @param null $options
}
/**
- * Function to process the Note
+ * process the Note
*
* @access public
*
- * @param $params
+ * @param array $params
* @param $contactID
* @param $contributionID
* @param null $contributionNoteID
}
/**
- * Function to process the Common data
+ * process the Common data
*
* @access public
*
- * @param $params
+ * @param array $params
* @param $formatted
- * @param $form
+ * @param CRM_Core_Form $form
* @return void
*/
static function postProcessCommon(&$params, &$formatted, &$form) {
*
* @form object of Contribution form.
*
- * @param $form
+ * @param CRM_Core_Form $form
* @param array $params (reference ) an assoc array of name/value pairs.
* @$ccContribution boolen, is it credit card contribution.
* @param bool $ccContribution
}
/**
- * @param $params
+ * @param array $params
*
* @return mixed
*/
protected $_selfService = FALSE;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @param null
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
*/
public $userDisplayName;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
* @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
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
* @param $contributionPageId
* @param $nonDeductibleAmount
* @param $campaignId
- *
* @param $isMonetary
- *
* @param $pending
* @param $paymentProcessorOutcome
* @param $receiptDate
- *
* @param $recurringContributionID
* @param $isTest
- *
* @param $addressID
- *
* @param $softCreditToID
- *
* @param $lineItems
*
- * @internal param $financialType
* @return array
*/
public static function getContributionParams($params, $contactID, $financialTypeID, $online, $contributionPageId, $nonDeductibleAmount, $campaignId, $isMonetary, $pending,
}
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
/**
* Process the contribution
*
- * @param $form
+ * @param CRM_Core_Form $form
* @param array $params
* @param array $result
* @param integer $contactID
}
/**
- * Function to add on behalf of organization and it's location
+ * add on behalf of organization and it's location
*
* @param $behalfOrganization array array of organization info
* @param $contactID int individual contact id. One
* who is doing the process of signup / contribution.
*
* @param $values array form values array
- * @param $params
+ * @param array $params
* @param null $fields
*
* @return void
* Function used to se pcp related defaults / params
* This is used by contribution and also event pcps
*
- * @param object $page form object
+ * @param CRM_Core_Form $page form object
* @param array $params associated array
*
* @return array
*
* @param $priceSetID
*
- * @internal param $isQuickConfig
- * @internal param $priceField
*/
public function setFormAmountFields($priceSetID) {
$isQuickConfig = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_PriceSet', $this->_params['priceSetId'], 'is_quick_config');
protected $_snippet;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
* @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
}
/**
- * @param $params
- * @param $form
+ * @param array $params
+ * @param CRM_Core_Form $form
*
* @return int|mixed|null|string
*/
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
class CRM_Contribute_Form_Contribution_OnBehalfOf {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
* @access public
}
/**
- * Function to build form for related contacts / on behalf of organization.
+ * build form for related contacts / on behalf of organization.
*
- * @param $form object invoking Object
- *
- * @internal param string $contactType contact type
- * @internal param string $title fieldset title
+ * @param CRM_Core_Form $form
*
* @static
*/
public $_useForMember;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
public $_isBillingAddressRequiredForPayLater;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to add the custom fields
+ * add the custom fields
*
* @param $id
* @param $name
}
/**
- * Function to authenticate pledge user during online payment.
+ * authenticate pledge user during online payment.
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
protected $_values;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
protected $_pid;
/**
- * Function to pre process the form
+ * pre process the form
*
* @access public
*
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
CONST NUM_OPTION = 11;
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
* @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 CRM_Contribute_Form_ContributionPage_Custom extends CRM_Contribute_Form_ContributionPage {
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
protected $_relatedContributions;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Contribute_Form_ContributionPage_Premium extends CRM_Contribute_Form_ContributionPage {
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function for validation
+ * validation
*
* @param array $params (ref.) an assoc array of name/value pairs
*
class CRM_Contribute_Form_ContributionPage_Settings extends CRM_Contribute_Form_ContributionPage {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
*/
class CRM_Contribute_Form_ContributionPage_TabHeader {
/**
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array
*/
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array
*/
class CRM_Contribute_Form_ContributionPage_ThankYou extends CRM_Contribute_Form_ContributionPage {
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function for validation
+ * validation
*
* @param array $params (ref.) an assoc array of name/value pairs
*
class CRM_Contribute_Form_ContributionView extends CRM_Core_Form {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Contribute_Form_ManagePremiums extends CRM_Contribute_Form {
/**
- * Function to pre process the form
+ * pre process the form
*
* @access public
*
}
/**
- * This function sets the default values for the form. Manage Premiums that in edit/view mode
+ * Set default values for the form. Manage Premiums that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
class CRM_Contribute_Form_SearchContribution extends CRM_Core_Form {
/**
- * Build the form
+ * Build the form object
*
* @access public
*
class CRM_Contribute_Form_SoftCredit {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
* @access static
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param bool $useTable
*/
static function preProcessCommon(&$form, $useTable = FALSE) {
* the form with a customized title for the main Submit
*
* @param string $title title of the main button
- * @param string $nextType
+ * @param string $nextType button type for the form after processing
* @param string $backType
* @param bool $submitOnce
*
- * @internal param string $type button type for the form after processing
- *
* @return void
* @access public
*/
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
CRM_Core_Session::setStatus(ts("No updates have been saved."), ts('Not Saved'), 'alert');
}
}
- //end of function
}
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
/**
* global validation rules for the form
*
- * @param $values
- *
- * @internal param array $fields posted values of the form
+ * @param array $values
*
* @return array list of errors to be posted back to the form
* @static
* @param array $contribIDs Contribution Id
* @param array $params associated array of submitted values
* @param array $contactIds Contact Id
- * @param object $form form object
+ * @param CRM_Core_Form $form form object
* @static
*
*/
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
// CRM_Contribute_BAO_Contribution::composeMessageArray expects mysql formatted date
$objects['contribution']->receive_date = CRM_Utils_Date::isoToMysql($objects['contribution']->receive_date);
- // CRM_Core_Error::debug('input',$input);
-
$values = array();
$mail = $elements['baseIPN']->sendMail($input, $ids, $objects, $values, FALSE, $elements['createPdf']);
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
* @param $entity
* @param $textToSearch
*
- * @internal param $html
- *
* @return bool
*/
static function isHtmlTokenInTableCell($token, $entity, $textToSearch) {
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
// also reset the batch page so it gets new values from the db
$this->controller->resetPage('Batch');
}
- //end of function
}
}
/**
- * Build the form - it consists of
+ * Build the form object - it consists of
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
function preProcess() {}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
public $_paymentProcessorObj = NULL;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
* @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
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the components of the form
+ * actually build the components of the form
*
* @return void
* @access public
class CRM_Contribute_Import_Form_DataSource extends CRM_Core_Form {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Contribute_Import_Form_Preview extends CRM_Import_Form_Preview {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
class CRM_Contribute_Import_Form_Summary extends CRM_Import_Form_Summary {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
*
*/
-
abstract class CRM_Contribute_Import_Parser extends CRM_Import_Parser {
/**
protected $_fileName;
- /**#@+
- * @access protected
- * @var integer
- */
-
/**
* imported file size
*/
self::exportCSV($this->_duplicateFileName, $headers, $this->_duplicates);
}
}
- //echo "$this->_totalCount,$this->_invalidRowCount,$this->_conflictCount,$this->_duplicateCount";
return $this->fini();
}
*
* @param array mapped array of values
*
-pppp * @return void
+ * @return void
* @access public
*/
function setActiveFields($fieldKeys) {
}
/**
- * @param $elements
+ * @param array $elements
*/
function setActiveFieldSoftCredit($elements) {
for ($i = 0; $i < count($elements); $i++) {
}
/**
- * @param $elements
+ * @param array $elements
*/
function setActiveFieldSoftCreditType($elements) {
for ($i = 0; $i < count($elements); $i++) {
$this->_activeFields[$i]->_softCreditType = $elements[$i];
}
}
+
/**
- * function to format the field values for input to the api
+ * format the field values for input to the api
*
* @return array (reference ) associative array of name/value pairs
* @access public
$store->set('duplicatesFileName', $this->_duplicateFileName);
}
}
- //echo "$this->_totalCount,$this->_invalidRowCount,$this->_conflictCount,$this->_duplicateCount";
}
/**
* Export data to a CSV file
*
- * @param $fileName
+ * @param string $fileName
* @param array $header
- * @param data $data
+ * @param array $data
*
- * @internal param string $filename
* @return void
* @access public
*/
/**
* Determines the file extension based on error code
*
- * @var $type error code constant
- * @return string
- * @static
- */
- /**
- * @param error $type
+ * @param int $type error code constant
*
* @return string
*/
/**
* Determines the file name based on error code
*
- * @var $type error code constant
- * @return string
- * @static
- */
- /**
- * @param error $type
+ * @param int $type error code constant
*
* @return string
*/
}
/**
- * Function to process pledge payments
+ * process pledge payments
*/
function processPledgePayments(&$formatted) {
if (!empty($formatted['pledge_payment_id']) && !empty($formatted['pledge_id'])) {
}
/**
- * @param $params
+ * @param array $params
* @param bool $sortBy
*
* @return int|string
}
/**
- *
* @return void
* @access public
* @static
public $_contactId = NULL;
public $_crid = NULL;
- //end of function
-
/**
* This method returns the links that are given for recur search row.
* currently the links added for each row are:
$this->_query->_groupByComponentClause = " GROUP BY civicrm_contribution.id ";
}
}
- //end of constructor
/**
* This method returns the links that are given for each search row.
}
return self::$_links;
}
- //end of function
/**
* getter for array of the parameters required for creating pager.
*
* @param $action
- * @param $params
- * @internal param $
+ * @param array $params
* @access public
*/
function getPagerParams($action, &$params) {
$params['buttonTop'] = 'PagerTopButton';
$params['buttonBottom'] = 'PagerBottomButton';
}
- //end of function
/**
* Returns total number of rows for the query.
}
/**
- *
* @return array $qill which contains an array of strings
* @access public
*/
/**
* class constructor
*
- * @param object $controller
+ * @param CRM_Contact_Import_Controller $controller
* @param \const|int $action
*
- * @internal param \CRM_Contact_Import_Controller $object
- * @return \CRM_Contribute_StateMachine_Contribution CRM_Contact_Import_StateMachine
+ * @return CRM_Contribute_StateMachine_Contribution
*/
function __construct($controller, $action = CRM_Core_Action::NONE) {
parent::__construct($controller, $action);
/**
* class constructor
*
- * @param object $controller
- * @param \const|int $action
+ * @param CRM_Contribute_Controller_ContributionPage $controller
+ * @param const|int $action
*
- * @internal param \CRM_Contribute_Controller_ContributionPage $object
- * @return \CRM_Contribute_StateMachine_ContributionPage CRM_Contribute_StateMachine_ContributionPage
+ * @return CRM_Contribute_StateMachine_ContributionPage
*/
function __construct($controller, $action = CRM_Core_Action::NONE) {
parent::__construct($controller, $action);
* bit manipulation operations so we can perform multiple
* actions on the same object if needed
*
- * @var array _names tupe of variable name to action constant
+ * @var array $_names type of variable name to action constant
*
* @access private
* @static
static $_description;
/**
- *
* called by the request object to translate a string into a mask
*
- * @param $str
- *
- * @internal param string $action the action to be resolved
+ * @param string $str the action to be resolved
*
* @return int the action mask corresponding to the input string
* @access public
* Given a string or an array of strings, determine the bitmask
* for this set of actions
*
- * @param mixed either a single string or an array of strings
+ * @param mixed $item either a single string or an array of strings
*
* @return int the action mask corresponding to the input args
* @access public
/**
* Given a string determine the bitmask for this specific string
*
- * @param string the input action to process
+ * @param string $item the input action to process
*
* @return int the action mask corresponding to the input string
* @access public
*
* Given an action mask, find the corresponding description
*
- * @param int the action mask
+ * @param int $mask the action mask
*
* @return string the corresponding action description
* @access public
/**
* Create or update an action log entry
*
- * @param $params
+ * @param array $params
*
* @return actionLog array
* @access public
}
/**
- * Function to add the schedules reminders in the db
+ * add the schedules reminders in the db
*
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $ids the array that holds all the db ids
*
- * @return object CRM_Core_DAO_ActionSchedule
+ * @return CRM_Core_DAO_ActionSchedule
* @access public
* @static
*
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $values (reference ) an assoc array to hold the flattened values
*
- * @return object CRM_Core_DAO_ActionSchedule object on success, null otherwise
+ * @return CRM_Core_DAO_ActionSchedule object on success, null otherwise
* @access public
* @static
*/
}
/**
- * Function to delete a Reminder
+ * delete a Reminder
*
* @param int $id ID of the Reminder to be deleted.
*
*
* @param bool $microformat
*
- * @internal param $NULL
- *
* @return void
- *
* @access public
*/
function addDisplay($microformat = FALSE) {
}
/**
- * Function to get address sequence
+ * get address sequence
*
* @return array of address sequence.
*/
}
/**
- * Function to check if current address fields are shared with any other address
+ * check if current address fields are shared with any other address
*
* @param array $fields address fields in profile
* @param int $contactId contact id
}
/**
- * Function to update the shared addresses if master address is modified
+ * update the shared addresses if master address is modified
*
* @param int $addressId address id
* @param array $params associated array of address params
* @param string $blockName name of the above object
* @param array $params input parameters to find object
*
- * @internal param Object $block typically a Phone|Email|IM|OpenID object
- * @internal param array $values output values of the object
- *
* @return array of $block objects.
* @access public
* @static
* @param Object $block typically a Phone|Email|IM|OpenID object
* @param string $blockName name of the above object
*
- * @internal param array $values output values of the object
- *
* @return array of $block objects.
* @access public
* @static
}
/**
- * Function to get all block ids for a contact
+ * get all block ids for a contact
*
* @param string $blockName block name
* @param int $contactId contact id
* @param null $entity
* @param null $contactId
*
- * @internal param array $requiredFields fields that's are required in a block
- *
* @return object CRM_Core_BAO_Block object on success, null otherwise
* @access public
* @static
}
/**
- * Function to delete block
+ * delete block
*
* @param string $blockName block name
* @param int $params associates array
/**
* Sort location array so primary element is first
*
- * @param $locations
+ * @param array $locations
*
- * @internal param Array $location
*/
static function sortPrimaryFirst(&$locations){
uasort($locations, 'self::primaryComparison');
* compare 2 locations to see which should go first based on is_primary
* (sort function for sortPrimaryFirst)
* @param array $location1
- * @param array_type $location2
+ * @param array $location2
* @return number
*/
static function primaryComparison($location1, $location2){
class CRM_Core_BAO_CMSUser {
/**
- * Function for synchronizing cms users with CiviCRM contacts
+ * synchronizing cms users with CiviCRM contacts
*
* @param bool $is_interactive whether to show statuses & perform redirects
* This behavior is misplaced in the BAO layer, but we'll preserve it to avoid
}
/**
- * Function to create CMS user using Profile
+ * create CMS user using Profile
*
* @param array $params associated array
* @param string $mail email id for cms user
}
/**
- * Function to create Form for CMS user using Profile
+ * create Form for CMS user using Profile
*
- * @param object $form
+ * @param CRM_Core_Form $form
* @param integer $gid id of group of profile
* @param bool $emailPresent true if the profile field has email(primary)
* @param \const|int $action
$form->assign('showCMS', $showCMS);
}
- /*
+ /**
* Checks that there is a valid username & email
- * optionally checks password is present & matches DB & gets the CMS to validate
- *
- * @params array $fields Posted values of form
- * @param array $files uploaded files if any
- * @param array $self reference to form object
+ * optionally checks password is present & matches DB & gets the CMS to validate
*
- */
- /**
- * @param $fields
- * @param $files
- * @param $self
+ * @param array $fields Posted values of form
+ * @param array $files uploaded files if any
+ * @param CRM_Core_Form $form
*
* @return array|bool
*/
- static function formRule($fields, $files, $self) {
+ static function formRule($fields, $files, $form) {
if (empty($fields['cms_create_account'])) {
return TRUE;
}
$errors = array();
if ($isDrupal || $isJoomla || $isWordPress) {
$emailName = NULL;
- if (!empty($self->_bltID) && array_key_exists("email-{$self->_bltID}", $fields)) {
+ if (!empty($form->_bltID) && array_key_exists("email-{$form->_bltID}", $fields)) {
// this is a transaction related page
- $emailName = 'email-' . $self->_bltID;
+ $emailName = 'email-' . $form->_bltID;
} else {
// find the email field in a profile page
foreach ($fields as $name => $dontCare) {
class CRM_Core_BAO_ConfigSetting {
/**
- * Function to create civicrm settings. This is the same as add but it clears the cache and
+ * create civicrm settings. This is the same as add but it clears the cache and
* reloads the config object
*
- * @params array $params associated array of civicrm variables
- *
- * @param $params
+ * @param array $params associated array of civicrm variables
*
* @return null
* @static
}
/**
- * Function to add civicrm settings
- *
- * @params array $params associated array of civicrm variables
+ * add civicrm settings
*
- * @param $params
+ * @param array $params associated array of civicrm variables
*
* @return null
* @static
}
/**
- * Function to fix civicrm setting variables
- *
- * @params array $params associated array of civicrm variables
+ * fix civicrm setting variables
*
- * @param $params
+ * @param array $params associated array of civicrm variables
*
* @return null
* @static
}
/**
- * 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
*
- * @return object CRM_Core_DAO_CustomField object
+ * @return CRM_Core_DAO_CustomField object
* @access public
* @static
*/
* @param string $elementName name of the custom field
* @param $fieldId
* @param boolean $inactiveNeeded -deprecated
- * @param bool $useRequired
+ * @param bool $useRequired true if required else false
* @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
*/
}
/**
- * Function to set default values for custom data used in profile
- *
- * @params int $customFieldId custom field id
- * @params string $elementName custom field name
- * @params array $defaults associated array of fields
- * @params int $contactId contact id
- * @param $customFieldId
- * @param $elementName
- * @param $defaults
- * @param null $contactId
+ * set default values for custom data used in profile
+ *
+ * @param int $customFieldId custom field id
+ * @param string $elementName custom field name
+ * @param array $defaults associated array of fields
+ * @param int $contactId contact id
* @param int $mode profile mode
* @param mixed $value if passed - dont fetch value from db,
* just format the given value
}
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
}
/**
- * Function to get custom option groups
+ * get custom option groups
*
- * @params array $includeFieldIds ids of custom fields for which
+ * @param array $includeFieldIds ids of custom fields for which
* option groups must be included.
*
* Currently this is required in the cases where option groups are to be included
*
* @access public
*
- * @param null $includeFieldIds
- *
* @return mixed $customOptionGroup@static
*/
public static function &customOptionGroup($includeFieldIds = NULL) {
}
/**
- * Function to fix orphan groups
+ * fix orphan groups
*
- * @params int $customFieldId custom field id
- * @params int $optionGroupId option group id
+ * @param int $customFieldId custom field id
+ * @param int $optionGroupId option group id
*
* @access public
- *
- * @param $customFieldId
- * @param $optionGroupId
- *
* @return void
* @static
*/
* Function to check if option group is related to more than one
* custom field
*
- * @params int $optionGroupId option group id
- *
- * @param $optionGroupId
+ * @param int $optionGroupId option group id
*
* @return void
- @static
+ * @static
*/
static function checkOptionGroup($optionGroupId) {
$query = "
}
/**
- * @param $params
+ * @param array $params
* @param $customFields
* @param $entityID
* @param $customFieldExtends
*
* @param array $params (reference) an assoc array of name/value pairs
*
- * @return object CRM_Core_DAO_CustomGroup object
+ * @return CRM_Core_DAO_CustomGroup object
* @access public
* @static
*/
}
/**
- * 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
*
- * @return object CRM_Core_DAO_CustomGroup object
+ * @return CRM_Core_DAO_CustomGroup object
* @access public
* @static
*/
* An array containing all custom groups and their custom fields is returned.
*
* @param string $entityType - of the contact whose contact type is needed
- * @param object $form - not used but required
- * @param null $entityID
- * @param null $groupID
+ * @param CRM_Core_Form $form - not used but required
+ * @param int $entityID
+ * @param int $groupID
* @param string $subType
* @param string $subName
- * @param boolean $fromCache
+ * @param bool $fromCache
+ * @param bool $onlySubType
*
- * @param null $onlySubType
- *
- * @internal param int $entityId - optional - id of entity if we need to populate the tree with custom values.
- * @internal param int $groupId - optional group id (if we need it for a single group only)
- * - if groupId is 0 it gets for inline groups only
- * - if groupId is -1 we get for all groups
* @return array $groupTree - array The returned array is keyed by group id and has the custom group table fields
* and a subkey 'fields' holding the specific custom fields.
* If entityId is passed in the fields keys have a subkey 'customValue' which holds custom data
/**
* @param $groupTree
- * @param $params
+ * @param array $params
* @param bool $skipFile
*/
static function postProcess(&$groupTree, &$params, $skipFile = FALSE) {
/**
* generic function to build all the form elements for a specific group tree
*
- * @param object $form the form object
+ * @param CRM_Core_Form $form the form object
* @param array $groupTree the group tree object
* @param boolean $inactiveNeeded return inactive custom groups
* @param string $prefix prefix for custom grouptree assigned to template
}
/**
- * Function to extract the get params from the url, validate
+ * extract the get params from the url, validate
* and store it in session
*
* @param CRM_Core_Form $form the form object
}
/**
- * Function to check the type of custom field type (eg: Used for Individual, Contribution, etc)
+ * check the type of custom field type (eg: Used for Individual, Contribution, etc)
* this function is used to get the custom fields of a type (eg: Used for Individual, Contribution, etc )
*
* @param int $customFieldId custom field id
/**
* Build custom data view
*
- * @param object $form page object
+ * @param CRM_Core_Form $form page object
* @param array $groupTree associated array
* @param boolean $returnCount true if customValue count needs to be returned
* @param null $gID
class CRM_Core_BAO_CustomOption {
/**
- * 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
*
- * @return object CRM_Core_BAO_CustomOption object
+ * @return CRM_Core_BAO_CustomOption object
* @access public
* @static
*/
/**
* Returns all active options ordered by weight for a given field
*
- * @param $fieldID
+ * @param int $fieldID field whose options are needed
* @param boolean $inactiveNeeded do we need inactive options ?
*
- * @internal param int $fieldId field whose options are needed
* @return array $customOption all active options for fieldId
* @static
*/
}
/**
- * Function to delete Option
+ * delete Option
*
* param $optionId integer option id
*
}
/**
- * @param $params
+ * @param array $params
*
* @throws Exception
*/
}
/**
- * Function to delet option value give an option value and custom group id
+ * delet option value give an option value and custom group id
*
* @param int $customValueID custom value ID
* @param int $customGroupID custom group ID
}
/**
- * @param $params
+ * @param array $params
* @param $entityTable
* @param $entityID
*/
}
/**
- * @param $params
+ * @param array $params
* @param $customFields
* @param $entityTable
* @param $entityID
}
/**
- * Function to take in an array of entityID, custom_XXX => value
+ * take in an array of entityID, custom_XXX => value
* and set the value in the appropriate table. Should also be able
* to set the value to null. Follows api parameter/return conventions
*
* @array $params
*
- * @param $params
+ * @param array $params
*
* @throws Exception
* @return array
}
/**
- * Function to take in an array of entityID, custom_ID
+ * take in an array of entityID, custom_ID
* and gets the value from the appropriate table.
*
* To get the values of custom fields with IDs 13 and 43 for contact ID 1327, use:
*
* @array $params
*
- * @param $params
+ * @param array $params
*
* @throws Exception
* @return array
*/
class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard {
/**
- * function to add Dashboard
+ * add Dashboard
*
* @param array $params values
*
/**
- * Function to check dashlet permission for current user
+ * check dashlet permission for current user
*
- * @param $permission
- * @param $operator
- *
- * @internal param \permission $string string
+ * @param string $permission comma separated list
+ * @param string $operator
*
* @return boolean true if use has permission else false
*/
}
/**
- * Function to get details of each dashlets
+ * get details of each dashlets
*
* @param int $dashletID widget ID
*
}
/**
- * Function to delete the discount
+ * delete the discount
*
- * @param $entityId
- * @param $entityTable
- *
- * @internal param int $id discount id
+ * @param int $entityId
+ * @param string $entityTable
*
* @return boolean
* @access public
/**
* Determine in which discount set the registration date falls
*
- * @param $entityID
- * @param string $entityTable entity table to be searched
+ * @param int $entityID entity id to be searched
+ * @param string $entityTable entity table to be searched
*
- * @internal param int $entityId entity id to be searched
* @return integer $dao->id discount id of the set which matches
* the date criteria
*/
static function findSet($entityID, $entityTable) {
- if (empty($entityID) ||
- empty($entityTable)
- ) {
+ if (empty($entityID) || empty($entityTable)) {
// adding this here, to trap errors if values are not sent
CRM_Core_Error::fatal();
return NULL;
private $_location = NULL;
/**
- * 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
*
- * @return object CRM_Core_DAO_Domain object
+ * @return CRM_Core_DAO_Domain object
* @access public
* @static
*/
* @deprecated
* @see http://issues.civicrm.org/jira/browse/CRM-11204
*/
- static function setDomain($domainID){
+ static function setDomain($domainID) {
CRM_Core_Config::domainID($domainID);
self::getDomain($domainID);
CRM_Core_Config::singleton(TRUE, TRUE);
* Reset domain to default (ie. as loaded from settings). This is the
* counterpart to CRM_Core_BAO_Domain::setDomain.
*
- * @internal param int $domainID id for domain you want to set as current
* @deprecated
* @see CRM_Core_BAO_Domain::setDomain
*/
- static function resetDomain(){
+ static function resetDomain() {
CRM_Core_Config::domainID(null, true);
self::getDomain(null, true);
CRM_Core_Config::singleton(TRUE, TRUE);
*
* @return null|string
*/
- static function version( $skipUsingCache = false ) {
+ static function version($skipUsingCache = false) {
return CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Domain',
CRM_Core_Config::domainID(),
- 'version',
- 'id',
- $skipUsingCache
+ 'version',
+ 'id',
+ $skipUsingCache
);
}
/**
* Save the values of a domain
*
- * @param $params
+ * @param array $params
* @param $id
*
- * @return domain array
+ * @return array domain
* @access public
*/
static function edit(&$params, &$id) {
/**
* Create a new domain
*
- * @param $params
+ * @param array $params
*
- * @return domain array
+ * @return array domain
* @access public
*/
static function create($params) {
return $childGrps;
}
- // function to retrieve a list of contact-ids that belongs to current domain/site.
/**
+ * retrieve a list of contact-ids that belongs to current domain/site.
+ *
* @return array
*/
static function getContactList() {
}
/**
- * Function to set / reset hold status for an email
+ * set / reset hold status for an email
*
* @param object $email email object
*
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return object CRM_Core_BAO_EntityTag object
+ * @return CRM_Core_BAO_EntityTag object
* @access public
* @static
*/
/**
* Check if there is data to create the object
*
- * @params array $params (reference ) an assoc array of name/value pairs
- *
- * @param $params
+ * @param array $params an assoc array of name/value pairs
*
* @return boolean
* @access public
* @static
*/
- static function dataExists(&$params) {
- return ($params['tag_id'] == 0) ? FALSE : TRUE;
+ static function dataExists($params) {
+ return !($params['tag_id'] == 0);
}
/**
- * Function to delete the tag for a contact
+ * delete the tag for a contact
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return object CRM_Core_BAO_EntityTag object
+ * @return CRM_Core_BAO_EntityTag object
* @access public
* @static
*
*
* @param array $entityIds (reference ) the array of entity ids to be added
* @param int $tagId the id of the tag
- * @param string $entityTable
- * @params string $entityTable name of entity table default:civicrm_contact
+ * @param string $entityTable name of entity table default:civicrm_contact
*
- * @return array (total, added, notAdded) count of enities added to tag
+ * @return array (total, added, notAdded) count of enities added to tag
* @access public
* @static
*/
*
* @param array $entityIds (reference ) the array of entity ids to be removed
* @param int $tagId the id of the tag
- * @param string $entityTable
- * @params string $entityTable name of entity table default:civicrm_contact
+ * @param string $entityTable name of entity table default:civicrm_contact
*
- * @return array (total, removed, notRemoved) count of entities removed from tags
+ * @return array (total, removed, notRemoved) count of entities removed from tags
* @access public
* @static
*/
/**
* takes an associative array and creates tag entity record for all tag entities
*
- * @param array $params (reference ) an assoc array of name/value pairs
+ * @param array $params (reference) an assoc array of name/value pairs
* @param $entityTable
* @param $entityID
*
- * @internal param array $contactId contact id
- *
* @return void
* @access public
* @static
}
/**
- * Function to get contact tags
+ * get contact tags
*/
static function getContactTags($contactID, $count = FALSE) {
$contactTags = array();
}
/**
- * Function to get child contact tags given parentId
+ * get child contact tags given parentId
*/
static function getChildEntityTags($parentId, $entityId, $entityTable = 'civicrm_contact') {
$entityTags = array();
class CRM_Core_BAO_Extension extends CRM_Core_DAO_Extension {
/**
- * 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
*
- * @return object CRM_Core_BAO_LocationType object on success, null otherwise
+ * @return CRM_Core_BAO_LocationType object on success, null otherwise
* @access public
* @static
*/
}
/**
- * Function to delete an extension
+ * delete an extension
*
* @param int $id Id of the extension to be deleted.
*
}
/**
- * Function to return a clean url string and the number of attachment for a
+ * return a clean url string and the number of attachment for a
* given entityTable, entityID
*
* @param $entityTable string The entityTable to which the file is attached
/**
* @param $formValues
- * @param $params
+ * @param array $params
* @param $entityTable
* @param null $entityID
*/
}
/**
- * @param $params
+ * @param array $params
* @param $entityTable
* @param $entityID
*/
}
/*
- * Function to copy/attach an existing file to a different entity
+ * copy/attach an existing file to a different entity
* table and id.
*/
/**
}
/**
- * function to delete a file attachment from an entity table / entity ID
+ * delete a file attachment from an entity table / entity ID
*
* @static
* @access public
*
* @param string $trxnEntityTable entity_table
*
- * @return object CRM_Core_BAO_FinancialTrxn object
+ * @return CRM_Core_BAO_FinancialTrxn object
* @access public
* @static
*/
}
/**
- * 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
*
- * @return object CRM_Contribute_BAO_ContributionType object
+ * @return CRM_Contribute_BAO_ContributionType object
* @access public
* @static
*/
}
/**
- *
* Given an entity_id and entity_table, check for corresponding entity_financial_trxn and financial_trxn record.
* NOTE: This should be moved to separate BAO for EntityFinancialTrxn when we start adding more code for that object.
*
- * @param $entity_id
+ * @param $entity_id id of the entity usually the contactID.
* @param string $orderBy to get single trxn id for a entity table i.e last or first.
- *
* @param bool $newTrxn
*
- * @internal param string $entityTable name of the entity table usually 'civicrm_contact'
- * @internal param int $entityID id of the entity usually the contactID.
- * @return array( ) reference $tag array of category id's the contact belongs to.
+ * @return array $tag array of category id's the contact belongs to.
*
* @access public
* @static
/**
* Given an entity_id and entity_table, check for corresponding entity_financial_trxn and financial_trxn record.
- * NOTE: This should be moved to separate BAO for EntityFinancialTrxn when we start adding more code for that object.
- *
- * @param $entity_id
+ * @todo This should be moved to separate BAO for EntityFinancialTrxn when we start adding more code for that object.
*
- * @internal param string $entityTable name of the entity table usually 'civicrm_contact'
- * @internal param int $entityID id of the entity usually the contactID.
+ * @param int $entity_id id of the entity usually the contactID.
*
- * @return array( ) reference $tag array of catagory id's the contact belongs to.
+ * @return array $tag array of catagory id's the contact belongs to.
*
* @access public
* @static
/**
* Given an financial_trxn_id check for previous entity_financial_trxn.
*
- * @param $financial_trxn_id
+ * @param $financial_trxn_id id of the latest payment.
*
- * @internal param int $financialTrxn_id id of the latest payment.
*
- * @return array( ) $payment array of previous payments
+ * @return array $payment array of previous payments
*
* @access public
* @static
* Given an entity_id and entity_table, check for corresponding entity_financial_trxn and financial_trxn record.
* NOTE: This should be moved to separate BAO for EntityFinancialTrxn when we start adding more code for that object.
*
- * @param $entity_id
- * @param string $entity_table
- *
- * @internal param string $entityTable name of the entity table usually 'civicrm_contact'
- * @internal param int $entityID id of the entity usually the contactID.
+ * @param $entity_id id of the entity usually the contactID.
+ * @param string $entity_table name of the entity table usually 'civicrm_contact'
*
- * @return array( ) reference $tag array of catagory id's the contact belongs to.
+ * @return array $tag array of catagory id's the contact belongs to.
*
* @access public
* @static
CRM_Core_BAO_FinancialTrxn::createPremiumTrxn($params);
}
}
+
/**
* create financial trxn and items when fee is charged
*
- * @params params to create trxn entries
+ * @param array $params to create trxn entries
*
* @access public
* @static
*/
-
static function recordFees($params) {
$expenseTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Expense Account is' "));
$domainId = CRM_Core_Config::domainID();
}
/*
- * function to get partial payment amount and type of it
+ * get partial payment amount and type of it
* return @array : payment type => amount
* payment type : 'amount_owed' or 'refund_due'
*/
}
/**
- * Function to add the payment-processor type in the db
+ * add the payment-processor type in the db
*
- * @param array $params (reference ) an assoc array of name/value pairs
+ * @param array $params an assoc array of name/value pairs
*
- * @internal param array $ids the array that holds all the db ids
- *
- * @return object CRM_Financial_DAO_PaymentProcessorType
+ * @return CRM_Financial_DAO_PaymentProcessorType
* @access public
* @static
*/
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
- * @return object CRM_Core_DAO_Job object on success, null otherwise
+ * @return CRM_Core_DAO_Job object on success, null otherwise
* @access public
* @static
*/
/**
* Function to delete scheduled job
*
- * @param $jobID
- *
- * @internal param int $jobId ID of the job to be deleted.
+ * @param $jobID ID of the job to be deleted.
*
* @return bool|null
* @access public
*
* @param string $name
*
- * @internal param $void
- *
* @return int Group ID (null if Group ID doesn't exist)
* @access private
*/
*
* @param string $groupName
*
- * @return object CRM_Core_DAO_OptionValue object
+ * @return CRM_Core_DAO_OptionValue object
* @access public
* @static
*/
}
/**
- * Function to delete a Label Format
+ * delete a Label Format
*
* @param int $id ID of the label format to be deleted.
* @param string $groupName group name
static $blocks = array('phone', 'email', 'im', 'openid', 'address');
/**
- * Function to create various elements of location block
+ * create various elements of location block
*
* @param array $params (reference ) an assoc array of name/value pairs
* @param boolean $fixAddress true if you need to fix (format) address values
}
/**
- * This function deletes the Location Block
+ * Delete the Location Block
*
* @param int $locBlockId id of the Location Block
*
}
/**
- * Given the list of params in the params array, fetch the object
- * and store the values in the values array
- *
* @param $entityBlock
* @param bool $microformat
*
- * @internal param array $params input parameters to find object
- * @internal param array $values output values of the object
- *
* @return array array of objects(CRM_Core_BAO_Location)
* @access public
* @static
$name = ucfirst($block);
}
$baoString = 'CRM_Core_BAO_' . $name;
- $blocks[$block] = $baoString::getValues( $entityBlock, $microformat );
+ $blocks[$block] = $baoString::getValues($entityBlock, $microformat);
}
return $blocks;
}
}
}
- /* Function to copy or update location block.
+ /**
+ * Copy or update location block.
*
* @param int $locBlockId location block id.
* @param int $updateLocBlockId update location block id
- * @return int newly created/updated location block id.
- */
- /**
- * @param $locBlockId
- * @param null $updateLocBlockId
*
- * @return mixed
+ * @return int newly created/updated location block id.
*/
static function copyLocBlock($locBlockId, $updateLocBlockId = NULL) {
//get the location info.
}
/**
- * 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
*
- * @return object CRM_Core_BAO_LocaationType object on success, null otherwise
+ * @return CRM_Core_BAO_LocaationType object on success, null otherwise
* @access public
* @static
*/
}
/**
- * Function to add a Location Type
+ * add a Location Type
*
* @param array $params reference array contains the values submitted by the form
*
- * @internal param array $ids reference array contains the id
- *
* @access public
* @static
*
}
/**
- * Function to delete location Types
+ * delete location Types
*
* @param int $locationTypeId ID of the location type to be deleted.
*
}
/**
- * Function to get log record count for a Contact
+ * get log record count for a Contact
*
- * @param $contactID
- *
- * @internal param int $contactId Contact ID
+ * @param int $contactID
*
* @return int count of log records
* @access public
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
- * @return object CRM_Core_BAO_MailSettings object
+ * @return CRM_Core_BAO_MailSettings object
* @access public
* @static
*/
}
/**
- * function to add new mail Settings.
+ * add new mail Settings.
*
* @param array $params reference array contains the values submitted by the form
*
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return object CRM_Core_BAO_MailSettings object
+ * @return CRM_Core_BAO_MailSettings object
* @access public
* @static
*/
}
/**
- * Function to delete the mail settings.
+ * delete the mail settings.
*
* @param int $id mail settings id
*
}
/**
- * 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
}
/**
- * Function to delete the mapping
+ * delete the mapping
*
* @param int $id mapping id
*
}
/**
- * function to get the list of mappings
+ * get the list of mappings
*
- * @params string $mappingTypeId mapping type id
- *
- * @param $mappingTypeId
+ * @param string $mappingTypeId mapping type id
*
* @return array $mapping array of mapping name
* @access public
}
/**
- * function to get the mapping fields
- *
- * @params int $mappingId mapping id
+ * get the mapping fields
*
- * @param $mappingId
+ * @param int $mappingId mapping id
*
* @return array $mappingFields array of mapping fields
* @access public
}
/**
- *function to check Duplicate Mapping Name
- *
- * @params $nameField string mapping Name
+ * Check Duplicate Mapping Name
*
- * @params $mapTypeId string mapping Type
- *
- * @param $nameField
- * @param $mapTypeId
+ * @param $nameField string mapping Name
+ * @param $mapTypeId string mapping Type
*
* @return boolean
*/
$mapping = new CRM_Core_DAO_Mapping();
$mapping->name = $nameField;
$mapping->mapping_type_id = $mapTypeId;
- if ($mapping->find(TRUE)) {
- return TRUE;
- }
- else {
- return FALSE;
- }
+ return (bool) $mapping->find(TRUE);
}
/**
* Function returns associated array of elements, that will be passed for search
*
- * @params int $smartGroupId smart group id
- *
- * @param $smartGroupId
+ * @param int $smartGroupId smart group id
*
* @return array $returnFields associated array of elements@static
* @public
/**
* Function to build the mapping form
*
- * @params object $form form object
- * @params string $mappingType mapping type (Export/Import/Search Builder)
- * @params int $mappingId mapping id
- * @params mixed $columnCount column count is int for and array for search builder
- * @params int $blockCount block count (no of blocks shown)
- *
- * @param $form
- * @param string $mappingType
- * @param null $mappingId
- * @param $columnNo
- * @param int $blockCount
+ * @param CRM_Core_Form $form
+ * @param string $mappingType (Export/Import/Search Builder)
+ * @param int $mappingId
+ * @param int $columnNo
+ * @param int $blockCount (no of blocks shown)
* @param null $exportMode
*
* @return void
$defaultLocationType = CRM_Core_BAO_LocationType::getDefault();
- /* FIXME: dirty hack to make the default option show up first. This
- * avoids a mozilla browser bug with defaults on dynamically constructed
- * selector widgets. */
-
-
+ // FIXME: dirty hack to make the default option show up first. This
+ // avoids a mozilla browser bug with defaults on dynamically constructed
+ // selector widgets.
if ($defaultLocationType) {
$defaultLocation = $locationTypes[$defaultLocationType->id];
unset($locationTypes[$defaultLocationType->id]);
- $locationTypes = array(
- $defaultLocationType->id => $defaultLocation) + $locationTypes;
+ $locationTypes = array($defaultLocationType->id => $defaultLocation) + $locationTypes;
}
- $locationTypes = array(
- ' ' => ts('Primary')) + $locationTypes;
+ $locationTypes = array(' ' => ts('Primary')) + $locationTypes;
// since we need a hierarchical list to display contact types & subtypes,
// this is what we going to display in first selector
$contactTypes = array('Contact' => ts('Contacts')) + $contactTypes;
}
- $sel1 =
- array('' => ts('- select record type -')) + $contactTypes + $compArray;
+ $sel1 = array('' => ts('- select record type -')) + $contactTypes + $compArray;
foreach ($sel1 as $key => $sel) {
if ($key) {
}
}
- //Array for core fields and relationship custom data
-
+ // Array for core fields and relationship custom data
$relationshipTypes = CRM_Contact_BAO_Relationship::getContactRelationshipType(NULL, NULL, NULL, NULL, TRUE);
if ($mappingType == 'Export') {
}
//Location Type for relationship fields
-
foreach ($sel5 as $k => $v) {
if ($v) {
foreach ($v as $rel => $fields) {
$form->setDefaultAction('refresh');
}
- /* Function returns all custom fields with group title and
- * field label
- * @relationshipTypeId related relationship type id
- * @return $groupTitle all custom field titles
- */
/**
- * @param $relationshipTypeId
+ * Function returns all custom fields with group title and
+ * field label
*
- * @return array
+ * @param int $relationshipTypeId related relationship type id
+ *
+ * @return array all custom field titles
*/
function getRelationTypeCustomGroupData($relationshipTypeId) {
/**
* Function returns all Custom group Names
*
- * @param related $customfieldId
+ * @param int $customfieldId related file id
*
- * @internal param \related $customfieldId custom field id
* @return null|string $customGroupName all custom group names@static
*/
static function getCustomGroupName($customfieldId) {
/**
* Function returns associated array of elements, that will be passed for search
*
- * @params array $params associated array of submitted values
- * @params boolean $row row no of the fields
+ * @param array $params associated array of submitted values
+ * @param bool $row row no of the fields
*
- * @param $params
- * @param bool $row
*
* @return array $returnFields formatted associated array of elements@static
* @public
}
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
class CRM_Core_BAO_MessageTemplate extends CRM_Core_DAO_MessageTemplate {
/**
- * 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
*
- * @return object CRM_Core_BAO_MessageTemplate object
+ * @return CRM_Core_BAO_MessageTemplate object
* @access public
* @static
*/
}
/**
- * function to add the Message Templates
+ * add the Message Templates
*
* @param array $params reference array contains the values submitted by the form
*
}
/**
- * function to delete the Message Templates
+ * delete the Message Templates
*
* @access public
* @static
}
/**
- * function to get the Message Templates
+ * get the Message Templates
*
* @access public
* @static
}
/**
- * Function to get existing / build navigation for CiviCRM Admin Menu
+ * get existing / build navigation for CiviCRM Admin Menu
*
* @static
* @return array associated array
}
/**
- * Function to add/update navigation record
+ * add/update navigation record
*
* @param array associated array of submitted values
*
}
/**
- * 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
*
- * @return object CRM_Core_BAO_Navigation object on success, null otherwise
+ * @return CRM_Core_BAO_Navigation object on success, null otherwise
* @access public
* @static
*/
}
/**
- * Function to build navigation tree
+ * build navigation tree
*
* @param array $navigationTree nested array of menus
* @param int $parentID parent id
* @param array $values output values of the object
* @param int $numNotes the maximum number of notes to return (0 if all)
*
- * @internal param array $ids the array that holds all the db ids
* @return object $notes Object of CRM_Core_BAO_Note
* @access public
* @static
}
/**
- * Function to delete the notes
+ * delete the notes
*
* @param int $id note id
* @param boolean $showStatus do we need to set status or not
}
/**
- * Function to get log record count for a Contact
+ * get log record count for a Contact
*
- * @param $contactID
- *
- * @internal param int $contactId Contact ID
+ * @param int $contactID
*
* @return int $count count of log records
*
}
/**
- * Function to get all descendent notes of the note with given ID
+ * get all descendent notes of the note with given ID
*
* @param int $parentId ID of the note to start from
* @param int $maxDepth Maximum number of levels to descend into the tree; if not given, will include all descendents.
*
* @return array $ids One-dimensional array containing ids of all desendent notes
*/
- public static function getDescendentIds($parentId, &$ids = array(
- )) {
+ public static function getDescendentIds($parentId, &$ids = array()) {
// get direct children of given parentId note
$note = new CRM_Core_DAO_Note();
$note->entity_table = 'civicrm_note';
*
* @param int $contactID contact id whose notes to be deleted
*
- * @internal param array $deleteNoteID to store all deleted note ids
- *
* @return void
* @static
*/
}
/**
- * 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
*
- * @return object CRM_Core_BAO_OptionGroup object
+ * @return CRM_Core_BAO_OptionGroup object
* @access public
* @static
*/
}
/**
- * function to add the Option Group
+ * add the Option Group
*
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
}
/**
- * Function to delete Option Group
+ * delete Option Group
*
* @param int $optionGroupId Id of the Option Group to be deleted.
*
}
/**
- * Function to get title of the option group
+ * get title of the option group
*
* @param int $optionGroupId Id of the Option Group.
*
return $bao->nextvalue;
}
/**
- * 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
*
- * @return object CRM_Core_BAO_OptionValue object
+ * @return CRM_Core_BAO_OptionValue object
* @access public
* @static
*/
}
/**
- * Function to add an Option Value
+ * add an Option Value
*
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
}
/**
- * Function to delete Option Value
+ * delete Option Value
*
- * @param $optionValueId
- *
- * @internal param int $optionGroupId Id of the Option Group to be deleted.
+ * @param int $optionValueId
*
* @return boolean
*
}
/**
- * Function to retrieve activity type label and description
+ * retrieve activity type label and description
*
* @param int $activityTypeId activity type id
*
/**
* updates options values weights.
*
- * @param $opGroupId
+ * @param int $opGroupId
* @param array $opWeights options value , weight pair
*
- * @internal param int $opGroupIde option group id.
* @return void
* @access public
* @static
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $values (reference ) an assoc array to hold the flattened values
*
- * @return object CRM_Core_DAO_OptionValue object
+ * @return CRM_Core_DAO_OptionValue object
* @access public
* @static
*/
}
/**
- * Function to delete a Paper Size
+ * delete a Paper Size
*
* @param int $id ID of the Paper Size to be deleted.
*
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $values (reference ) an assoc array to hold the flattened values
*
- * @return object CRM_Core_DAO_OptionValue object
+ * @return CRM_Core_DAO_OptionValue object
* @access public
* @static
*/
}
/**
- * Function to delete a PDF Page Format
+ * delete a PDF Page Format
*
* @param int $id ID of the PDF Page Format to be deleted.
*
class CRM_Core_BAO_Persistent extends CRM_Core_DAO_Persistent {
/**
- * 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
*
- * @return object CRM_Core_BAO_Persistent object
+ * @return CRM_Core_BAO_Persistent object
* @access public
* @static
*/
}
/**
- * function to add the Persistent Record
+ * add the Persistent Record
*
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
* @param array $params input parameters
*/
/**
- * @param $params
+ * @param array $params
*
* @return object
* @throws API_Exception
* @access public
* @static
*/
- static function allPhones($id, $updateBlankLocInfo = FALSE, $type = NULL, $filters = array(
- )) {
+ static function allPhones($id, $updateBlankLocInfo = FALSE, $type = NULL, $filters = array()) {
if (!$id) {
return NULL;
}
class CRM_Core_BAO_Preferences {
/**
- * @param $params
+ * @param array $params
*/
static function fixAndStoreDirAndURL(&$params) {
$sql = "
}
/**
- * @param $params
+ * @param array $params
* @param string $type
*/
static function storeDirectoryOrURLPreferences(&$params, $type = 'directory') {
}
/**
- * @param $params
+ * @param array $params
* @param bool $setInConfig
*/
static function retrieveDirectoryAndURLPreferences(&$params, $setInConfig = FALSE) {
}
/**
- * 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
*
- * @return object CRM_Core_BAO_PreferencesDate object on success, null otherwise
+ * @return CRM_Core_BAO_PreferencesDate object on success, null otherwise
* @access public
* @static
*/
}
/**
- * Function to delete preference dates
+ * delete preference dates
*
* @param int $id
*
CRM_Core_DAO::executeQuery($sql, $params);
}
-
- /* function for saving the checkbox selections
- * $action select - select a particular contact
- * unselect - unselect a particular contact
- */
/**
+ * Save checkbox selections
+ *
* @param $cacheKey
* @param string $action
- * @param null $cIds
+ * @param array $cIds
* @param string $entity_table
*/
static function markSelection($cacheKey, $action = 'unselect', $cIds = NULL, $entity_table = 'civicrm_contact') {
}
/**
- * function to get the selections
+ * get the selections
*
* @param string $cacheKey cache key
* @param string $action action
}
/**
- * @param $obj
- * @param $params
+ * @param CRM_Core_Form $form
+ * @param array $params
*
* @return mixed
*/
- static function buildSelectedContactPager( &$obj, &$params) {
+ static function buildSelectedContactPager(&$form, &$params) {
$params['status'] = ts('Contacts %%StatusMessage%%');
$params['csvString'] = NULL;
$params['buttonTop'] = 'PagerTopButton';
$params['buttonBottom'] = 'PagerBottomButton';
- $params['rowCount'] = $obj->get(CRM_Utils_Pager::PAGE_ROWCOUNT);
+ $params['rowCount'] = $form->get(CRM_Utils_Pager::PAGE_ROWCOUNT);
if (!$params['rowCount']) {
$params['rowCount'] = CRM_Utils_Pager::ROWCOUNT;
}
- $qfKey = CRM_Utils_Request::retrieve('qfKey','String', $this);
+ $qfKey = CRM_Utils_Request::retrieve('qfKey','String', $form);
$cacheKey = "civicrm search {$qfKey}";
$query = "
";
$params1[1] = array("{$cacheKey}%", 'String');
$params1[2] = array("{$cacheKey}_alphabet%", 'String');
- $paramsTotal = CRM_Core_DAO::singleValueQuery($query, $params1);
+ $paramsTotal = CRM_Core_DAO::singleValueQuery($query, $params1);
$params['total'] = $paramsTotal;
- $obj->_pager = new CRM_Utils_Pager($params);
- $obj->assign_by_ref('pager', $obj->_pager);
- list($offset, $rowCount) = $obj->_pager->getOffsetAndRowCount();
+ $form->_pager = new CRM_Utils_Pager($params);
+ $form->assign_by_ref('pager', $form->_pager);
+ list($offset, $rowCount) = $form->_pager->getOffsetAndRowCount();
$params['offset'] = $offset;
$params['rowCount1'] = $rowCount;
return $params;
self::$status = $status;\r
}\r
/**\r
- * Function to save records in civicrm_recujrring_entity table\r
+ * save records in civicrm_recujrring_entity table\r
*\r
* @param array $params reference array contains the values submitted by the form\r
*\r
}\r
\r
/**\r
- * Update mode column in civicrm_recurring_entity table for event related tabs\r
- *\r
- * @params int $entityId event id\r
- * @params string $linkedEntityTable Linked entity table name for this event\r
- * @return array\r
- */\r
+ * Update mode column in civicrm_recurring_entity table for event related tabs\r
+ *\r
+ * @param int $entityId event id\r
+ * @param string $linkedEntityTable Linked entity table name for this event\r
+ * @return array\r
+ */\r
public static function updateModeLinkedEntity($entityId, $linkedEntityTable, $mainEntityTable) {\r
$result = array();\r
if ( $entityId && $linkedEntityTable && $mainEntityTable ) {\r
class CRM_Core_BAO_SchemaHandler {
/**
- * Function for creating a civiCRM-table
+ * Create a CiviCRM-table
*
- * @param $params
- *
- * @internal param String $tableName name of the table to be created.
- * @internal param Array $tableAttributes array containing atrributes for the table that needs to be created
+ * @param array $params
*
* @return true if successfully created, false otherwise
*
}
/**
- * @param $params
+ * @param array $params
*
* @return string
*/
}
/**
- * @param $params
+ * @param array $params
* @param $separator
* @param $prefix
*
}
/**
- * @param $params
+ * @param array $params
* @param $separator
* @param $prefix
*
}
/**
- * @param $params
+ * @param array $params
* @param $separator
* @param $prefix
* @param bool $indexExist
}
/**
- * @param $params
+ * @param array $params
* @param $separator
* @param $prefix
*
}
/**
- * @param $params
+ * @param array $params
* @param $separator
* @param $prefix
* @param $tableName
}
/**
- * @param $params
+ * @param array $params
* @param bool $indexExist
* @param bool $triggerRebuild
*
}
/**
- * Function to delete a civiCRM-table
+ * delete a civiCRM-table
*
* @param String $tableName name of the table to be created.
*
* @param string $createIndexPrefix
* @param array $substrLenghts
*/
- static function createIndexes(&$tables, $createIndexPrefix = 'index', $substrLenghts = array(
- )) {
+ static function createIndexes(&$tables, $createIndexPrefix = 'index', $substrLenghts = array()) {
$queries = array();
-
- require_once 'CRM/Core/DAO/Domain.php';
+ require_once 'CRM/Core/DAO/Domain.php';
$domain = new CRM_Core_DAO_Domain;
$domain->find(TRUE);
$locales = explode(CRM_Core_DAO::VALUE_SEPARATOR, $domain->locales);
return TRUE;
}
- /**
- * Delete some or all of the items in the settings table
- *
- * @param string $group The group name of the entries to be deleted
- * @param string $name The name of the setting to be deleted
- * @param int $componentID The optional component ID (so componenets can share the same name space)
- *
- * @return void
- * @static
- * @access public
- *
- static function deleteItem($group, $name = NULL, $componentID = NULL, $contactID = NULL) {
- $dao = self::dao($group, $name, $componentID, $contactID);
- $dao->delete();
-
- // also reset memory cache if any
- CRM_Utils_System::flushCache();
-
- $cacheKey = self::inCache($group, $name, $componentID, $contactID, FALSE);
- if ($cacheKey) {
- if ($name) {
- unset(self::$_cache[$cacheKey][$name]);
- }
- else {
- unset(self::$_cache[$cacheKey]);
- }
- }
- }*/
-
/**
* This provides information about the setting - similar to the fields concept for DAO information.
* As the setting is serialized code creating validation setting input needs to know the data type
*
* The following params will filter the result. If none are passed all settings will be returns
*
- * @params string $name Name of specific setting e.g customCSSURL
- * @params integer $componentID id of relevant component.
- *
- * @param null $componentID
+ * @param int $componentID id of relevant component
* @param array $filters
- * @param null $domainID
+ * @param int $domainID
* @param null $profile
*
* @return array $result - the following information as appropriate for each setting
}
/**
- * @param $params
+ * @param array $params
* @param null $domainID
*/
static function fixAndStoreDirAndURL(&$params, $domainID = NULL) {
}
/**
- * @param $params
+ * @param array $params
* @param $group
*/
static function storeDirectoryOrURLPreferences(&$params, $group) {
}
/**
- * @param $params
+ * @param array $params
* @param bool $setInConfig
*/
static function retrieveDirectoryAndURLPreferences(&$params, $setInConfig = FALSE) {
}
/**
- * 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
}
/**
- * Function to delete the tag
+ * delete the tag
*
* @param int $id tag id
*
}
/**
- * Function to get the tag sets for a entity object
+ * get the tag sets for a entity object
*
* @param string $entityTable entity_table
*
}
/**
- * Function to get the tags that are not children of a tagset.
+ * get the tags that are not children of a tagset.
*
* @return array $tags associated array of tag name and id@access public
* @static
/**
- * 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
*
- * @return object CRM_Core_BAO_UFField object
+ * @return CRM_Core_BAO_UFField object
* @access public
* @static
*/
}
/**
- * Function to check duplicate for duplicate field in a group
+ * check duplicate for duplicate field in a group
*
* @param array $params an associative array with field and values
* @param $ids
}
/**
- * function to add the UF Field
+ * add the UF Field
*
* @param array $params (reference) array containing the values submitted by the form
* @param array $ids array containing the id
*
- * @return object CRM_Core_BAO_UFField object
+ * @return CRM_Core_BAO_UFField object
*
* @access public
* @static
}
/**
- * Function to enable/disable profile field given a custom field id
+ * enable/disable profile field given a custom field id
*
* @param int $customFieldId custom field id
* @param boolean $is_active set the is_active field
/**
* Function to check the status of custom field used in uf fields
*
- * @params int $UFFieldId uf field id
- *
- * @param $UFFieldId
+ * @param int $UFFieldId
*
* @return boolean false if custom field are disabled else true
* @static
}
/**
- * function to check for mix profile fields (eg: individual + other contact types)
- *
- * @params int $ufGroupId uf group id
- * @params boolean $check this is to check mix profile (if true it will check if profile is
- * pure ie. it contains only one contact type)
+ * Check for mix profile fields (eg: individual + other contact types)
*
- * @param $ufGroupId
+ * @param int $ufGroupId
*
* @return true for mix profile else false
- * @acess public
+ * @access public
* @static
*/
static function checkProfileType($ufGroupId) {
*
* @param bool $skipComponentType
*
- * @return profile group_type
- * @acess public
+ * @return string profile group_type
+ * @access public
* @static
*
* TODO Why is this function in this class? It seems to be about the UFGroup.
/**
* function to get the profile type (eg: individual/organization/household)
*
- * @param $ufGroupType
+ * @param string $ufGroupType
* @param boolean $returnMixType this is true, then field type of mix profile field is returned
* @param boolean $onlyPure true if only pure profiles are required
- *
* @param bool $skipComponentType
*
- * @internal param int $ufGroupId uf group id
- * @return profile group_type
- * @acess public
+ * @return string profile group_type
+ * @access public
* @static
*
* TODO Why is this function in this class? It seems to be about the UFGroup.
* @param $ctype
*
* @return true for mix profile group else false
- * @acess public
+ * @access public
* @static
*/
static function checkProfileGroupType($ctype) {
}
/**
- * check for searchable or in selector field for given profile.
+ * Check for searchable or in selector field for given profile.
*
- * @params int $profileID profile id.
- *
- * @param $profileID
+ * @param int $profileID
*
* @return boolean $result true/false.
*/
}
/**
- *Reset In selector and is seachable values for given $profileID.
- *
- * @params int $profileID profile id.
+ * Reset In selector and is searchable values for given $profileID.
*
- * @param $profileID
+ * @param int $profileID
*
* @return void.
*/
static $_matchFields = NULL;
/**
- * 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
* @param $searchable
* @param bool $showAll
* @param string $restrict should we restrict based on a specified profile type
- *
* @param bool $skipPermission
* @param null $ctype
* @param int $permissionType
* @param string $orderBy
* @param null $orderProfiles
*
- * @internal param bool $showall
* @return array the fields that belong to this ufgroup(s)
* @static
* @access public
* @param null $ctype
* @param int $permissionType
*
- * @internal param bool $showall
* @return array
- * @see getFields
+ * @see self::getFields
*/
public static function formatUFFields(
$groupArr,
* @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
+ * @return int|null contact_id if found, null otherwise
* @access public
* @static
*/
* @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
}
/**
- * function to add the UF Group
+ * add the UF Group
*
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
}
/**
- * Function to make uf join entries for an uf group
+ * make uf join entries for an uf group
*
* @param array $params (reference) an assoc array of name/value pairs
* @param int $ufGroupId ufgroup id
}
/**
- * Function to get the UF Join records for an ufgroup id
- *
- * @params int $ufGroupId uf group id
- * @params int $displayName if set return display name in array
- * @params int $status if set return module other than default modules (User Account/User registration/Profile)
+ * get the UF Join records for an ufgroup id
*
- * @param null $ufGroupId
- * @param null $displayName
- * @param null $status
+ * @param int $ufGroupId uf group id
+ * @param int $displayName if set return display name in array
+ * @param int $status if set return module other than default modules (User Account/User registration/Profile)
*
* @return array $ufGroupJoinRecords
*
*
* @param array $params (reference) an assoc array of name/value pairs
*
- * @return object CRM_Core_BAO_UFJoin object
+ * @return CRM_Core_BAO_UFJoin object
* @access public
* @static
*/
* @param int $op - which operation (view, edit, create, etc) to check permission for
* @param array|NULL $returnFields list of UFGroup fields to return; NULL for default
*
- * @internal param bool $skipPermision - whether to add permission clause
* @return array $ufGroups array of ufgroups for a module
* @access public
* @static
/**
* Function to filter ufgroups based on logged in user contact type
*
- * @params int $ufGroupId uf group id (profile id)
- *
- * @param $ufGroupId
- * @param null $contactID
+ * @param int $ufGroupId uf group id (profile id)
+ * @param int $contactID
*
* @return boolean true or false
* @static
/**
* Function to set profile defaults
*
- * @params int $contactId contact id
- * @params array $fields associative array of fields
- * @params array $defaults defaults array
- * @params boolean $singleProfile true for single profile else false(batch update)
- * @params int $componentId id for specific components like contribute, event etc
- *
- * @param $contactId
- * @param $fields
- * @param $defaults
- * @param bool $singleProfile
- * @param null $componentId
- * @param null $component
+ * @param int $contactId contact id
+ * @param array $fields associative array of fields
+ * @param array $defaults defaults array
+ * @param boolean $singleProfile true for single profile else false(batch update)
+ * @param int $componentId id for specific components like contribute, event etc
+ * @param null $component
*
* @return null
* @static
/**
* Process that send notification e-mails
*
- * @params int $contactId contact id
- * @params array $values associative array of name/value pair
- *
- * @param $contactID
- * @param $values
+ * @param int $contactID contact id
+ * @param array $values associative array of name/value pair
*
* @return void
* @access public
* for this group and notify email only if group's notify field is
* set and field values are not empty
*
- * @params $gid group id
- * @params $cid contact id
- * @params $params associative array
- *
- * @param $gid
- * @param $cid
- * @param $params
+ * @param int $gid group id
+ * @param int $cid contact id
+ * @param array $params
* @param bool $skipCheck
*
* @return array
/**
* Function to assign uf fields to template
*
- * @params int $gid group id
- * @params array $values associative array of fields
- *
- * @param $gid
- * @param $values
- * @param $template
+ * @param int $gid group id
+ * @param array $values
+ * @param CRM_Core_Smarty $template
*
* @return void
* @access public
/**
* calculate the profile type 'group_type' as per profile fields.
*
- * @param $gId
+ * @param int $gId profile id
* @param bool $includeTypeValues
* @param int $ignoreFieldId ignore particular profile field
*
- * @internal param int $gid profile id
* @return array list of calculated group type
*/
static function calculateGroupType($gId, $includeTypeValues = FALSE, $ignoreFieldId = NULL) {
* @param bool $includeTypeValues
* @param int $ignoreFieldId ignore perticular profile field
*
- * @internal param int $gid profile id
* @return array list of calculated group type
*/
static function _calculateGroupType($ufFields, $includeTypeValues = FALSE, $ignoreFieldId = NULL) {
* BirthDate + SurveyOrPhoneField + SurveyOnlyField Individual,Activity\0ActivityType:2:28
* BirthDate + StudentField + Subject + SurveyOnlyField Individual,Activity,Student\0ActivityType:28
*
- * @param $gId
- * @param Array $groupTypes With key having group type names
+ * @param int $gId
+ * @param array $groupTypes With key having group type names
*
- * @internal param int $gid profile id
* @return Boolean
*/
- static function updateGroupTypes($gId, $groupTypes = array(
- )) {
+ static function updateGroupTypes($gId, $groupTypes = array()) {
if (!is_array($groupTypes) || !$gId) {
return FALSE;
}
/**
* function to get group type values of the profile
*
- * @params Integer $profileId Profile Id
- * @params String $groupType Group Type
- *
- * @param $profileId
- * @param null $groupType
+ * @param int $profileId
+ * @param string $groupType
*
* @return Array group type values
* @static
*
* @param array $params (reference) an assoc array of name/value pairs
*
- * @return object CRM_Core_DAO_UFJoin object
+ * @return CRM_Core_DAO_UFJoin object
* @access public
* @static
*/
}
/**
- * @param $params
+ * @param array $params
*/
public static function deleteAll(&$params) {
$module = CRM_Utils_Array::value('module', $params);
}
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
* @param array $params input parameters
*/
/**
- * @param $params
+ * @param array $params
*
* @return CRM_Core_DAO_UFMatch
*/
* Update the email value for the contact and user profile
*
* @param $contactId Int Contact ID of the user
- * @param $emailAddress
- *
- * @internal param String $email email to be modified for the user
+ * @param $emailAddress email to be modified for the user
*
* @return void
* @access public
* Given the list of params in the params array, fetch the object
* and store the values in the values array
*
- * @param $params
+ * @param array $params
* @param $values
*
- * @internal param \entityBlock $array input parameters to find object
- *
* @return boolean
* @access public
* @static
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
- * @return object CRM_Core_DAO_WordRepalcement object
+ * @return CRM_Core_DAO_WordRepalcement object
* @access public
* @static
*/
/**
* Save the values of a WordReplacement
*
- * @param $params
+ * @param array $params
* @param $id
*
* @return WordReplacement array
/**
* Create a new WordReplacement
*
- * @param $params
+ * @param array $params
*
* @return WordReplacement array
* @access public
/**
* returns the desired property from the $_properties array
*
- * @params int $id one of the class constants (ADD, SEARCH, etc.)
- * @params string $property the desired property
- *
- * @param $id
- * @param $property
+ * @param int $id one of the class constants (ADD, SEARCH, etc.)
+ * @param string $property the desired property
*
* @return string the value of the desired property
*/
/**
* sets the desired property in the $_properties array
*
- * @params int $id one of the class constants (ADD, SEARCH, etc.)
- * @params string $property the desired property
- * @params string $value the value of the desired property
+ * @param int $id one of the class constants (ADD, SEARCH, etc.)
+ * @param string $property the desired property
+ * @param string $value the value of the desired property
*
- * @param $id
- * @param $property
- * @param $value
* @return void
*/
static function setProperty($id, $property, $value) {
*/
class CRM_Core_Component {
- /*
- * End part (filename) of the component information class'es name
- * that needs to be present in components main directory.
- */
+ /**
+ * End part (filename) of the component information class'es name
+ * that needs to be present in components main directory.
+ */
CONST COMPONENT_INFO_CLASS = 'Info';
private static $_info = NULL;
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
static function &buildSearchForm(&$form) {
$info = self::_info();
}
/**
- * Function to handle table dependencies of components
+ * handle table dependencies of components
*
* @param array $tables array of tables
*
}
/**
- * Function to get components info from info file
+ * get components info from info file
*
*/
static function getComponentsFromFile($crmFolderDir) {
abstract class CRM_Core_Component_Info {
- /*
- * Name of the class (minus component namespace path)
- * of the component invocation class'es name.
- */
+ /**
+ * Name of the class (minus component namespace path)
+ * of the component invocation class'es name.
+ */
CONST COMPONENT_INVOKE_CLASS = 'Invoke';
- /*
- * Name of the class (minus component namespace path)
- * of the component configuration class'es name.
- */
+ /**
+ * Name of the class (minus component namespace path)
+ * of the component configuration class'es name.
+ */
CONST COMPONENT_CONFIG_CLASS = 'Config';
- /*
- * Name of the class (minus component namespace path)
- * of the component BAO Query class'es name.
- */
+ /**
+ * Name of the class (minus component namespace path)
+ * of the component BAO Query class'es name.
+ */
CONST COMPONENT_BAO_QUERY_CLASS = 'BAO_Query';
- /*
- * Name of the class (minus component namespace path)
- * of the component user dashboard plugin.
- */
+ /**
+ * Name of the class (minus component namespace path)
+ * of the component user dashboard plugin.
+ */
CONST COMPONENT_USERDASHBOARD_CLASS = 'Page_UserDashboard';
- /*
- * Name of the class (minus component namespace path)
- * of the component tab offered to contact record view.
- */
+ /**
+ * Name of the class (minus component namespace path)
+ * of the component tab offered to contact record view.
+ */
CONST COMPONENT_TAB_CLASS = 'Page_Tab';
- /*
- * Name of the class (minus component namespace path)
- * of the component tab offered to contact record view.
- */
+ /**
+ * Name of the class (minus component namespace path)
+ * of the component tab offered to contact record view.
+ */
CONST COMPONENT_ADVSEARCHPANE_CLASS = 'Form_Search_AdvancedSearchPane';
- /*
- * Name of the directory (assumed in component directory)
- * where xml resources used by this component live.
- */
+ /**
+ * Name of the directory (assumed in component directory)
+ * where xml resources used by this component live.
+ */
CONST COMPONENT_XML_RESOURCES = 'xml';
- /*
- * Name of the directory (assumed in xml resources path)
- * containing component menu definition XML file names.
- */
+ /**
+ * Name of the directory (assumed in xml resources path)
+ * containing component menu definition XML file names.
+ */
CONST COMPONENT_MENU_XML = 'Menu';
- /*
+ /**
* Stores component information.
* @var array component settings as key/value pairs
*/
*/
protected $keyword;
- /*
- * Class constructor, sets name and namespace (those are stored
- * in the component registry (database) and no need to duplicate
- * them here, as well as populates the info variable.
- *
+ /**
* @param string $name name of the component
* @param string $namespace namespace prefix for component's files
- * @access public
- *
- */
- /**
- * @param $name
- * @param $namespace
- * @param $componentID
+ * @param int $componentID
*/
public function __construct($name, $namespace, $componentID) {
$this->name = $name;
}
/**
- * function to check if running in upgrade mode
+ * check if running in upgrade mode
*/
static function isUpgradeMode($path = NULL) {
if (defined('CIVICRM_UPGRADE_ACTIVE')) {
}
/**
- * Function to format size
+ * format size
*
* @access public
* @static
}
/**
- * Function to set the default values
+ * set the default values
*
* @param array $defaults associated array of form elements
* @param bool|\boolena $formMode this funtion is called to set default
/**
* All CRM single or multi page pages should inherit from this class.
*
- * @param null $title
- * @param bool $modal
+ * @param string $title descriptive title of the controller
+ * @param bool $modal whether controller is modal
* @param null $mode
- * @param null $scope
- * @param bool $addSequence
- * @param bool $ignoreKey
- *
- * @internal param \title $string descriptive title of the controller
- * @internal param \whether $boolean controller is modal
- * @internal param \scope $string name of session if we want unique scope, used only by Controller_Simple
- * @internal param \addSequence $boolean should we add a unique sequence number to the end of the key
- * @internal param \ignoreKey $boolean should we not set a qfKey for this controller (for standalone forms)
+ * @param string $scope name of session if we want unique scope, used only by Controller_Simple
+ * @param bool $addSequence should we add a unique sequence number to the end of the key
+ * @param bool $ignoreKey should we not set a qfKey for this controller (for standalone forms)
*
* @access public
*
- * @return \CRM_Core_Controller
+ * @return CRM_Core_Controller
*/
function __construct(
$title = NULL,
/**
* getter method for stateMachine
*
- * @return object
+ * @return CRM_Core_StateMachine
* @access public
*/
function getStateMachine() {
/**
* setter method for stateMachine
*
- * @param object a stateMachineObject
+ * @param CRM_Core_StateMachine $stateMachine
*
* @return void
* @access public
* 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 CRM_Core_StateMachine $stateMachine
* @param \const|int $action the mode in which the state machine is operating
* typicaly this will be add/view/edit
*
}
/**
- * function to destroy all the session state of the controller.
+ * destroy all the session state of the controller.
*
* @access public
*
/**
* Get the variable from the form scope
*
- * @param string name : name of the variable
+ * @param string $name : name of the variable
*
* @access public
}
/**
- * @param $wizard
+ * @param array $wizard
*/
function addWizardStyle(&$wizard) {
$wizard['style'] = array(
/**
* assign value to name in template
*
- * @param $var
+ * @param string $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 $var
+ * @param string $var
* @param mixed $value (reference) value of varaible
*
- * @internal param array|string $name name of variable
* @return void
* @access public
*/
*
* @param string $name
*
- * @internal param string $type
* @return array
*/
function get_template_vars($name=null) {
* @param bool $title
* @param string path the class Path of the form being implemented
* @param bool $imageUpload
- * @param bool $addSequence
- * @param bool $ignoreKey
+ * @param bool $addSequence should we add a unique sequence number to the end of the key
+ * @param bool $ignoreKey should we not set a qfKey for this controller (for standalone forms)
* @param bool $attachUpload
*
- * @internal param \addSequence $boolean should we add a unique sequence number to the end of the key
- * @internal param \ignoreKey $boolean should we not set a qfKey for this controller (for standalone forms)
*
* @return \CRM_Core_Controller_Simple
- @access public
+ * @access public
*/
function __construct(
$path,
/**
* @param $fieldName
* @param $fieldDef
- * @param $params
+ * @param array $params
*
*/
protected function assignTestFK($fieldName, $fieldDef, $params) {
* @param array $tables
*
* @throws Exception
- * @internal param string $tableName
*
* @return boolean true if CONSTRAINT keyword exists, false otherwise
*/
}
$result = preg_match("/\bCONSTRAINT\b\s/i", $show[$tableName]) ? TRUE : FALSE;
- if($result == TRUE){
+ if ($result == TRUE){
continue;
}
- else{
+ else {
return FALSE;
}
}
}
/**
- * 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 string $daoName name of the dao object
* @param array $params (reference ) an assoc array of name/value pairs
* @param bool $i18nRewrite
* @param bool $trapException
*
- * @return Object CRM_Core_DAO object that holds the results of the query
+ * @return CRM_Core_DAO object that holds the results of the query
* @static
* @access public
*/
$trapException = FALSE
) {
$queryStr = self::composeQuery($query, $params, $abort);
- //CRM_Core_Error::debug( 'q', $queryStr );
if (!$daoName) {
$dao = new CRM_Core_DAO();
/**
* @param $query
- * @param $params
+ * @param array $params
* @param bool $abort
*
* @return string
static function freeResult($ids = NULL) {
global $_DB_DATAOBJECT;
- /***
- $q = array( );
- foreach ( array_keys( $_DB_DATAOBJECT['RESULTS'] ) as $id ) {
- $q[] = $_DB_DATAOBJECT['RESULTS'][$id]->query;
- }
- CRM_Core_Error::debug( 'k', $q );
- return;
- ***/
-
if (!$ids) {
if (!$_DB_DATAOBJECT ||
!isset($_DB_DATAOBJECT['RESULTS'])
}
/**
- * 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 string $daoName name of the dao object
* @param string $fieldIdName
* @param $details
* @param array $returnProperities an assoc array of fields that need to be returned, eg array( 'first_name', 'last_name')
*
- * @internal param array $params (reference ) an assoc array of name/value pairs
- * @internal param array $defaults (reference ) an assoc array to hold the flattened values
* @return object an object of type referenced by daoName
* @access public
* @static
* createOnly: only create in database, do not store or return the objects (useful for perf testing)
* ONLY USE FOR TESTING
*
- * @param $daoName
+ * @param string $daoName
* @param array $params
* @param int $numObjects
* @param bool $createOnly
* deletes the this object plus any dependent objects that are associated with it
* ONLY USE FOR TESTING
*
- * @param $daoName
+ * @param string $daoName
* @param array $params
*/
- static function deleteTestObjects($daoName, $params = array(
- )) {
+ static function deleteTestObjects($daoName, $params = array()) {
//this is a test function also backtrace is set for the test suite it sometimes unsets itself
// so we re-set here in case
$config = CRM_Core_Config::singleton();
* Set defaults when creating new entity
* (don't call this set defaults as already in use with different signature in some places)
*
- * @param $params
+ * @param array $params
* @param $defaults
*/
static function setCreateDefaults(&$params, $defaults) {
* $field => array('LIKE' => array('%me%))
* etc
*
- * @param $fieldName
+ * @param string $fieldName name of fields
* @param $filter array filter to be applied indexed by operator
* @param $type String type of field (not actually used - nor in api @todo )
* @param $alias String alternative field name ('as') @todo- not actually used
* this is primarily so we can add filters @ the api level to the Query object based fields
*
* @throws Exception
- * @internal param string $fieldname name of fields
+ *
* @todo a better solution would be for the query object to apply these filters based on the
* api supported format (but we don't want to risk breakage in alpha stage & query class is scary
* @todo @time of writing only IN & NOT IN are supported for the array style syntax (as test is
// unary operators
case 'IS NULL':
case 'IS NOT NULL':
- if(!$returnSanitisedArray) {
+ if (!$returnSanitisedArray) {
return (sprintf('%s %s', $fieldName, $operator));
}
- else{
+ else {
return (sprintf('%s %s ', $fieldName, $operator));
}
break;
if (empty($criteria[0]) || empty($criteria[1])) {
throw new Exception("invalid criteria for $operator");
}
- if(!$returnSanitisedArray) {
+ if (!$returnSanitisedArray) {
return (sprintf('%s ' . $operator . ' "%s" AND "%s"', $fieldName, CRM_Core_DAO::escapeString($criteria[0]), CRM_Core_DAO::escapeString($criteria[1])));
}
- else{
+ else {
return NULL; // not yet implemented (tests required to implement)
}
break;
'CRM_Core_DAO',
'escapeString'
), $criteria);
- if(!$returnSanitisedArray) {
+ if (!$returnSanitisedArray) {
return (sprintf('%s %s ("%s")', $fieldName, $operator, implode('", "', $escapedCriteria)));
}
return $escapedCriteria;
// binary operators
default:
- if(!$returnSanitisedArray) {
+ if (!$returnSanitisedArray) {
return(sprintf('%s %s "%s"', $fieldName, $operator, CRM_Core_DAO::escapeString($criteria)));
}
- else{
+ else {
return NULL; // not yet implemented (tests required to implement)
}
}
}
// easy return for calls that dont need a randomized uniq string
- if (! $makeRandom) {
+ if (!$makeRandom) {
return substr($string, 0, $length);
}
}
/**
- * @param $params
+ * @param array $params
*/
function setApiFilter(&$params) {}
* @param string exception message
* @param int $code
* @param Exception $previous
- *
- * @internal param array|\Exception|int|null|\PEAR_Error $exception cause
- * @internal param int|null $exception code or null
*/
public function __construct($message = NULL, $code = 0, Exception$previous = NULL) {
parent::__construct($message, $code, $previous);
/**
* display an error page with an error message describing what happened
*
- * @param null $message
- * @param null $code
- * @param null $email
+ * @param string $message the error message
+ * @param string $code the error code if any
+ * @param string $email the email address to notify of this situation
*
* @throws Exception
- * @internal param \message $string the error message
- * @internal param \code $string the error code if any
- * @internal param \email $string the email address to notify of this situation
*
* @return void
* @static
- * @acess public
+ * @access public
*/
static function fatal($message = NULL, $code = NULL, $email = NULL) {
$vars = array(
*
* @return void
* @static
- * @acess public
+ * @access public
*/
static function handleUnhandledException($exception) {
$config = CRM_Core_Config::singleton();
* Similar to the function debug. Only difference is
* in the formatting of the output.
*
- * @param $variable_name
- * @param $variable
- * @param bool $print
- * @param bool $log
+ * @param string $variable_name
+ * @param mixed $variable
+ * @param bool $print should we use print_r ? (else we use var_dump)
+ * @param bool $log should we log or return the output
* @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
*
* @access public
}
/**
- * Function to reset the error stack
+ * reset the error stack
*
* @access public
* @static
/**
* assign value to name in template
*
- * @param $var
- * @param mixed $value value of varaible
+ * @param string $var name of variable
+ * @param mixed $value value of variable
*
- * @internal param array|string $name name of variable
* @return void
* @access public
*/
/**
* assign value to name in template by reference
*
- * @param $var
+ * @param string $var name of variable
* @param mixed $value value of varaible
*
- * @internal param array|string $name name of variable
* @return void
* @access public
*/
*
* @param string $name
*
- * @internal param string $type
* @return array
*/
function get_template_vars($name=null) {
* the form with a customized title for the main Submit
*
* @param string $title title of the main button
- * @param string $nextType
+ * @param string $nextType button type for the form after processing
* @param string $backType
* @param bool|string $submitOnce If true, add javascript to next button submit which prevents it from being clicked more than once
*
- * @internal param string $type button type for the form after processing
* @return void
* @access public
*/
}
/**
- * Function to add date
- * @param string $name name of the element
- * @param string $label label of the element
- * @param array $attributes key / value pair
+ * Add date
+ * @param string $name name of the element
+ * @param string $label label of the element
+ * @param array $attributes key / value pair
*
- // if you need time
- * $attributes = array ( 'addTime' => true,
- * 'formatType' => 'relative' or 'birth' etc check advanced date settings
- * );
- * @param boolean $required true if required
+ * // if you need time
+ * $attributes = array(
+ * 'addTime' => true,
+ * 'formatType' => 'relative' or 'birth' etc check advanced date settings
+ * );
+ * @param boolean $required true if required
*
*/
function addDate($name, $label, $required = FALSE, $attributes = NULL) {
* @param array $profiles ids of profiles that are on the form (to be autofilled)
* @param array $autoCompleteField
*
- * @internal param array $field metadata of field to use as selector including
* - name_field
* - id_field
* - url (for ajax lookup)
/**
* This function is to build the date-format form
*
- * @param Object $form the form object that we are operating on
+ * @param CRM_Core_Form $form the form object that we are operating on
*
* @static
* @access public
* This function is to retrieve the date range - relative or absolute
* and assign it to the form
*
- * @param object $form - the form the dates should be added to
+ * @param CRM_Core_Form $form - the form the dates should be added to
* @param string $fieldName
* @param integer $count
* @param string $from
* This function is to build the date range array that will provide the form option values
* It can be - relative or absolute
*
- * @param Object $form the form object that we are operating on
+ * @param CRM_Core_Form $form the form object that we are operating on
* @param string $fieldName
* @param integer $count
* @param String $from
* @param string $dateFormat
* @param boolean $displayTime
*
- * @internal param int $count
* @return null
*/
static function addDateRangeToForm(&$form, $fieldName, $selector, $from = '_from', $to = '_to', $fromLabel = 'From:', $required = FALSE, $dateFormat = 'searchDate', $displayTime = FALSE) {
}\r
\r
/**\r
- * This function sets the default values for the form. For edit/view mode\r
+ * Set default values for the form. For edit/view mode\r
* the default values are retrieved from the database\r
*\r
* @access public\r
}\r
\r
/**\r
- * Function to process the form\r
+ * Process the form submission\r
*\r
* @access public\r
*\r
}\r
}\r
}\r
- //end of function\r
\r
/**\r
* Return a descriptive name for the page, used in wizard header\r
public $_entityTagValues;
/**
- * Function to build tag widget if correct parent is passed
+ * build tag widget if correct parent is passed
*
* @param CRM_Core_Form $form form object
* @param string $parentNames parent name ( tag name)
* @param boolean $skipEntityAction true if need to add entry in entry table via ajax
* @param string $tagsetElementName if you need to create tagsetlist with specific name
*
- * @internal param bool $searchMode true if widget is used in search eg: advanced search
* @return void
* @access public
* @static
}
/**
- * Function to save entity tags when it is not save used AJAX
+ * save entity tags when it is not save used AJAX
*
* @param array $params associated array
* @param int $entityId entity id, eg: contact id, activity id, case id, file id
* @param string $entityTable entity table
- * @param object $form form object
+ * @param CRM_Core_Form $form form object
*
* @return void
* @access public
*
* @param $locale string locale of the view
* @param $table string table of the view
- * @param $dao object a DAO object to run DESCRIBE queries
+ * @param CRM_Core_DAO $dao a DAO object to run DESCRIBE queries
* @param $class string schema structure class to use
*
* @return array array of CREATE INDEX queries
* This function writes an entry about the intrusion
* to the intrusion database
*
- * @param $result
+ * @param array $result
* @param int $reaction
*
- * @internal param array $results
- *
* @return boolean
*/
private function log($result, $reaction = 0) {
/**
* @param $entity
* @param $job
- * @param $params
+ * @param array $params
* @param null $source
*/
public function setSingleRunParams($entity, $job, $params, $source = NULL) {
* Generate a form key based on form name, the current user session
* and a private key. Modelled after drupal's form API
*
- * @param $name
- * @param bool $addSequence
- *
- * @internal param string $value name of the form
- * @paeam boolean $addSequence should we add a unique sequence number to the end of the key
+ * @param string $name
+ * @param bool $addSequence should we add a unique sequence number to the end of the key
*
* @return string valid formID
* @static
- * @acess public
+ * @access public
*/
static function get($name, $addSequence = FALSE) {
$privateKey = self::privateKey();
/**
* Validate a form key based on the form name
*
- * @param $key
+ * @param string $key
* @param string $name
- *
* @param bool $addSequence
*
- * @internal param string $formKey
* @return string $formKey if valid, else null
* @static
- * @acess public
+ * @access public
*/
static function validate($key, $name, $addSequence = FALSE) {
if (!is_string($key)) {
if (stristr($name, 'civimail.job.')) {
$jobLog = $this->_name;
}
- //if (defined('CIVICRM_LOCK_DEBUG')) {
- //CRM_Core_Error::debug_var('backtrace', debug_backtrace());
- //}
$this->_timeout = $timeout !== NULL ? $timeout : self::TIMEOUT;
$this->acquire();
$args = array();
$elements = explode(',', $pathArgs);
- //CRM_Core_Error::debug( 'e', $elements );
foreach ($elements as $keyVal) {
list($key, $val) = explode('=', $keyVal, 2);
$arr[$key] = $val;
);
/**
- * @param $dao
+ * @param CRM_Core_DAO $dao
* @param bool $flip
* @param bool $grouping
* @param bool $localize
}
/**
- * Function to lookup titles OR ids for a set of option_value populated fields. The retrieved value
+ * lookup titles OR ids for a set of option_value populated fields. The retrieved value
* is assigned a new fieldname by id or id's by title
* (each within a specificied option_group)
*
* 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 null $groupTitle
- *
- * @internal param string $groupLabel - the optional label of the option group else set to group name
+ * @param null $groupTitle the optional label of the option group else set to group name
*
* @access public
* @static
static $_fields = NULL;
/**
- * Function to return option-values of a particular group
+ * return option-values of a particular group
*
* @param array $groupParams Array containing group fields whose option-values is to retrieved.
* @param string $orderBy for orderBy clause
}
/**
- * Function to add/edit option-value of a particular group
+ * add/edit option-value of a particular group
*
* @param array $params Array containing exported values from the invoking form.
* @param array $groupParams Array containing group fields whose option-values is to retrieved/saved.
* @param $action
* @param integer $optionValueID has the id of the optionValue being edited, disabled ..etc
*
- * @internal param string $orderBy for orderBy clause
* @return CRM_Core_DAO_OptionValue
*
* @access public
* @param string $mode
* @param string $contactType
*
- * @internal param string $value the value of the field we are checking
- * @internal param string $daoName the dao object name
- * @internal param string $daoID the id of the object being updated. u can change your name
- * as long as there is no conflict
- * @internal param string $fieldName the name of the field in the DAO
- *
* @return boolean true if object exists
* @access public
* @static
}
/**
- * Function to return option-values of a particular group
+ * return option-values of a particular group
*
* @param array $groupParams Array containing group fields
* whose option-values is to retrieved.
/**
* assign value to name in template
*
- * @param $var
+ * @param string $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 $var
+ * @param string $var
* @param mixed $value (reference) value of varaible
*
- * @internal param array|string $name name of variable
* @return void
* @access public
*/
*
* @param string $name
*
- * @internal param string $type
* @return array
*/
function get_template_vars($name=null) {
}
/**
- * function to destroy all the session state of this page.
+ * destroy all the session state of this page.
*
* @access public
*
class CRM_Core_Page_AJAX {
/**
- * function to call generic ajax forms
+ * call generic ajax forms
*
* @static
* @access public
}
/**
- * function to change is_quick_config priceSet to complex
+ * change is_quick_config priceSet to complex
*
* @static
* @access public
* FIXME: we should make this method like getLocBlock() OR use the same method and
* remove this one.
*
- * Function to obtain the location of given contact-id.
+ * obtain the location of given contact-id.
* This method is used by on-behalf-of form to dynamically generate poulate the
* location field values for selected permissioned contact.
*/
abstract function userContext($mode = NULL);
/**
- * function to get userContext params
+ * get userContext params
*
* @param int $mode mode that we are in
*
/**
* browse all entities.
*
- * @internal param int $action
- *
* @return void
* @access public
*/
}
/**
- * @param $params
+ * @param array $params
*
* @return mixed
*/
/**
* This function checks to see if we have the right config values
*
- * @internal param string $mode the mode we are operating in (live or test)
- *
* @return string the error message if any
* @public
*/
}
/**
- * Function to check whether a method is present ( & supported ) by the payment processor object.
+ * check whether a method is present ( & supported ) by the payment processor object.
*
* @param string $method method to check for.
*
*
* @param string $mode the mode of operation: live or test
* @param object $paymentProcessor the details of the payment processor being invoked
- * @param object $paymentForm reference to the form object if available
+ * @param CRM_Core_Form $paymentForm reference to the form object if available
* @param boolean $force should we force a reload of this payment object
*
* @return object
*
* @return bool|object
*/
- function cancelSubscription(&$message = '', $params = array(
- )) {
+ function cancelSubscription(&$message = '', $params = array()) {
$template = CRM_Core_Smarty::singleton();
$template->assign('subscriptionType', 'cancel');
*
* @return bool|object
*/
- function updateSubscriptionBillingInfo(&$message = '', $params = array(
- )) {
+ function updateSubscriptionBillingInfo(&$message = '', $params = array()) {
$template = CRM_Core_Smarty::singleton();
$template->assign('subscriptionType', 'updateBilling');
*
* @return bool|object
*/
- function changeSubscriptionAmount(&$message = '', $params = array(
- )) {
+ function changeSubscriptionAmount(&$message = '', $params = array()) {
$template = CRM_Core_Smarty::singleton();
$template->assign('subscriptionType', 'update');
return TRUE;
}
- /*
+ /**
* Send receipt from contribution. Note that the compose message part has been moved to contribution
* In general LoadObjects is called first to get the objects but the composeMessageArray function now calls it
*
- * @params array $input Incoming data from Payment processor
- * @params array $ids Related object IDs
- * @params array $values values related to objects that have already been loaded
- * @params bool $recur is it part of a recurring contribution
- * @params bool $returnMessageText Should text be returned instead of sent. This
- * is because the function is also used to generate pdfs
- */
- /**
- * @param $input
- * @param $ids
+ * @param array $input Incoming data from Payment processor
+ * @param array $ids Related object IDs
* @param $objects
- * @param $values
- * @param bool $recur
- * @param bool $returnMessageText
+ * @param array $values values related to objects that have already been loaded
+ * @param bool $recur is it part of a recurring contribution
+ * @param bool $returnMessageText Should text be returned instead of sent. This
+ * is because the function is also used to generate pdfs
*
- * @return mixed
+ * @return array
*/
function sendMail(&$input, &$ids, &$objects, &$values, $recur = FALSE, $returnMessageText = FALSE) {
$contribution = &$objects['contribution'];
}
/**
- * @param $recurId
+ * @param int $recurId
* @param $contribution
*
- * @internal param $contributionId
- *
* @return array
*/
function addRecurLineItems($recurId, $contribution) {
* add general billing fields
* @todo set these like processor fields & let payment processors alter them
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
* @access protected
}
/**
- * function to map address fields
+ * map address fields
*
* @param $id
* @param $src
}
/**
- * function to get the credit card expiration month
+ * get the credit card expiration month
* The date format for this field should typically be "M Y" (ex: Feb 2011) or "m Y" (02 2011)
* See CRM-9017
*
}
/**
- * function to get the credit card expiration year
+ * get the credit card expiration year
* 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 consistent with getCreditCardExpirationMonth
*
}
/**
- * @param $params
+ * @param array $params
* @param $component
*/
function doRecurCheckout(&$params, $component) {
*
* @return bool|object
*/
- function cancelSubscription(&$message = '', $params = array(
- )) {
+ function cancelSubscription(&$message = '', $params = array()) {
$orderNo = CRM_Utils_Array::value('subscriptionId', $params);
$merchant_id = $this->_paymentProcessor['user_name'];
}
}
- // CRM_Core_Error::debug_var( 'c', $contribution );
$contribution->save();
$transaction->commit();
$transaction = new CRM_Core_Transaction();
- // CRM_Core_Error::debug_var( 'c', $contribution );
if ($status == 'PAYMENT_DECLINED' ||
$status == 'CANCELLED_BY_GOOGLE' ||
$status == 'CANCELLED'
}
function main() {
- // CRM_Core_Error::debug_var( 'GET' , $_GET , true, true );
- // CRM_Core_Error::debug_var( 'POST', $_POST, true, true );
//@todo - this could be refactored like PayPalProIPN & a test could be added
$objects = $ids = $input = array();
/**
* do the express checkout at paypal. Check PayPal documentation for more information
*
- * @param $params
+ * @param array $params
*
* @internal param string $token the key associated with this transaction
*
//LCD add new function for handling recurring payments for PayPal Express
/**
- * @param $params
+ * @param array $params
*
* @return mixed
*/
}
/**
- * Function to check whether a method is present ( & supported ) by the payment processor object.
+ * check whether a method is present ( & supported ) by the payment processor object.
*
* @param string $method method to check for.
*
*
* @return array|bool|object
*/
- function cancelSubscription(&$message = '', $params = array(
- )) {
+ function cancelSubscription(&$message = '', $params = array()) {
if ($this->_paymentProcessor['payment_processor_type'] == 'PayPal') {
$args = array();
$this->initialize($args, 'ManageRecurringPaymentsProfileStatus');
*
* @return array|bool|object
*/
- function updateSubscriptionBillingInfo(&$message = '', $params = array(
- )) {
+ function updateSubscriptionBillingInfo(&$message = '', $params = array()) {
if ($this->_paymentProcessor['payment_processor_type'] == 'PayPal') {
$config = CRM_Core_Config::singleton();
$args = array();
}
/**
- * @param $params
+ * @param array $params
* @param string $component
*
* @throws Exception
* NOTE: 'doTransferCheckout' not implemented
*/
/**
- * @param $params
+ * @param array $params
* @param $component
*
* @throws Exception
}
/**
- * @param $params
+ * @param array $params
*
* @throws Exception
*/
}
/**
- * @param $params
+ * @param array $params
*
* @throws Exception
*/
class CRM_Core_Payment_ProcessorForm {
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param null $type
* @param null $mode
*
}
/**
- * @param $params
+ * @param array $params
*
* @throws Exception
*/
}
/**
- * @param $params
+ * @param array $params
*
* @throws Exception
*/
}
/**
- * @param $params
+ * @param array $params
*
* @throws Exception
*/
}
/**
- * Function to get component name from given permission.
+ * get component name from given permission.
*
* @param string $permission
*
private static $cache;
/**
- * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+ * @deprecated Please use the buildOptions() method in the appropriate BAO object.
*
* activity type
* @var array
private static $countryIsoCode;
/**
- * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+ * @deprecated Please use the buildOptions() method in the appropriate BAO object.
*
* group
* @var array
private static $worldRegions;
/**
- * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+ * @deprecated Please use the buildOptions() method in the appropriate BAO object.
*
* activity status
* @var array
/**
* DEPRECATED generic populate method
- * All pseudoconstant functions that use this method are also deprecated.
+ * All pseudoconstant functions that use this method are also @deprecated
*
* The static array $var is populated from the db
* using the <b>$name DAO</b>.
}
/**
- * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+ * @deprecated Please use the buildOptions() method in the appropriate BAO object.
*
* Get all Activty types.
*
* The static array activityType is returned
*
- * @internal param bool $all - get All Activity types - default is to get only active ones.
- *
* @access public
* @static
*
}
/**
- * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+ * @deprecated Please use the buildOptions() method in the appropriate BAO object.
*
* Get all groups from database
*
* Note: any database errors will be trapped by the DAO.
*
* @param string $groupType type of group(Access/Mailing)
- * @param bool|\boolen $excludeHidden exclude hidden groups.
+ * @param bool $excludeHidden exclude hidden groups.
*
* @access public
* @static
}
/**
- * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+ * @deprecated Please use the buildOptions() method in the appropriate BAO object.
* Get all active payment processors
*
* The static array paymentProcessor is returned
}
/**
- * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+ * @deprecated Please use the buildOptions() method in the appropriate BAO object.
*
* The static array paymentProcessorType is returned
*
}
/**
- * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+ * @deprecated Please use the buildOptions() method in the appropriate BAO object.
*
* Get all Activity Statuses.
*
}
/**
- * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
+ * @deprecated Please use the buildOptions() method in the appropriate BAO object.
*
* Get all Visibility levels.
*
* @param object $stateMachine reference to state machine object
*
* @return \CRM_Core_QuickForm_Action_Back
- @access public
+ * @access public
*/
function __construct(&$stateMachine) {
parent::__construct($stateMachine);
/**
* Processes the request.
*
- * @param object $page CRM_Core_Form the current form-page
+ * @param CRM_Core_Form $page the current form-page
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
/**
* Processes the request.
*
- * @param object $page CRM_Core_Form the current form-page
+ * @param CRM_Core_Form $page CRM_Core_Form the current form-page
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
/**
* Processes the request.
*
- * @param object $page CRM_Core_Form the current form-page
+ * @param CRM_Core_Form $page CRM_Core_Form the current form-page
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
}
/**
- * render the page using a custom templating
- * system
+ * Render the page using a custom templating system
*
- * @param object $page the CRM_Core_Form page
+ * @param CRM_Core_Form $page the CRM_Core_Form page
*
- * @internal param bool $ret should we echo or return output
*
* @return void
* @access public
/**
* set the various rendering templates
*
- * @param object $page the CRM_Core_Form page
+ * @param CRM_Core_Form $page the CRM_Core_Form page
*
* @return void
* @access public
/**
* initialize the various templates
*
- * @internal param object $page the CRM_Core_Form page
- *
* @return void
* @access public
*/
* and if success, call post process
* when done processing pop to user context
*
- * @param object $page CRM_Core_Form the current form-page
+ * @param CRM_Core_Form $page CRM_Core_Form the current form-page
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
/**
* Processes the request.
*
- * @param object $page CRM_Core_Form the current form-page
+ * @param CRM_Core_Form $page CRM_Core_Form the current form-page
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
/**
* Processes the request.
*
- * @param object $page CRM_Core_Form the current form-page
+ * @param CRM_Core_Form $page CRM_Core_Form the current form-page
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
/**
* Processes the request.
*
- * @param object $page CRM_Core_Form the current form-page
+ * @param CRM_Core_Form $page CRM_Core_Form the current form-page
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
/**
* Processes the request.
*
- * @param object $page CRM_Core_Form the current form-page
+ * @param CRM_Core_Form $page CRM_Core_Form the current form-page
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
/**
* Processes the request.
*
- * @param object $page CRM_Core_Form the current form-page
+ * @param CRM_Core_Form $page CRM_Core_Form the current form-page
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
/**
* upload and move the file if valid to the uploaded directory
*
- * @param object $page the CRM_Core_Form object
+ * @param CRM_Core_Form $page the CRM_Core_Form object
* @param object $data the QFC data container
* @param string $pageName the name of the page which index the data container with
* @param string $uploadName the name of the uploaded file
/**
* Processes the request.
*
- * @param object $page CRM_Core_Form the current form-page
+ * @param CRM_Core_Form $page CRM_Core_Form the current form-page
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
var $remarks = array();
- /*
- * Class constructor
- *
- * @param string $namespace namespace prefix for component's files
- * @access public
- *
- */
-
/**
- * @param $params
+ * @param array $params
*/
public function __construct($params) {
foreach ($params as $name => $param) {
}
/**
- * Function to get hours
+ * get hours
*
*
* @static
}
/**
- * Function to get minutes
+ * get minutes
*
*
* @static
}
/**
- * Function to get the Map Provider
+ * get the Map Provider
*
* @return array $map array of map providers
* @static
*/
protected $_object;
- /*
- * the CRM_Utils_Sort object
- * @var object
- */
-
+ /**
+ * @var CRM_Utils_Sort
+ */
protected $_sort;
- /*
- * the current column to sort on
- * @var int
- */
-
+ /**
+ * the current column to sort on
+ * @var int
+ */
protected $_sortID;
- /*
- * the sortOrder array
- * @var array
- */
-
+ /**
+ * the sortOrder array
+ * @var array
+ */
protected $_sortOrder;
- /*
- * the CRM_Utils_Pager object
- * @var object
- */
-
+ /**
+ * @var CRM_Utils_Pager
+ */
protected $_pager;
- /*
- * the pageID
- * @var int
- */
-
+ /**
+ * the pageID
+ * @var int
+ */
protected $_pageID;
- /*
- * offset
- * @var int
- */
-
+ /**
+ * offset
+ * @var int
+ */
protected $_pagerOffset;
/**
*/
protected $_total;
- /* the objectAction for the WebObject */
-
+ /**
+ * the objectAction for the WebObject
+ */
protected $_action;
/**
}
/**
- * function to retrieve rows.
+ * retrieve rows.
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array of rows
* @access public
/**
* getter for pager
*
- * @return object CRM_Utils_Pager
+ * @return CRM_Utils_Pager
* @access public
*/
function getPager() {
/**
* getter for sort
*
- * @return object CRM_Utils_Sort
+ * @return CRM_Utils_Sort
* @access public
*/
function getSort() {
*/
/**
- * Function to load a context. If name is asked for only name data is returned.
+ * load a context. If name is asked for only name data is returned.
* And if name is not provided whole context is returned.
*
*/
/**
* Grab the button type from a passed button element 'name' by checking for reserved QF button type strings
*
- * @param $btnName
- *
- * @internal param string $btnId
+ * @param string $btnName
*
* @return string button type, one of: 'upload', 'next', 'back', 'cancel', 'refresh'
* 'submit', 'done', 'display', 'jump' 'process'
*/
/**
- * Replace the value of an attribute in the input string. Assume
- * the the attribute is well formed, of the type name="value". If
- * no replacement is mentioned the value is inserted at the end of
- * the form element
+ * Replace a string with the first word in the string
*
* @param string $string the html to be tweaked with
*
- * @internal param string $attribute the attribute to modify
- * @internal param string $value the new attribute value
- *
- * @return string the new modified html string
+ * @return string
* @access public
*/
function smarty_modifier_crmFirstWord($string) {
/**
* the state that precedes this state
- * @var object
+ * @var CRM_Core_State
*/
protected $_back;
/**
* the state that succeeds this state
- * @var object
+ * @var CRM_Core_State
*/
protected $_next;
/**
* The state machine that this state is part of
- * @var object
+ * @var CRM_Core_StateMachine
*/
protected $_stateMachine;
/**
* constructor
*
- * @param $name
- * @param $type
- * @param $back
- * @param $next
- * @param $stateMachine
+ * @param string $name internal name of the state
+ * @param int $type state type
+ * @param CRM_Core_State $back state that precedes this state
+ * @param CRM_Core_State $next state that follows this state
+ * @param CRM_Core_StateMachine $stateMachine statemachine that this states belongs to
*
- * @internal param \the $string internal name of the state
- * @internal param \the $int state type
- * @internal param \the $object state that precedes this state
- * @internal param \the $object state that follows this state
- * @internal param \the $object statemachine that this states belongs to
- *
- * @return \CRM_Core_State
- @access public
+ * @return CRM_Core_State
+ * @access public
*/
function __construct($name, $type, $back, $next, &$stateMachine) {
$this->_name = $name;
* Next and Back. The other actions (Cancel, Done, Submit etc) do
* not need the state machine to figure out where to go
*
- * @param object $page CRM_Core_Form the current form-page
+ * @param CRM_Core_Form $page the current form-page
* @param string $actionName Current action name, as one Action object can serve multiple actions
* @param string $type The type of transition being requested (Next or Back)
*
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array
*/
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @param null
*
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
private static $_dataToLabels = NULL;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @param null
*
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @param null
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @param null
*
protected $_defaults = array();
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @param null
*
* @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
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @param null
*
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @param null
$defaults['extends'][1] = array(0 => '');
}
-
- $subName = CRM_Utils_Array::value('extends_entity_column_id', $defaults);
-
if ($extends == 'Relationship' && !empty($this->_subtypes)) {
$relationshipDefaults = array();
foreach ($defaults['extends'][1] as $donCare => $rel_type_id) {
}
}
- /*
- * Function to return a formatted list of relationship name.
- * @param $list array array of relationship name.
- * @static
- * return array array of relationship name.
- */
/**
- * @param $list
+ * Return a formatted list of relationship name.
+ *
+ * @param array $list array of relationship name.
*
- * @return array
+ * @return array of relationship name.
*/
static function getFormattedList(&$list) {
$relName = array();
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
protected $_id;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @param null
*
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @param null
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @param null
*
* @param array $fields posted values of the form
*
* @param $files
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array list of errors to be posted back to the form
* @static
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @param null
*
class CRM_Custom_Import_Form_DataSource extends CRM_Core_Form {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
*/
protected $_entity;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
public $_parser = 'CRM_Custom_Import_Parser_Api';
protected $_importParserUrl = '&parser=CRM_Custom_Import_Parser';
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
*/
class CRM_Custom_Import_Form_Summary extends CRM_Contact_Import_Form_Summary {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * function to format the field values for input to the api
+ * format the field values for input to the api
*
* @return array (reference ) associative array of name/value pairs
* @access public
*
* Although the api will accept any strtotime valid string CiviCRM accepts at least one date format
* not supported by strtotime so we should run this through a conversion
- * @internal param \unknown $params
*/
function formatDateParams() {
$session = CRM_Core_Session::singleton();
*
* @return array
*/
- static function isQuerySetInclusive($tableQueries, $threshold, $exclWeightSum = array(
- )) {
+ static function isQuerySetInclusive($tableQueries, $threshold, $exclWeightSum = array()) {
$input = array();
foreach ($tableQueries as $key => $query) {
$input[] = substr($key, strrpos($key, '.') + 1);
/**
* To find fields related to a rule group.
*
- * @param $params
- *
- * @internal param \contains $array the rule group property to identify rule group
+ * @param array $params
*
* @return array (rule field => weight) array and threshold associated to rule group@access public
*/
*
* @return array array of (cid1, cid2, weight) dupe triples
*/
- static function dupes($rgid, $cids = array(
- )) {
+ static function dupes($rgid, $cids = array()) {
$rgBao = new CRM_Dedupe_BAO_RuleGroup();
$rgBao->id = $rgid;
$rgBao->contactIds = $cids;
}
/**
- * Function to batch merge a set of contacts based on rule-group and group.
+ * batch merge a set of contacts based on rule-group and group.
*
* @param int $rgid rule group id
* @param int $gid group id
* A 'safe' value skips the merge if there are any un-resolved conflicts.
* Does a force merge otherwise.
* @param boolean $autoFlip wether to let api decide which contact to retain and which to delete.
- *
- *
* @param bool $redirectForPerformance
*
* @return array|bool
- * @internal param array $cacheParams prev-next-cache params based on which next pair of contacts are computed.
- * Generally used with batch-merge.
* @static
* @access public
*/
}
/**
- * Function to merge given set of contacts. Performs core operation.
+ * merge given set of contacts. Performs core operation.
*
* @param array $dupePairs set of pair of contacts for whom merge is to be done.
* @param array $cacheParams prev-next-cache params based on which next pair of contacts are computed.
* @static
* @access public
*/
- static function merge($dupePairs = array(
- ), $cacheParams = array(), $mode = 'safe',
+ static function merge($dupePairs = array(), $cacheParams = array(), $mode = 'safe',
$autoFlip = TRUE, $redirectForPerformance = FALSE
) {
$cacheKeyString = CRM_Utils_Array::value('cache_key_string', $cacheParams);
}
/**
- * 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
*
- * @return object CRM_Event_BAO_ManageEvent object
+ * @return CRM_Event_BAO_ManageEvent object
* @access public
* @static
*/
}
/**
- * function to add the event
+ * add the event
*
* @param array $params reference array contains the values submitted by the form
*
}
/**
- * function to create the event
+ * create the event
*
* @param array $params reference array contains the values submitted by the form
*
}
/**
- * Function to delete the event
+ * delete the event
*
* @param int $id event id
*
* Function to delete the location block associated with an event,
* if not being used by any other event.
*
- * @param $locBlockId
- * @param null $eventId
- *
- * @internal param int $loc_block_id location block id to be deleted
- * @internal param int $eventid event id with which loc block is associated
+ * @param $locBlockId location block id to be deleted
+ * @param int $eventId event with which loc block is associated
*
* @access public
* @static
* @param boolean $considerRole consider role for participant count.
* @param boolean $role consider counted( is filter role) participant.
*
- * @internal param array $eventIds consider participants from given events.
- * @internal param bool $countWithStatus retrieve participant count w/ each participant status.
- *
* @access public
*
* @return array array with count of participants for each event based on status/role
/**
* function to get the information to map a event
*
- * @param $id
- *
- * @internal param array $ids the list of ids for which we want map info
+ * @param int $id for which we want map info
*
* @return null|string title of the event
* @static
* @access public
*/
/**
- * @param $params
+ * @param array $params
*
* @return bool
*/
/**
* make sure that the user has permission to access this event
*
- * @param null $eventId
+ * @param int $eventId
* @param int $type
*
- * @internal param int $id the id of the event
- * @internal param int $name the name or title of the event
- *
* @return string the permission that the user has (or null)
* @access public
* @static
return (int)CRM_Core_DAO::singleValueQuery($query, array(1 => array($eventId, 'Positive')));
}
- /*
+ /**
* Retrieve event template default values to be set
* as default values for current new event.
*
- * @params int $templateId event template id.
+ * @param int $templateId event template id.
*
- * @return $defaults an array of custom data defaults.
- */
- /**
- * @param $templateId
- *
- * @return array
+ * @return array of custom data defaults.
*/
static function getTemplateDefaultValues($templateId) {
$defaults = array();
return CRM_Event_BAO_Event::retrieve($params, $defaults);
}
- /*
+ /**
* Update the Campaign Id of all the participants of the given event
*
- * @params int $eventID event id.
- * @params int $eventCampaignID campaign id of that event
- *
- */
- /**
- * @param $eventID
- * @param $eventCampaignID
+ * @param int $eventID event id.
+ * @param int $eventCampaignID campaign id of that event
*/
static function updateParticipantCampaignID($eventID, $eventCampaignID) {
$params = array();
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @internal param array $ids the array that holds all the db ids
- *
- * @return object CRM_Event_BAO_Participant object
+ * @return CRM_Event_BAO_Participant object
* @access public
* @static
*/
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @internal param array $ids the array that holds all the db ids
- *
- * @return object CRM_Event_BAO_Participant object
+ * @return CRM_Event_BAO_Participant object
* @access public
* @static
*/
* with total participant count that field going to carry.
*
* @param int $eventId event id.
- * @param array $skipParticipantIds
+ * @param array $skipParticipantIds an array of participant ids those we should skip.
* @param bool $considerCounted
* @param bool $considerWaiting
* @param bool $considerTestParticipants
*
- * @internal param array $skipParticipants an array of participant ids those we should skip.
- * @internal param int $isTest would you like to consider test participants.
- *
* @return array $optionsCount an array of each option id and total count
* @static
* @access public
}
/**
- * function to get the event name/sort name for a particular participation / participant
+ * get the event name/sort name for a particular participation / participant
*
* @param int $participantId id of the participant
* @param array $input an assosiative array of name /value pairs
* from other function
*
- * @return object CRM_Contribute_BAO_Contribution object
+ * @return CRM_Contribute_BAO_Contribution object
* @access public
* @static
*/
* @param null $newStatusID
* @param bool $updatePrimaryStatus
*
- * @internal param int $statusId status id for participant
- * return void
- *
- * @return bool
+ * @return bool|void
* @access public
* @static
*/
* @param int $participantIds array of participant ids
* @param int $statusId status id for participant
* @param bool $updateRegisterDate
- * @params boolean $updateRegisterDate way to track when status changed.
*
- * return void
+ * @return void
*
* @access public
* @static
}
/**
- * Function to send mail and create activity
+ * send mail and create activity
* when participant status changed.
*
* @param int $participantId participant id.
}
/**
- * Function to get participant record count for a Contact
+ * get participant record count for a Contact
*
- * @param $contactID
- *
- * @internal param int $contactId Contact ID
+ * @param int $contactID
*
* @return int count of participant records
* @access public
/**
* Function to get additional Participant edit & view url .
*
- * @param $participantIds
- *
- * @internal param array $paticipantIds an array of additional participant ids.
+ * @param array $participantIds an array of additional participant ids.
*
* @return array of Urls.
* @access public
}
/**
- * @param $params
+ * @param array $params
* @param $participantId
* @param $contributionId
* @param $feeBlock
*/
class CRM_Event_BAO_ParticipantStatusType extends CRM_Event_DAO_ParticipantStatusType {
/**
- * @param $params
+ * @param array $params
*
* @return $this|null
*/
}
/**
- * @param $params
+ * @param array $params
*
* @return $this|null
*/
}
/**
- * @param $params
+ * @param array $params
* @param $defaults
*
* @return CRM_Event_DAO_ParticipantStatusType|null
}
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
}
/**
- * function to create the labels (pdf)
+ * create the labels (pdf)
* It assumes the participants are from the same event
*
* @param array $participants
function pdfExtraFormat() {}
/**
- * function to create labels (pdf)
+ * create labels (pdf)
*
- * @param $participants
- *
- * @internal param array $contactRows assciated array of contact data
- * @internal param string $format format in which labels needs to be printed
+ * @param array $participants
*
* @return null
* @access public
);
/**
- * @param $params
+ * @param array $params
*
* @return $this
*/
}
/**
- * @param $params
+ * @param array $params
*
* @return $this
* @throws Exception
}
/**
- * @param $params
+ * @param array $params
*
* @return bool|CRM_Event_Cart_BAO_Cart
*/
}
/**
- * @param $params
+ * @param array $params
* @param $values
*
* @return mixed
}
/**
- * @param $params
+ * @param array $params
*
* @return $this|CRM_Event_Cart_BAO_EventInCart
* @throws Exception
}
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
}
/**
- * @param $params
+ * @param array $params
*
* @return bool|CRM_Event_Cart_BAO_EventInCart
*/
}
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
*
* @return int|mixed|null
*/
- static function find_or_create_contact($registeringContactID = NULL, $fields = array(
- )) {
+ static function find_or_create_contact($registeringContactID = NULL, $fields = array()) {
$contact_id = self::find_contact($fields);
if ($contact_id) {
public $pay_later_receipt;
/**
- * @param $params
+ * @param array $params
* @param $participant
* @param $event
*
/**
* @param $events_in_cart
- * @param $params
+ * @param array $params
*/
function emailReceipt($events_in_cart, $params) {
$contact_details = CRM_Contact_BAO_Contact::getContactDetails($this->payer_contact_id);
}
/**
- * @param $params
+ * @param array $params
*
* @return array
* @throws Exception
/**
* @param $mer_participant
- * @param $params
+ * @param array $params
* @param $event
*
* @return object
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
function appendQuickForm(&$form) {
$textarea_size = array('size' => 30, 'maxlength' => 60);
class CRM_Event_Form_EventFees {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
* @access public
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
*/
}
/**
- * Function to build the form
+ * Build the form object
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
* @access public
protected $_isRepeatingEvent;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
public $_action;
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
protected $_title;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
protected $_eventType = NULL;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
/**
* global validation rules for the form
*
- * @param $values
- *
- * @internal param array $fields posted values of the form
+ * @param array $values
*
* @return array list of errors to be posted back to the form
* @static
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
parent::endPostProcess();
}
- //end of function
/**
* Return a descriptive name for the page, used in wizard header
return ts('Event Information and Settings');
}
- /* Retrieve event template custom data values
- * and set as default values for current new event.
- *
- * @params int $tempId event template id.
- *
- * @return $defaults an array of custom data defaults.
- */
-
/**
- * @param $templateId
+ * Retrieve event template custom data values
+ * and set as default values for current new event.
+ *
+ * @param int $templateId event template id.
*
- * @return array
+ * @return array of custom data defaults.
*/
public function templateCustomDataValues($templateId) {
$defaults = array();
private $_inDate;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
public $_values = array();
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
$this->ajaxResponse['tabValid'] = TRUE;
parent::endPostProcess();
}
- //end of function
/**
* Return a descriptive name for the page, used in wizard header
protected $_profilePostMultipleAdd = array();
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
* @access public
*
* @param array $defaults the array of default values
*
- * @internal param bool $force should we set show hide based on input defaults
- *
* @return void
*/
function setShowHide($defaults) {
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to build Registration Block
+ * build Registration Block
*
- * @param $form
+ * @param CRM_Core_Form $form
*
- * @internal param int $pageId
* @static
*/
function buildRegistrationBlock(&$form) {
}
/**
- * Function to build Confirmation Block
+ * build Confirmation Block
*
- * @param $form
+ * @param CRM_Core_Form $form
*
- * @internal param int $pageId
* @static
*/
function buildConfirmationBlock(&$form) {
/**
* Function to build Email Block
*
- * @param $form
+ * @param CRM_Core_Form $form
*
- * @internal param int $pageId
* @static
*/
function buildMailBlock(&$form) {
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
function buildThankYouBlock(&$form) {
$attributes = CRM_Core_DAO::getAttribute('CRM_Event_DAO_Event');
/**
* global validation rules for the form
*
- * @param $values
+ * @param array $values
* @param $files
- * @param $form
- *
- * @internal param array $fields posted values of the form
+ * @param CRM_Core_Form $form
*
* @return array list of errors to be posted back to the form
* @static
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
parent::endPostProcess();
}
- //end of function
/**
* Return a descriptive name for the page, used in wizard header
}\r
\r
/**\r
- * This function sets the default values for the form. For edit/view mode\r
+ * Set default values for the form. For edit/view mode\r
* the default values are retrieved from the database\r
*\r
* @access public\r
class CRM_Event_Form_ManageEvent_ScheduleReminders extends CRM_Event_Form_ManageEvent {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
parent::endPostProcess();
}
- //end of function
/**
* Return a descriptive name for the page, used in wizard header
class CRM_Event_Form_ManageEvent_TabHeader {
/**
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array
*/
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array
* @throws Exception
*/
public $_eID = NULL;
- /*
- *Line Item for Price Set
- */
-
+ /**
+ * Line Item for Price Set
+ */
public $_lineItem = NULL;
- /*
- *Contribution mode for event registration for offline mode
- */
+ /*
+ * Contribution mode for event registration for offline mode
+ */
public $_contributeMode = 'direct';
public $_online;
public $_onlinePendingContributionId = NULL;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
/**
* global validation rules for the form
*
- * @param $values
+ * @param array $values posted values of the form
* @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
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*/
}
/**
- * @param $params
+ * @param array $params
*
* @return mixed
*/
public $useLivePageJS = TRUE;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
public $_isBillingAddressRequiredForPayLater;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to add the custom fields
+ * add the custom fields
*
* @param $id
* @param $name
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param $eventID
*
* @throws Exception
}
/**
- * Function to handle process after the confirmation of payment by User
+ * handle process after the confirmation of payment by User
*
* @param null $contactID
* @param null $contribution
/**
* Process the participant
*
- * @param $params
+ * @param array $params
* @param $contactID
*
* @return void
* @access public
*/
/**
- * @param $form
- * @param $params
+ * @param CRM_Core_Form $form
+ * @param array $params
* @param bool $skipCurrent
*
* @return int|string
* @access public
*/
/**
- * @param $form
- * @param $params
+ * @param CRM_Core_Form $form
+ * @param array $params
*
* @return mixed
*/
public $additionalParticipantId = NULL;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
* @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
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
* Reset values for all options those are full.
*
**/
- function resetElementValue($optionFullIds = array(
- )) {
+ function resetElementValue($optionFullIds = array()) {
if (!is_array($optionFullIds) ||
empty($optionFullIds) ||
!$this->isSubmitted()
* @param $elementName
* @param array $optionIds
*/
- function resetSubmittedValue($elementName, $optionIds = array(
- )) {
+ function resetSubmittedValue($elementName, $optionIds = array()) {
if (empty($elementName) ||
!$this->elementExists($elementName) ||
!$this->getSubmitValue($elementName)
public $_totalAmount;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
}
}
- //end of function
/**
* Process the contribution
*
- * @param $form
- * @param $params
+ * @param CRM_Core_Form $form
+ * @param array $params
* @param $result
* @param $contactID
* @param bool $pending
/**
* Fix the Location Fields
*
- * @param $params
+ * @param array $params
* @param $fields
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
* @access public
}
/**
- * function to update contact fields
+ * update contact fields
*
* @param $contactID
- * @param $params
+ * @param array $params
* @param $fields
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
* @access public
protected $_cc = NULL;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
public $_paymentFields = array();
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. For edit/view mode
+ * Set default values for the form. For edit/view mode
* the default values are retrieved from the database
* Adding discussion from CRM-11915 as code comments
* When multiple payment processors are configured for a event and user does any selection changes for them on online event registeration page :
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
/**
* build the radio/text form elements for the amount field
*
- * @param object $form form object
+ * @param CRM_Core_Form $form form object
* @param boolean $required true if you want to add formRule
* @param int $discountId discount id for the event
*
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
public static function formatFieldsForOptionFull(&$form) {
$priceSet = $form->get('priceSet');
* @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
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
CRM_Core_Session::setStatus($statusMsg, ts('Saved'), 'success');
}
}
- //end of function
/*
- * Function to process Registration of free event
+ * process Registration of free event
*
* @param array $param Form valuess
* @param int contactID
*
*/
/**
- * @param $params
+ * @param array $params
* @param null $contactID
*/
public function processRegistration($params, $contactID = NULL) {
class CRM_Event_Form_Registration_ThankYou extends CRM_Event_Form_Registration {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
* @return void
*/
public function postProcess() {}
- //end of function
/**
* Return a descriptive name for the page, used in wizard header
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param bool $useTable
*/
static function preProcessCommon(&$form, $useTable = FALSE) {
* @param string $backType
* @param bool $submitOnce
*
- * @internal param string $type button type for the form after processing
- *
* @return void
* @access public
*/
* @access public
*/
function preProcess() {
- /*
- * initialize the task and row fields
- */
+ // initialize the task and row fields
parent::preProcess();
parent::setContactIDs();
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
$status = '<ul><li>' . implode('</li><li>', $status) . '</li></ul>';
CRM_Core_Session::setStatus($status, ts('Added Contact to %1', array(1 => $groupName, 'count' => $added, 'plural' => 'Added Contacts to %1')), 'success', array('expires' => 0));
}
- //end of function
}
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
CRM_Core_Session::setStatus(ts('No updates have been saved.'), ts('Not Saved'), 'alert');
}
}
- //end of function
/**
* @param $participantId
* @access public
*/
function preProcess() {
- /*
- * initialize the task and row fields
- */
+ // initialize the task and row fields
parent::preProcess();
$session = CRM_Core_Session::singleton();
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
CRM_Event_BAO_Participant::create($value);
}
}
- //end of function
}
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
* @access public
*/
function preProcess() {
- /*
- * initialize the task and row fields
- */
+ // initialize the task and row fields
parent::preProcess();
$session = CRM_Core_Session::singleton();
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
// also reset the batch page so it gets new values from the db
$this->controller->resetPage('Batch');
}
- //end of function
}
}
/**
- * Build the form - it consists of
+ * Build the form object - it consists of
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
}
/**
- * Build the form - it consists of
+ * Build the form object - it consists of
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Event_Import_Form_DataSource extends CRM_Core_Form {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Event_Import_Form_Preview extends CRM_Import_Form_Preview {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
class CRM_Event_Import_Form_Summary extends CRM_Import_Form_Summary {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * function to format the field values for input to the api
+ * format the field values for input to the api
*
* @return array (reference ) associative array of name/value pairs
* @access public
/**
* Export data to a CSV file
*
- * @param $fileName
+ * @param string $fileName
* @param array $header
- * @param data $data
+ * @param array $data
*
- * @internal param string $filename
* @return void
* @access public
*/
class CRM_Event_Page_AJAX {
/**
- * Function for building EventFee combo box
+ * building EventFee combo box
* FIXME: This ajax callback could be eliminated in favor of an entityRef field but the priceFieldValue api doesn't currently support filtering on entity_table
*/
function eventFee() {
}
/**
- * @param $params
+ * @param array $params
* @param bool $sortBy
* @param $force
*
class CRM_Event_Page_UserDashboard extends CRM_Contact_Page_View_UserDashBoard {
/**
- * Function to list participations for the UF user
+ * list participations for the UF user
*
* return null
* @access public
*
* @param null $id
* @param null $cond
- * @param string $retColumn
- *
- * @internal param $string - $retColumn tells populate() whether to return 'name' (default) or 'label' values
+ * @param string $retColumn tells populate() whether to return 'name' (default) or 'label' values
*
* @return array - array reference of all participant statuses if any
* @static
$this->_query->_distinctComponentClause = " civicrm_participant.id";
$this->_query->_groupByComponentClause = " GROUP BY civicrm_participant.id ";
}
- //end of constructor
/**
* Can be used to alter the number of participation returned from a buildForm hook
}
return self::$_links;
}
- //end of function
/**
* getter for array of the parameters required for creating pager.
*
* @param $action
- * @param $params
+ * @param array $params
*
- * @internal param $
* @access public
*/
function getPagerParams($action, &$params) {
$params['buttonTop'] = 'PagerTopButton';
$params['buttonBottom'] = 'PagerBottomButton';
}
- //end of function
/**
* Returns total number of rows for the query.
}
/**
+ * FIXME: the current internationalisation is bad, but should more or less work
+ * on most of "European" languages
*
* @return array $qill which contains an array of strings
* @access public
*/
-
- // the current internationalisation is bad, but should more or less work
- // for most of "European" languages
public function getQILL() {
return $this->_query->qill();
}
return ts('CiviCRM Event Search');
}
}
-//end of class
* @param object $controller
* @param \const|int $action
*
- * @internal param \CRM_Event_Controller $object
* @return \CRM_Event_StateMachine_Registration CRM_Event_StateMachine
*/
function __construct($controller, $action = CRM_Core_Action::NONE) {
CONST EXPORT_ROW_COUNT = 10000;
/**
- * Function to get the list the export fields
+ * get the list the export fields
*
* @param int $selectAll user preference while export
* @param array $ids contact ids
}
/**
- * Function to handle import error file creation.
+ * handle import error file creation.
*
*/
static function invoke() {
}
/**
- * Function to merge household record into the individual record
+ * merge household record into the individual record
* if exists
*
* @param string $exportTempTable temporary temp table that stores the records
protected $_mappingId;
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function for validation
+ * validation
*
* @param array $params (ref.) an assoc array of name/value pairs
*
}
/**
- * Function to build mapping form element
+ * build mapping form element
*
*/
function buildMapping() {
/**
* Scan $basedir for a list of extension-keys
*
- * @internal param string $dirSep the local system's directory separator
* @return array($key => $relUrl)
*/
protected function getRelUrls() {
* @param $file
*
* @throws CRM_Extension_Exception_ParseException
- * @internal param string $string XML content
* @return CRM_Extension_Info
*/
public static function loadFromFile($file) {
}
/**
- * Function to run hooks in the payment processor class
+ * run hooks in the payment processor class
* Load requested payment processor and call the method specified.
*
* @param CRM_Extension_Info $info
*
* @param $clazz
*
- * @internal param string $key extension key
- *
* @return string full path the extension .php file
*/
public function classToPath($clazz) {
*
* @throws CRM_Extension_Exception
* @throws Exception
- * @return object CRM_Extension_Info
+ * @return CRM_Extension_Info
*/
public function keyToInfo($key, $fresh = FALSE) {
if ($fresh || !array_key_exists($key, $this->infos)) {
}
/**
- * 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
*
- * @return object CRM_Contribute_BAO_FinancialAccount object
+ * @return CRM_Contribute_BAO_FinancialAccount object
* @access public
* @static
*/
}
/**
- * function to add the financial types
+ * add the financial types
*
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
}
/**
- * Function to delete financial Types
+ * delete financial Types
*
* @param int $financialAccountId
* @static
}
/**
- * 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
*
- * @return object CRM_Contribute_BAO_FinancialItem object
+ * @return CRM_Contribute_BAO_FinancialItem object
* @access public
* @static
*/
}
/**
- * function to add the financial items and financial trxn
+ * add the financial items and financial trxn
*
* @param object $lineItem line item object
* @param object $contribution contribution object
}
/**
- * function to create the financial Items and financial enity trxn
+ * create the financial Items and financial enity trxn
*
* @param array $params associated array to create financial items
* @param array $ids financial item ids
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return object CRM_Core_BAO_FinancialTrxn object
+ * @return CRM_Core_BAO_FinancialTrxn object
* @access public
* @static
*/
* retrive entity financial trxn details
*
* @param array $params (reference ) an assoc array of name/value pairs
- *
- * @param bool $maxId
- *
- * @internal param bool $maxID to retrive max id
+ * @param bool $maxId to retrive max id
*
* @return array
* @access public
}
/**
- * 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
*
- * @return object CRM_Contribute_BAO_ContributionType object
+ * @return CRM_Contribute_BAO_ContributionType object
* @access public
* @static
*/
}
/**
- * function to add the financial types
+ * add the financial types
*
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
}
/**
- * Function to delete financial Types
+ * delete financial Types
*
- * @param $financialTypeId
+ * @param int $financialTypeId
*
* @return array|bool
- * @internal param int $contributionTypeId
* @static
*/
static function del($financialTypeId) {
private static $financialAccount;
/**
- * 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
*
* @param array $allValues
*
- * @return object CRM_Contribute_BAO_ContributionType object
+ * @return CRM_Contribute_BAO_ContributionType object
* @access public
* @static
*/
}
/**
- * function to add the financial types
+ * add the financial types
*
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
}
/**
- * Function to delete financial Types
+ * delete financial Types
*
- * @param $financialTypeAccountId
- * @param null $accountId
+ * @param int $financialTypeAccountId
+ * @param int $accountId
*
- * @internal param int $contributionTypeId
* @static
*/
static function del($financialTypeAccountId, $accountId = null) {
}
/**
- * Function to get Financial Account Name
+ * get Financial Account Name
*
* @param int $entityId
*
* @param $financialType
*
* @return array
- * @internal param int $financialTypeId financial type id
- *
* @static
*/
static function createDefaultFinancialAccounts($financialType) {
*/
static $_defaultPaymentProcessor = NULL;
- /*
+ /**
* Create Payment Processor
*
- * @params array parameters for Processor entity
- */
- /**
- * @param $params
+ * @param array $params parameters for Processor entity
*
* @return CRM_Financial_DAO_PaymentProcessor
* @throws Exception
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
- * @return object CRM_Financial_DAO_PaymentProcessor object on success, null otherwise
+ * @return CRM_Financial_DAO_PaymentProcessor object on success, null otherwise
* @access public
* @static
*/
/**
* Function to delete payment processor
*
- * @param $paymentProcessorID
+ * @param int $paymentProcessorID
*
* @return null
- * @internal param int $paymentProcessorId ID of the processor to be deleted.
- *
* @access public
* @static
*/
}
/**
- * Function to get the payment processor details
+ * get the payment processor details
*
* @param int $paymentProcessorID payment processor id
* @param string $mode payment mode ie test or live
}
/**
- * Function to build payment processor details
+ * build payment processor details
*
* @param object $dao payment processor object
* @param string $mode payment mode ie test or live
}
/**
- * Function to retrieve payment processor id / info/ object based on component-id.
+ * retrieve payment processor id / info/ object based on component-id.
*
* @param $entityID
* @param string $component component
* @param string $type type of payment information to be retrieved
*
- * @internal param int $componentID id of a component
- * @return id / array / object based on type
+ * @return int / array / object based on type
* @static
* @access public
*/
}
/**
- * 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
*
- * @return object CRM_Core_BAO_LocaationType object on success, null otherwise
+ * @return CRM_Core_BAO_LocaationType object on success, null otherwise
* @access public
* @static
*/
}
/**
- * Function to add the payment-processor type in the db
+ * add the payment-processor type in the db
*
* @param array $params (reference ) an assoc array of name/value pairs
*
* @throws Exception
- * @internal param array $ids the array that holds all the db ids
- *
- * @return object CRM_Financial_DAO_PaymentProcessorType
+ * @return CRM_Financial_DAO_PaymentProcessorType
* @access public
* @static
*/
}
/**
- * Function to delete payment processor
+ * delete payment processor
*
* @param int $paymentProcessorTypeId ID of the processor to be deleted.
*
}
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Build the form
+ * Build the form object
*
* @access public
* @return void
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
* @return void
protected $_id;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
/**
* global validation rules for the form
*
- * @param $values
+ * @param array $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
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
* @return void
* @param $userContactID
* @param $actionName
*
- * @internal param array $fields posted values of the form
- *
* @return array list of errors to be posted back to the form
* @static
* @access public
class CRM_Financial_Form_FinancialType extends CRM_Contribute_Form {
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
* @return void
protected $_isARFlag = FALSE;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
* @return void
*/
class CRM_Financial_Page_AJAX {
/*
- * Function to get financial accounts of required account relationship
+ * get financial accounts of required account relationship
* $financialAccountType array with key account relationship and value financial account type option groups
*
*/
/**
* browse all entities.
*
- * @internal param int $action
- *
* @return void
* @access public
*/
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return object CRM_Friend_BAO_Friend object
+ * @return CRM_Friend_BAO_Friend object
* @access public
* @static
*/
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return object CRM_Contact_BAO_Contact object
+ * @return CRM_Contact_BAO_Contact object
* @access public
* @static
*/
}
/**
- * Function to build the form
+ * Build the form object
*
- * @param object $form form object
+ * @param CRM_Core_Form $form form object
*
* @return void
* @access public
/**
* Process that send tell a friend e-mails
*
- * @params int $contactId contact id
- * @params array $values associative array of name/value pair
- *
- * @param $contactID
- * @param $values
+ * @param int $contactID
+ * @param array $values
*
* @return void
* @access public
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return object CRM_Friend_BAO_Friend object
+ * @return CRM_Friend_BAO_Friend object
* @access public
* @static
*/
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function for validation
+ * validation
*
- * @param $fields
- *
- * @internal param array $params (ref.) an assoc array of name/value pairs
+ * @param array $fields
*
* @return mixed true or array of errors
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * Function to get events Summary
+ * get events Summary
*
* @static
*
}
/**
- * Function to get events Summary
+ * get events Summary
*
* @static
*
}
/**
- * Function to retrieve statistics for grants.
+ * retrieve statistics for grants.
*
* @static
*
}
/**
- * 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
*
- * @return object CRM_Grant_BAO_ManageGrant object
+ * @return CRM_Grant_BAO_ManageGrant object
* @access public
* @static
*/
/**
* Function to delete the Contact
*
- * @param $id
+ * @param int $id contact id
*
* @return bool
- * @internal param int $cid contact id
*
* @access public
* @static
/**
* Function to get grant record count for a Contact
*
- * @param $contactID
- *
- * @internal param int $contactId Contact ID
+ * @param int $contactID
*
* @return int count of grant records
* @access public
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
* @static
protected $_context;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
class CRM_Grant_Form_GrantView extends CRM_Core_Form {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param bool $useTable
*/
static function preProcessCommon(&$form, $useTable = FALSE) {
* @param string $nextType
* @param string $backType
*
- * @internal param string $type button type for the form after processing
- *
* @return void
* @access public
*/
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form - it consists of
+ * Build the form object - it consists of
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
$this->_query->_distinctComponentClause = " civicrm_grant.id";
$this->_query->_groupByComponentClause = " GROUP BY civicrm_grant.id ";
}
- //end of constructor
/**
* This method returns the links that are given for each search row.
* getter for array of the parameters required for creating pager.
*
* @param $action
- * @param $params
+ * @param array $params
*
- * @internal param $
* @access public
*/
function getPagerParams($action, &$params) {
$params['buttonTop'] = 'PagerTopButton';
$params['buttonBottom'] = 'PagerBottomButton';
}
- //end of function
/**
* Returns total number of rows for the query.
}
/**
- *
* @return array $qill which contains an array of strings
* @access public
*/
return ts('CiviCRM Grant Search');
}
}
-//end of class
CRM_Custom_Form_CustomData::preProcess($this, NULL, NULL, 1, 'Group', $this->_id);
}
- /*
- * This function sets the default values for the form. LocationType that in edit/view mode
+ /**
+ * Set default values for the form. LocationType that in edit/view mode
* the default values are retrieved from the database
*
* @access public
- * @return void
- */
- /**
* @return array
*/
function setDefaultValues() {
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
* global validation rules for the form
*
* @param array $fields posted values of the form
- *
* @param $fileParams
* @param $options
*
$group = CRM_Contact_BAO_Group::create($params);
- /*
- * Remove any parent groups requested to be removed
- */
-
+ //Remove any parent groups requested to be removed
if (!empty($this->_groupValues['parents'])) {
$parentGroupIds = explode(',', $this->_groupValues['parents']);
foreach ($parentGroupIds as $parentGroupId) {
CRM_Core_Session::setStatus(ts('The Group \'%1\' has been saved.', array(1 => $group->title)), ts('Group Saved'), 'success');
- /*
- * Add context to the session, in case we are adding members to the group
- */
-
+ // Add context to the session, in case we are adding members to the group
if ($this->_action & CRM_Core_Action::ADD) {
$this->set('context', 'amtg');
$this->set('amtgID', $group->id);
}
}
- /*
+ /**
* Build parent groups form elements
*
- * @obj form object passed by reference
+ * @param CRM_Core_Form $form
*
- * @return parent groups array
+ * @return array parent groups
* @static
* @access public
*/
- /**
- * @param $obj
- *
- * @return array
- */
- static function buildParentGroups( &$obj ) {
+ static function buildParentGroups(&$form) {
$groupNames = CRM_Core_PseudoConstant::group();
$parentGroups = $parentGroupElements = array();
- if (isset($obj->_id) &&
- CRM_Utils_Array::value('parents', $obj->_groupValues)
- ) {
- $parentGroupIds = explode(',', $obj->_groupValues['parents']);
+ if (isset($form->_id) && !empty($form->_groupValues['parents'])) {
+ $parentGroupIds = explode(',', $form->_groupValues['parents']);
foreach ($parentGroupIds as $parentGroupId) {
$parentGroups[$parentGroupId] = $groupNames[$parentGroupId];
if (array_key_exists($parentGroupId, $groupNames)) {
$parentGroupElements[$parentGroupId] = $groupNames[$parentGroupId];
- $obj->addElement('checkbox', "remove_parent_group_$parentGroupId",
+ $form->addElement('checkbox', "remove_parent_group_$parentGroupId",
$groupNames[$parentGroupId]
);
}
}
}
- $obj->assign_by_ref('parent_groups', $parentGroupElements);
+ $form->assign_by_ref('parent_groups', $parentGroupElements);
- if (isset($obj->_id)) {
- $potentialParentGroupIds = CRM_Contact_BAO_GroupNestingCache::getPotentialCandidates($obj->_id,
- $groupNames
- );
+ if (isset($form->_id)) {
+ $potentialParentGroupIds = CRM_Contact_BAO_GroupNestingCache::getPotentialCandidates($form->_id, $groupNames);
}
else {
$potentialParentGroupIds = array_keys($groupNames);
if (count($parentGroupSelectValues) > 1) {
if (CRM_Core_Permission::isMultisiteEnabled()) {
- $required = !isset($obj->_id) || ($obj->_id && CRM_Core_BAO_Domain::isDomainGroup($obj->_id)) ? FALSE : empty($parentGroups);
+ $required = !isset($form->_id) || ($form->_id && CRM_Core_BAO_Domain::isDomainGroup($form->_id)) ? FALSE : empty($parentGroups);
}
else {
$required = FALSE;
}
- $obj->add('select', 'parents', ts('Add Parent'), $parentGroupSelectValues, $required, array('class' => 'crm-select2'));
+ $form->add('select', 'parents', ts('Add Parent'), $parentGroupSelectValues, $required, array('class' => 'crm-select2'));
}
return $parentGroups;
}
/**
- * Function to define action links
+ * define action links
*
* @return array self::$_links array of action links
* @access public
* make sure that the user has permission to access this group
*
* @param int $id the id of the object
- * @param int $title
- *
- * @internal param int $name the name or title of the object
+ * @param int $title name or title of the object
*
* @return string the permission that the user has (or null)
* @access public
abstract public function getInfo();
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @access public
*/
* form snippet. It should add all fields necesarry to get the data
* uploaded to the temporary table in the DB.
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void (operates directly on form argument)
* @access public
abstract public function buildQuickForm(&$form);
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*/
}
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @access public
*/
* form snippet. It should add all fields necesarry to get the data
* uploaded to the temporary table in the DB.
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void (operates directly on form argument)
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*/
}
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @access public
*/
* form snippet. It should add all fields necesarry to get the data
* uploaded to the temporary table in the DB.
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void (operates directly on form argument)
* @access public
/**
* @param $fields
* @param $files
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array|bool
*/
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*/
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
abstract class CRM_Import_Form_Summary extends CRM_Core_Form {
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
* @param object $controller
* @param \const|int $action
*
- * @internal param \CRM_ $object *_Import_Controller
*/
function __construct($controller, $action = CRM_Core_Action::NONE) {
parent::__construct($controller, $action);
/**
* @param $sql
- * @param $params
+ * @param array $params
*
* @return mixed
*/
}
/**
- * 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
*
- * @return object CRM_Core_BAO_LocaationType object
+ * @return CRM_Core_BAO_LocaationType object
* @access public
* @static
*/
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $ids (deprecated) the array that holds all the db ids
*
- * @return object CRM_Mailing_BAO_Component object
+ * @return CRM_Mailing_BAO_Component object
*
* @access public
* @static
/**
* Generate an event queue for a test job
*
- * @params array $params contains form values
- *
- * @param $testParams
+ * @param array $testParams contains form values
*
* @return void
* @access public
}
/**
- * function to add the mailings
+ * add the mailings
*
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
*
* @params array $params Form values
*
- * @param $params
+ * @param array $params
* @param array $ids
*
* @return object $mailing The new mailing object
}
/**
- * Function to show detail Mailing report
+ * show detail Mailing report
*
* @param int $id
*
}
/**
- * Function to build the compose mail form
+ * build the compose mail form
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
* @access public
/**
* Function to build the compose PDF letter form
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
* @access public
*/
static function processQueue($mode = NULL) {
$config = &CRM_Core_Config::singleton();
- // CRM_Core_Error::debug_log_message("Beginning processQueue run: {$config->mailerJobsMax}, {$config->mailerJobSize}");
if ($mode == NULL && CRM_Core_BAO_MailSettings::defaultDomain() == "EXAMPLE.ORG") {
throw new CRM_Core_Exception(ts('The <a href="%1">default mailbox</a> has not been configured. You will find <a href="%2">more info in the online user and administrator guide</a>', array(1 => CRM_Utils_System::url('civicrm/admin/mailSettings', 'reset=1'), 2 => "http://book.civicrm.org/user/advanced-configuration/email-system-configuration/")));
$cronLock->release();
}
- // CRM_Core_Error::debug_log_message('Ending processQueue run');
return TRUE;
}
}
/**
- * @param $params
+ * @param array $params
*
* @return CRM_Mailing_BAO_MailingJob
*/
*
* @param $mailingIDs
*
- * @internal param int $contactID ID of the mailing
- *
* @return array Opened count per mailing ID
* @access public
* @static
}
/**
- * @param $params
+ * @param array $params
* @param null $now
*/
static function bulkCreate($params, $now = NULL) {
*
* @param int $group_id The group id to subscribe to
* @param string $email The email address of the (new) contact
- * @param null $contactId
- * @param null $context
- * @params int $contactId Currently used during event registration/contribution.
- * Specifically to avoid linking group to wrong duplicate contact
- * during event registration.
+ * @param int $contactId Currently used during event registration/contribution.
+ * Specifically to avoid linking group to wrong duplicate contact
+ * during event registration.
+ * @param string $context
*
* @return int|null $se_id The id of the subscription event, null on failure
* @access public
}
/**
- * Function to send subscribe mail
+ * send subscribe mail
*
- * @params array $groups the list of group ids for subscribe
- * @params array $params the list of email
- * @params int $contactId Currently used during event registration/contribution.
- * Specifically to avoid linking group to wrong duplicate contact
- * during event registration.
- *
- * @public
- *
- * @param $groups
- * @param $params
- * @param null $contactId
- * @param null $context
+ * @param array $groups the list of group ids for subscribe
+ * @param array $params the list of email
+ * @param int $contactId Currently used during event registration/contribution.
+ * Specifically to avoid linking group to wrong duplicate contact
+ * during event registration.
+ * @param string $context
*
* @return void
* @static
$success = TRUE;
$groupAdded[] = $title;
- /* Ask the contact for confirmation */
-
+ // Ask the contact for confirmation
$se->send_confirm_request($params['email']);
}
else {
CRM_Utils_System::setUFMessage(ts('We had a problem processing your subscription request for %1. You have tried to subscribe to a private group and/or we encountered a database error. Please contact the site administrator.', array(1 => $groupTitle)));
}
}
- //end of function
}
*
* @param $mailingIDs
*
- * @internal param int $contactID ID of the mailing
- *
* @return array trackable url count per mailing ID
* @access public
* @static
}
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
}
/**
- * Build the form for the approval/rejection mailing
+ * Build the form object for the approval/rejection mailing
*
* @param
*
*/
/**
- * Build the form for disable mail feature
+ * Build the form object for disable mail feature
*
* @param
*
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- *
* @access public
*
* @return void
CRM_Core_DAO::setFieldValue('CRM_Mailing_DAO_Mailing', $this->_mailingId, 'is_archived', TRUE);
}
}
- //end of function
}
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
), ts('Saved'), 'success');
}
- //end of function
/**
- * Function for validation
+ * validation
*
* @param array $params (ref.) an assoc array of name/value pairs
*
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
protected $_mailingID;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Mailing_Form_Schedule extends CRM_Core_Form {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
}
/**
- * Build the form for the last step of the mailing wizard
+ * Build the form object for the last step of the mailing wizard
*
* @param
*
class CRM_Mailing_Form_Settings extends CRM_Core_Form {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- *
* @access public
*
* @return void
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param bool $useTable
*/
static function preProcessCommon(&$form, $useTable = FALSE) {
* @param string $backType
* @param bool $submitOnce
*
- * @internal param string $type button type for the form after processing
*
* @return void
* @access public
}
/**
- * Build the form - it consists of
+ * Build the form object - it consists of
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
class CRM_Mailing_Form_Test extends CRM_Core_Form {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
/**
* Form rule to send out a test mailing.
*
- * @param $testParams
+ * @param aray $testParams
* @param array $files Any files posted to the form
* @param array $self an current this object
*
- * @internal param array $params Array of the form values
* @return boolean true on successful SMTP handoff
* @access public
*/
}
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function for validation
+ * validation
*
* @param array $params (ref.) an assoc array of name/value pairs
*
class CRM_Mailing_Page_AJAX {
/**
- * Function to fetch the template text/html messages
+ * fetch the template text/html messages
*/
public static function template() {
$templateId = CRM_Utils_Type::escape($_POST['tid'], 'Integer');
}
/**
- * Function to retrieve contact mailings
+ * retrieve contact mailings
*/
public static function getContactMailings() {
$contactID = CRM_Utils_Type::escape($_GET['contact_id'], 'Integer');
}
/**
- * @param $params
+ * @param array $params
* @param bool $sortBy
*
* @return string
/**
* Class constructor
*
- * @internal param $
*
* @return \CRM_Mailing_Selector_Browse
@access public
*/
function __construct() {
}
- //end of constructor
/**
* This method returns the links that are given for each search row.
static function &links() {
return self::$_links;
}
- //end of function
/**
* getter for array of the parameters required for creating pager.
*
* @param $action
- * @param $params
+ * @param array $params
*
- * @internal param $
* @access public
*/
function getPagerParams($action, &$params) {
$params['buttonTop'] = 'PagerTopButton';
$params['buttonBottom'] = 'PagerBottomButton';
}
- //end of function
/**
* returns the column headers as an array of tuples:
}
/**
- * @param $params
+ * @param array $params
* @param bool $sortBy
*
* @return int|string
$this->_parent->assign('aToZ', $aToZBar);
}
}
-//end of class
$this->_job_id = $job;
$this->_url_id = $url;
}
- //end of constructor
/**
* This method returns the links that are given for each search row.
static function &links() {
return self::$_links;
}
- //end of function
/**
* getter for array of the parameters required for creating pager.
*
* @param $action
- * @param $params
+ * @param array $params
*
- * @internal param $
* @access public
*/
function getPagerParams($action, &$params) {
$params['buttonTop'] = 'PagerTopButton';
$params['buttonBottom'] = 'PagerBottomButton';
}
- //end of function
/**
* returns the column headers as an array of tuples:
return $this->eventToTitle();
}
}
-//end of class
$this->_query->_distinctComponentClause = " civicrm_mailing_recipients.id ";
}
- //end of constructor
/**
* This method returns the links that are given for each search row.
}
return self::$_links;
}
- //end of function
/**
* getter for array of the parameters required for creating pager.
*
* @param $action
- * @param $params
+ * @param array $params
*
- * @internal param $
* @access public
*/
function getPagerParams($action, &$params) {
$params['buttonTop'] = 'PagerTopButton';
$params['buttonBottom'] = 'PagerBottomButton';
}
- //end of function
/**
* Returns total number of rows for the query.
}
/**
- *
* @return array $qill which contains an array of strings
* @access public
*/
/**
* class constructor
*
- * @param object $controller
+ * @param CRM_Mailing_Controller $controller
* @param \const|int $action
*
- * @internal param \CRM_Mailing_Controller $object
* @return \CRM_Mailing_StateMachine_Send CRM_Mailing_StateMachine
*/
function __construct($controller, $action = CRM_Core_Action::NONE) {
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $ids the array that holds all the db ids
*
- * @return object CRM_Member_BAO_Membership object
+ * @return CRM_Member_BAO_Membership object
* @access public
* @static
*/
* @param string $activityType
*
* @throws CRM_Core_Exception
- * @internal param bool $callFromAPI Is this function called from API?
*
* @return CRM_Member_BAO_Membership object
* @access public
}
/**
- * Function to check the membership extended through relationship
+ * check the membership extended through relationship
*
* @param int $membershipId membership id
* @param int $contactId contact id
* @param array $defaults (reference ) an assoc array to hold the name / value pairs
* in a hierarchical manner
*
- * @internal param array $ids (reference) the array that holds all the db ids
- *
- * @return object CRM_Member_BAO_Membership object
+ * @return CRM_Member_BAO_Membership object
* @access public
* @static
*/
/**
*
- * Function to get membership status and membership type values
+ * get membership status and membership type values
*
* @param int $membershipId membership id of values to return
*
}
/**
- * Function to delete membership.
+ * delete membership.
* Wrapper for most delete calls. Use this unless you JUST want to delete related memberships w/o deleting the parent.
*
* @param int $membershipId membership id that needs to be deleted
}
/**
- * Function to delete membership.
+ * delete membership.
*
* @param int $membershipId membership id that needs to be deleted
*
/**
* Function to build Membership Block in Contribution Pages
*
- * @param object $form form object
- * @param $pageID
- * @param $cid
+ * @param CRM_Core_Form $form form object
+ * @param int $pageID - unused?
+ * @param int $cid - contact checked for having a current membership for a particular membership
* @param boolean $formItems
* @param int $selectedMembershipTypeID selected membership id
* @param boolean $thankPage thank you page
* @param null $isTest
*
* @return bool Is this a separate membership payment
- * @internal param int $pageId contribution page id
- * @internal param bool $memContactId contact who is to be
- * checked for having a current membership for a particular membership
*
* @static
*/
/**
* Function to return Membership Block info in Contribution Pages
*
- * @param $pageID
+ * @param int $pageID contribution page id
*
* @return array|null
- * @internal param int $pageId contribution page id
*
* @static
*/
/**
* Function to return a current membership of given contact
- * NB: if more than one membership meets criteria, a randomly selected one is returned.
+ * NB: if more than one membership meets criteria, a randomly selected one is returned.
*
* @param int $contactID contact id
* @param int $memType membership type, null to retrieve all types
* @param int $isTest
- * @param null $membershipId
+ * @param int $membershipId if provided, then determine if it is current
* @param boolean $onlySameParentOrg true if only Memberships with same parent org as the $memType wanted, false otherwise
*
* @return array|bool
- * @internal param int $membershipID if provided, then determine if it is current
* @static
*/
static function getContactMembership($contactID, $memType, $isTest, $membershipId = NULL, $onlySameParentOrg = FALSE) {
* @param int $contactID id of the contact
* @param int $membershipTypeID id of the new membership type
* @param boolean $is_test if this is test contribution or live contribution
- * @param object $form form object
+ * @param CRM_Core_Form $form form object
* @param null $changeToday
* @param int $modifiedID individual contact id in case of On Behalf signup (CRM-4027 )
* @param null $customFieldsFormatted
* @param int $numRenewTerms how many membership terms are being added to end date (default is 1)
- *
* @param integer $membershipID Membership ID, this should always be passed in & optionality should be removed
*
* @throws CRM_Core_Exception
- * @internal param array $ipnParams array of name value pairs, to be used (for e.g source) when $form not present
- * @return CRM_Member_DAO_Membership $membership object of membership
*
* @static
* @access public
* function to create memberships for related contacts
* takes into account the maximum related memberships
*
- * @param array $params array of key - value pairs
- * @param $dao
- *
- * @internal param object $membership membership object
+ * @param array $params array of key - value pairs
+ * @param CRM_Core_DAO $dao membership object
*
- * @return null|relatedMembership array of memberships if created
+ * @return null|array array of memberships if created
* @static
* @access public
*/
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param null $membershipTypeID
*
* @return array
/**
* Function to get membership record count for a Contact
*
- * @param $contactID
+ * @param int $contactID
* @param boolean $activeOnly
*
- * @internal param int $contactId Contact ID
- * @return int count of membership records
+ * @return null|string
* @access public
* @static
*/
* @param CRM_Contribute_Form_Contribution_Confirm $form
* @param $tempParams
* @param $isTest
- *
* @param $lineItems
* @param $minimumFee
* @param $financialTypeID
*
* @throws CRM_Core_Exception
* @throws Exception
- * @internal param $membershipDetails
* @return CRM_Contribute_BAO_Contribution
*/
public static function processSecondaryFinancialTransaction($contactID, &$form, $tempParams, $isTest, $lineItems, $minimumFee, $financialTypeID) {
* @param $isTest
* @param $numTerms
* @param $membershipContribution
- * @param $form
- *
- * @internal param $createdMemberships
+ * @param CRM_Core_Form $form
*
* @return array
*/
*
* @param array $errors
*
- * @internal param $message
*
* @return string
*/
/**
* Extract relevant values from the form so we can separate form logic from BAO logcis
- * @param $form
+ * @param CRM_Core_Form $form
* @param $changeToday
* @param $membershipTypeDetails
*
$updateCount++;
}
}
- // CRM_Core_Error::debug( 'fEnd', count( $GLOBALS['_DB_DATAOBJECT']['RESULTS'] ) );
}
$result['is_error'] = 0;
$result['messages'] = ts('Processed %1 membership records. Updated %2 records.', array(1 => $processCount, 2 => $updateCount));
* @param bool $onlyLifeTime
*
* @return array
- * @internal param array $contactMembershipType array of allMembershipTypes Key - value pairs
*/
-
static function getAllContactMembership($contactID, $isTest = FALSE, $onlyLifeTime = FALSE) {
$contactMembershipType = array();
if (!$contactID) {
/**
* Function to record line items for default membership
*
- * @param $qf object
- *
- * @param $membershipType array with membership type and organization
- *
- * @param $priceSetId
+ * @param CRM_Core_Form $qf
+ * @param array $membershipType array with membership type and organization
+ * @param int $priceSetId
*
- * @internal param $ $ priceSetId priceset id
* @access public
* @static
*/
parent::__construct();
}
/**
- * function to add the membership Blocks
+ * add the membership Blocks
*
* @param array $params reference array contains the values submitted by the form
*
}
/**
- * Function to delete membership Blocks
+ * delete membership Blocks
*
* @param int $id
*
class CRM_Member_BAO_MembershipLog extends CRM_Member_DAO_MembershipLog {
/**
- * function to add the membership log record
+ * add the membership log record
*
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
}
/**
- * Function to delete membership log record
+ * delete membership log record
*
- * @param $membershipID
+ * @param int $membershipID
*
* @return mixed
- * @internal param int $membershipTypeId
* @static
*/
parent::__construct();
}
/**
- * function to add the membership Payments
+ * add the membership Payments
*
* @param array $params reference array contains the values submitted by the form
*
}
/**
- * Function to delete membership Payments
+ * delete membership Payments
*
* @param int $id
*
}
/**
- * 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
*
- * @return object CRM_Member_BAO_MembershipStatus object
+ * @return CRM_Member_BAO_MembershipStatus object
* @access public
* @static
*/
* @param array $params (reference ) an assoc array of name/value pairs
*
* @throws Exception
- * @return object CRM_Member_BAO_MembershipStatus object
+ * @return CRM_Member_BAO_MembershipStatus object
* @access public
* @static
*/
return $membershipStatusBAO;
}
/**
- * function to add the membership types
+ * add the membership types
*
* @param array $params reference array contains the values submitted by the form
* @param array $ids array contains the id - this param is deprecated
}
/**
- * Function to get membership status
+ * get membership status
*
* @param int $membershipStatusId
*
}
/**
- * Function to delete membership Types
+ * delete membership Types
*
* @param int $membershipStatusId
*
* @throws CRM_Core_Exception
- * @internal param $
* @static
*/
static function del($membershipStatusId) {
* @param string $joinDate join date of the member whose membership status is to be calculated.
* @param \date|string $statusDate status date of the member whose membership status is to be calculated.
* @param boolean $excludeIsAdmin exclude the statuses those having is_admin = 1
- * @param $membershipTypeID
+ * @param int $membershipTypeID
* @param array $membership membership params as available to calling function - passed to the hook
*
- * @internal param int $membershipType membership type id - passed to the hook
* @return array
@static
*/
}
/**
- * 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
*
- * @return object CRM_Member_BAO_MembershipType object
+ * @return CRM_Member_BAO_MembershipType object
* @access public
* @static
*/
}
/**
- * function to add the membership types
+ * add the membership types
*
* @param array $params reference array contains the values submitted by the form
* @param array $ids array contains the id (deprecated)
}
/**
- * Function to delete membership Types
+ * delete membership Types
*
* @param int $membershipTypeId
*
}
/**
- * Function to convert membership Type's 'start day' & 'rollover day' to human readable formats.
+ * convert membership Type's 'start day' & 'rollover day' to human readable formats.
*
* @param array $membershipType an array of membershipType-details.
* @static
* @param bool $public
*
* @return array
- * @internal param int $membershipTypeId
* @static
*/
static function getMembershipTypes($public = TRUE) {
/**
* The function returns all the Organization for all membershiptypes .
*
- * @param null $membershipTypeId
+ * @param int $membershipTypeId
*
* @return array
- * @internal param array $allmembershipTypes array of allMembershipTypes
- * with organization id Key - value pairs.
*/
static function getMembershipTypeOrganization($membershipTypeId = NULL) {
$allmembershipTypes = array();
/**
- * @param $params
+ * @param array $params
* @param $previousID
* @param $membershipTypeId
*/
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
static function buildSearchForm(&$form) {
foreach (CRM_Member_PseudoConstant::membershipType() as $id => $Name) {
}
/**
- * This function sets the default values for the form. MobileProvider that in edit/view mode
+ * Set default values for the form. MobileProvider that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to extract values from the contact create boxes on the form and assign appropriately to
+ * extract values from the contact create boxes on the form and assign appropriately to
*
* - $this->_contributorEmail,
* - $this->_memberEmail &
}
/**
- * This function sets the default values for the form. MobileProvider that in edit/view mode
+ * Set default values for the form. MobileProvider that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function for validation
+ * validation
*
* @param array $params (ref.) an assoc array of name/value pairs
*
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * Function to send email receipt
+ * send email receipt
*
- * @param object $form form object
- * @param $formValues
+ * @param CRM_Core_Form $form form object
+ * @param array $formValues
* @param object $membership object
*
- * @internal param array $values submitted values
* @return boolean true if mail was sent successfully
* @static
*/
protected $_memPriceSetId = NULL;
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function for validation
+ * validation
*
* @param array $params (ref.) an assoc array of name/value pairs
*
}
/**
- * This function sets the default values for the form. MobileProvider that in edit/view mode
+ * Set default values for the form. MobileProvider that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function for validation
+ * validation
*
* @param array $params (ref.) an assoc array of name/value pairs
*
}
/**
- * Function to process the renewal form
+ * process the renewal form
*
* @access public
*
class CRM_Member_Form_MembershipStatus extends CRM_Member_Form_MembershipConfig {
/**
- * This function sets the default values for the form. MobileProvider that in edit/view mode
+ * Set default values for the form. MobileProvider that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * This function sets the default values for the form. MobileProvider that in edit/view mode
+ * Set default values for the form. MobileProvider that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function for validation
+ * validation
*
* @param array $params (ref.) an assoc array of name/value pairs
*
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param bool $useTable
*/
static function preProcessCommon(&$form, $useTable = FALSE) {
* @param string $backType
* @param bool $submitOnce
*
- * @internal param string $type button type for the form after processing
- *
* @return void
* @access public
*/
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
CRM_Core_Session::setStatus(ts("No updates have been saved."), ts('Not Saved'), 'alert');
}
}
- //end of function
}
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @param null
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
* in fixing the existing pdfLetter classes to be suitably generic
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
* @param $membershipIDs
* @param $skipOnHold
* @param $skipDeceased
CRM_Utils_System::civiExit(1);
}
- //end of function
/**
* generate htmlfor pdf letters
* @access public
*/
function preProcess() {
- /*
- * initialize the task and row fields
- */
+ // initialize the task and row fields
parent::preProcess();
$session = CRM_Core_Session::singleton();
$this->_userContext = $session->readUserContext();
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
// also reset the batch page so it gets new values from the db
$this->controller->resetPage('Batch');
}
- //end of function
}
}
/**
- * Build the form - it consists of
+ * Build the form object - it consists of
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
function preProcess() {}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Member_Import_Form_DataSource extends CRM_Core_Form {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Member_Import_Form_Preview extends CRM_Import_Form_Preview {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
class CRM_Member_Import_Form_Summary extends CRM_Import_Form_Summary {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * function to format the field values for input to the api
+ * format the field values for input to the api
*
* @return array (reference ) associative array of name/value pairs
* @access public
/**
* Export data to a CSV file
*
- * @param $fileName
+ * @param string $fileName
* @param array $header
- * @param data $data
+ * @param array $data
*
- * @internal param string $filename
* @return void
* @access public
*/
$errorMessage = 'Membership Start Date is required to create a memberships.';
CRM_Contact_Import_Parser_Contact::addToErrorMsg('Start Date', $errorMessage);
}
- //end
//for date-Formats
$session = CRM_Core_Session::singleton();
class CRM_Member_Page_AJAX {
/**
- * Function to setDefaults according to membership type
+ * setDefaults according to membership type
*/
static function getMemberTypeDefaults() {
if (!$_POST['mtype']) {
//LCD end
}
- // LCD debug
- //CRM_Core_Error::debug($membershipSummary);
$status = CRM_Member_BAO_MembershipStatus::getMembershipStatusCurrent();
$status = implode(',', $status);
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param null $contactId
*/
public static function setContext(&$form, $contactId = NULL) {
}
/**
- * Function to define action links for membership types of related organization
+ * define action links for membership types of related organization
*
* @return array self::$_membershipTypesLinks array of action links
* @access public
class CRM_Member_Page_UserDashboard extends CRM_Contact_Page_View_UserDashBoard {
/**
- * Function to list memberships for the UF user
+ * list memberships for the UF user
*
* return null
* @access public
$this->_query->_distinctComponentClause = " civicrm_membership.id";
$this->_query->_groupByComponentClause = " GROUP BY civicrm_membership.id ";
}
- //end of constructor
/**
* This method returns the links that are given for each search row.
return self::$_links[$status];
}
- //end of function
/**
* getter for array of the parameters required for creating pager.
*
* @param $action
- * @param $params
- * @internal param $
+ * @param array $params
* @access public
*/
function getPagerParams($action, &$params) {
$params['buttonTop'] = 'PagerTopButton';
$params['buttonBottom'] = 'PagerBottomButton';
}
- //end of function
/**
* Returns total number of rows for the query.
}
/**
- *
* @return array $qill which contains an array of strings
* @access public
*/
return ts('CiviCRM Member Search');
}
}
-//end of class
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- *
* @access public
*
* @return void
}
/**
- * function to add or update either a Personal Campaign Page OR a PCP Block
+ * add or update either a Personal Campaign Page OR a PCP Block
*
* @param array $params reference array contains the values submitted by the form
* @param bool $pcpBlock if true, create or update PCPBlock, else PCP
}
/**
- * function to get the Display name of a contact for a PCP
+ * get the Display name of a contact for a PCP
*
* @param int $id id for the PCP
*
}
/**
- * Function to return PCP Block info for dashboard
+ * return PCP Block info for dashboard
*
* @param $contactId
*
}
/**
- * Function to build the form
+ * Build the form object
*
- * @param object $form form object
+ * @param CRM_Core_Form $form form object
*
* @return void
* @access public
/**
* Function to get pcp block is active
*
- * @param $pcpId
+ * @param int $pcpId
* @param $component
- * @internal param int $id campaign page id
*
* @return int
* @access public
/**
* Function to get pcp block is enabled for component page
*
- * @param $pageId
+ * @param int $pageId
* @param $component
- * @internal param int $id contribution page id
*
- * @return String
+ * @return string
* @access public
* @static
*/
/**
* Function to get email is enabled for supporter's profile
*
- * @param $profileId
- *
- * @internal param int $id supporter's profile id
+ * @param int $profileId supporter's profile id
*
* @return boolean
* @access public
/**
* Function to obtain the title of page associated with a pcp
*
- * @param $pcpId
+ * @param int $pcpId
* @param $component
*
- * @internal param int $id campaign page id
- *
* @return int
* @access public
* @static
/**
* Function to get pcp block & entity id given pcp id
*
- * @param $pcpId
+ * @param int $pcpId
* @param $component
*
- * @internal param int $id campaign page id
- *
* @return String
* @access public
* @static
*
* @param $component
*
- * @internal param int $id campaign page id
- *
* @return String
* @access public
* @static
/**
* Function to get supporter profile id
*
- * @param $component_id
+ * @param int $component_id
* @param string $component
*
- * @internal param int $contributionPageId contribution page id
- *
* @return int
* @access public
* @static
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
* @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
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function for validation
+ * validation
*
* @param array $params (ref.) an assoc array of name/value pairs
*
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function for validation
+ * validation
*
* @param array $params (ref.) an assoc array of name/value pairs
*
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
public $_context;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @param null
*
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @param null
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @param null
*
* @param array $fields posted values of the form
*
* @param $files
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array list of errors to be posted back to the form
* @static
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
* @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
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
- * @return object CRM_Pledge_BAO_Pledge object
+ * @return CRM_Pledge_BAO_Pledge object
* @access public
* @static
*/
}
/**
- * function to add pledge
+ * add pledge
*
* @param array $params reference array contains the values submitted by the form
*
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return object CRM_Pledge_BAO_Pledge object
+ * @return CRM_Pledge_BAO_Pledge object
* @access public
* @static
*/
}
/**
- * Function to delete the pledge
+ * delete the pledge
*
* @param int $id pledge id
*
}
/**
- * function to get the amount details date wise.
+ * get the amount details date wise.
*
* @param string $status
* @param string $startDate
GROUP BY cp.currency
";
if ($select) {
- // CRM_Core_Error::debug($status . ' start:' . $startDate . '- end:' . $endDate, $query);
$dao = CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray);
$amount = array();
$count = 0;
/**
* Function to send Acknowledgment and create activity.
*
- * @param object $form form object.
- * @param array $params (reference ) an assoc array of name/value pairs.
+ * @param CRM_Core_Form $form form object.
+ * @param array $params an assoc array of name/value pairs.
* @access public
*
* @return void.
}
}
}
- //end
//assign pledge fields value to template.
$pledgeFields = array(
*
* @param $contactID
*
- * @internal param int $contactId Contact ID
- *
* @return int count of pledge records
* @access public
* @static
}
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
- * @return object CRM_Pledge_BAO_PledgeBlock object
+ * @return CRM_Pledge_BAO_PledgeBlock object
* @access public
* @static
*/
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return object CRM_Pledge_BAO_PledgeBlock object
+ * @return CRM_Pledge_BAO_PledgeBlock object
* @access public
* @static
*/
}
/**
- * function to add pledgeBlock
+ * add pledgeBlock
*
* @param array $params reference array contains the values submitted by the form
*
}
/**
- * Function to delete the pledgeBlock
+ * delete the pledgeBlock
*
* @param int $id pledgeBlock id
*
}
/**
- * Function to return Pledge Block info in Contribution Pages
+ * return Pledge Block info in Contribution Pages
*
- * @param $pageID
+ * @param int $pageID contribution page id
*
* @return array
- * @internal param int $pageId contribution page id
- *
* @static
*/
static function getPledgeBlock($pageID) {
/**
* Function to build Pledge Block in Contribution Pages
*
- * @param obj $form
+ * @param CRM_Core_Form $form
* @static
*/
static function buildPledgeBlock($form) {
}
/**
- * Function to get pledge payment details
+ * get pledge payment details
*
* @param int $pledgeId pledge id
*
}
/**
- * @param $params
+ * @param array $params
*
* @return pledge
*/
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
- * @return object CRM_Pledge_BAO_PledgePayment object
+ * @return CRM_Pledge_BAO_PledgePayment object
* @access public
* @static
*/
*
* @param $id
*
- * @internal param array $params associate array of field
- *
- * @return pledge payment id
+ * @return int pledge payment id
* @static
*/
static function del($id) {
}
/**
- * Function to delete all pledge payments
+ * delete all pledge payments
*
* @param int $id pledge id
*
* @param int $pledgeID , id of pledge
* @param array $paymentIDs , ids of pledge payment(s) to update
* @param int $paymentStatusID , payment status to set
- * @param null $pledgeStatusID
+ * @param int $pledgeStatusID pledge status to change (if needed)
* @param float|int $actualAmount , actual amount being paid
* @param bool $adjustTotalAmount , is amount being paid different from scheduled amount?
* @param bool $isScriptUpdate , is function being called from bin script?
*
- * @internal param int $pledgeStatus , pledge status to change (if needed)
* @return int $newStatus, updated status id (or 0)
*/
static function updatePledgePaymentStatus(
}
/**
- * Function to update pledge payment table
+ * update pledge payment table
*
* @param int $pledgeId pledge id
* @param int $paymentStatusId payment status id to set
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
static function buildSearchForm(&$form) {
// pledge related dates
public $_id;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
public $_isPending = FALSE;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
* @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
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
class CRM_Pledge_Form_PledgeView extends CRM_Core_Form {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
*
* @param array $fields posted values of the form
*
- * @internal param array $errors list of errors to be posted back to the form
- *
* @return void
* @static
* @access public
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param bool $useTable
*/
static function preProcessCommon(&$form, $useTable = FALSE) {
* @param string $backType
* @param bool $submitOnce
*
- * @internal param string $type button type for the form after processing
*
* @return void
* @access public
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form - it consists of
+ * Build the form object - it consists of
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
function preProcess() {}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_Pledge_Page_AJAX {
/**
- * Function for building Pledge Name combo box
+ * building Pledge Name combo box
*/
static function pledgeName() {
$this->_query->_distinctComponentClause = "civicrm_pledge.id";
$this->_query->_groupByComponentClause = " GROUP BY civicrm_pledge.id ";
}
- //end of constructor
/**
* This method returns the links that are given for each search row.
return self::$_links;
}
- //end of function
/**
* getter for array of the parameters required for creating pager.
*
* @param $action
- * @param $params
+ * @param array $params
*
- * @internal param $
* @access public
*/
function getPagerParams($action, &$params) {
$params['buttonTop'] = 'PagerTopButton';
$params['buttonBottom'] = 'PagerBottomButton';
}
- //end of function
/**
* Returns total number of rows for the query.
}
/**
- *
* @return array $qill which contains an array of strings
* @access public
*/
return ts('Pledge Search');
}
}
-//end of class
*
* @param array $params (reference) an assoc array of name/value pairs
*
- * @return object CRM_Price_DAO_LineItem object
+ * @return CRM_Price_DAO_LineItem object
* @access public
* @static
*/
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
- * @return object CRM_Price_BAO_LineItem object
+ * @return CRM_Price_BAO_LineItem object
* @access public
* @static
*/
}
/**
- * Function to process price set and line items.
+ * process price set and line items.
*
* @param $entityId
* @param array $lineItem line item array
*
* @param bool $update
*
- * @internal param int $contributionId contribution id
- * @internal param \decimal $initAmount amount
* @access public
* @return void
* @static
}
/**
- * Function to build line items array.
+ * build line items array.
* @param array $params form values
*
* @param string $entityId entity id
* price field object. the params array could contain additional unused name/value
* pairs
*
- * @param array $params (reference ) an assoc array of name/value pairs
- *
- * @internal param array $ids the array that holds all the db ids
+ * @param array $params (reference) an assoc array of name/value pairs
*
- * @return object CRM_Price_BAO_PriceField object
+ * @return CRM_Price_BAO_PriceField object
* @access public
* @static
*/
*
* @param array $params (reference) an assoc array of name/value pairs
*
- * @return object CRM_Price_DAO_PriceField object
+ * @return CRM_Price_DAO_PriceField object
* @access public
* @static
*/
}
/**
- * 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
*
- * @return object CRM_Price_DAO_PriceField object
+ * @return CRM_Price_DAO_PriceField object
* @access public
* @static
*/
*
* @param $ids
*
- * @return object CRM_Price_DAO_PriceFieldValue object
+ * @return CRM_Price_DAO_PriceFieldValue object
* @access public
* @static
*/
*
* @param $ids
*
- * @return object CRM_Price_DAO_PriceFieldValue object
+ * @return CRM_Price_DAO_PriceFieldValue object
* @access public
* @static
*/
* @param array $params (reference ) an assoc array
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
- * @return object CRM_Price_DAO_PriceFieldValue object
+ * @return CRM_Price_DAO_PriceFieldValue object
* @access public
* @static
*/
*
* @param array $params (reference) an assoc array of name/value pairs
*
- * @return object CRM_Price_DAO_PriceSet object
+ * @return CRM_Price_DAO_PriceSet object
* @access public
* @static
*/
}
/**
- * 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
*
- * @return object CRM_Price_DAO_PriceSet object
+ * @return CRM_Price_DAO_PriceSet object
* @access public
* @static
*/
/**
* @param $fields
- * @param $params
+ * @param array $params
* @param $lineItem
* @param string $component
*/
}
/**
- * Function to build the price set form.
+ * build the price set form.
*
* @param CRM_Core_Form $form
*
}
/**
- * Function to check the current Membership
+ * check the current Membership
* having end date null.
*/
static function checkCurrentMembership(&$options, $userid) {
}
/**
- * Function to set daefult the price set fields.
+ * set daefult the price set fields.
*
- * @param $form
+ * @param CRM_Core_Form $form
* @param $defaults
*
* @return array $defaults
/**
* Copy priceSet when event/contibution page is copied
*
- * @params string $baoName BAO name
- * @params int $id old event/contribution page id
- * @params int $newId newly created event/contribution page id
- *
- * @param string $baoName
- * @param integer $id
- * @param integer $newId
+ * @param string $baoName BAO name
+ * @param int $id old event/contribution page id
+ * @param int $newId newly created event/contribution page id
*/
static function copyPriceSet($baoName, $id, $newId) {
$priceSetId = CRM_Price_BAO_PriceSet::getFor($baoName, $id);
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @param null
*
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
protected $_useForMember;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @param null
*
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @param null
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @param null
*
* @param array $fields posted values of the form
*
* @param $files
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array if errors then list of errors to be posted back to the form,
* true otherwise
protected $_oid;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @param null
*
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @param null
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @param null
*
* @param array $fields posted values of the form
*
* @param $files
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return array if errors then list of errors to be posted back to the form,
* true otherwise
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @param null
*
protected $_sid;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @param null
*
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @param null
*
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @param null
/**
* edit price set
*
- * @param $sid
+ * @param int $sid price set id
* @param string $action the action to be invoked
*
- * @internal param int $id price set id
* @return void
* @access public
*/
/**
* Preview price set
*
- * @param $sid
- *
- * @internal param int $id price set id
+ * @param int $sid price set id
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
}
- /*
- * Function to validate profile and provided activity Id
- *
- * @params Integer $activityId Activity Id
- * @params Integer $gid Profile Id
- *
- * @return Array $errors Errors ( if any ).
- */
/**
- * @param $activityId
- * @param $contactId
- * @param $gid
+ * Validate profile and provided activity Id
+ *
+ * @param int $activityId
+ * @param int $contactId
+ * @param int $gid
*
* @return array
*/
*
* @param array $fields the input form values
* @param array $files the uploaded files if any
- * @param object $form the form object
+ * @param CRM_Core_Form $form the form object
*
* @return true if no errors, else array of errors
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
*
* @param array $fields the input form values
* @param array $files the uploaded files if any
- * @param object $form
+ * @param CRM_Core_Form $form
*
- * @internal param array $options additional user data
*
* @return true if no errors, else array of errors
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to intercept QF validation and do our own redirection
+ * intercept QF validation and do our own redirection
*
* We use this to send control back to the user for a user formatted page
* This allows the user to maintain the same state and display the error messages
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to get the list of contacts for a profile
+ * get the list of contacts for a profile
*
* @param $gid
*
* @return array
- * @internal param object $form
- *
* @access public
*/
function getProfileContact($gid) {
/**
* Class constructor
*
- * @param $params
+ * @param array $params
* @param $customFields
* @param string params the params for the where clause
*
$this->_options = &$this->_query->_options;
}
- //end of constructor
/**
* This method returns the links that are given for each search row.
}
return self::$_links;
}
- //end of function
/**
* getter for array of the parameters required for creating pager.
*
* @param $action
- * @param $params
+ * @param array $params
*
- * @internal param $
* @access public
*/
function getPagerParams($action, &$params) {
$params['buttonTop'] = 'PagerTopButton';
$params['buttonBottom'] = 'PagerBottomButton';
}
- //end of function
/**
* returns the column headers as an array of tuples:
}
} //func close
}
-//end of class
/**
* Return an item that could not be processed
*
- * @param The $item
- *
- * @internal param object $dao The item returned by claimItem
+ * @param CRM_Core_DAO $item The item returned by claimItem
*
* @return bool
*/
/**
* Remove an item from the queue
*
- * @param $dao object The item returned by claimItem
+ * @param CRM_Core_DAO $dao The item returned by claimItem
*/
function deleteItem($dao) {
$dao->delete();
/**
* Return an item that could not be processed
*
- * @param $dao object The item returned by claimItem
+ * @param CRM_Core_DAO $dao The item returned by claimItem
*
* @return bool
*/
}
/**
- *
* @return array(is_error => bool, is_continue => bool, numberOfItems => int, redirect_url => string)
*/
public function handleEnd() {
}
/**
- *
* @param $isOK
* @param null $exception
*
}
/**
- *
* @param $queueSpec, array with keys:
* - type: string, required, e.g. "interactive", "immediate", "stomp", "beanstalk"
* - name: string, required, e.g. "upgrade-tasks"
}
/**
- *
* @param $queueSpec, array with keys:
* - type: string, required, e.g. "interactive", "immediate", "stomp", "beanstalk"
* - name: string, required, e.g. "upgrade-tasks"
}
/**
- *
* @param $queueSpec array, see create()
*
* @return CRM_Queue_Queue
var $title;
/**
- *
* @param $callback mixed, serializable, a callable PHP item; must accept at least one argument (CRM_Queue_TaskContext)
* @param $arguments array, serializable, extra arguments to pass to the callback (in order)
* @param $title string, a printable string which describes this task
/**
* Perform the task
*
- * @param $taskCtx
- *
- * @throws Exception
- * @internal param array $taskContext with keys:
+ * @param $taskCtx array with keys:
* - log: object 'Log'
*
+ * @throws Exception
* @return bool, TRUE if task completes successfully
*/
function run($taskCtx) {
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return object CRM_Report_DAO_ReportInstance object
+ * @return CRM_Report_DAO_ReportInstance object
* @access public
* @static
*/
}
/**
- * Function to create instance
+ * create instance
* takes an associative array and creates a instance object and does any related work like permissioning, adding to dashboard etc.
*
* This function is invoked from within the web form layer and also from the api layer
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @return object CRM_Report_BAO_ReportInstance object
+ * @return CRM_Report_BAO_ReportInstance object
* @access public
* @static
*/
}
/**
- * @param $params
+ * @param array $params
* @param $defaults
*
* @return CRM_Report_DAO_ReportInstance|null
* Setter for $_id
*
* @param $instanceid
- *
- * @internal param int $id
*/
function setID($instanceid) {
$this->_id = $instanceid;
/**
* Setter for $_force
- * @param $isForce
- * @internal param bool $force
+ * @param bool $isForce
*/
function setForce($isForce) {
$this->_force = $isForce;
* @deprecated - use getAddressColumns which is a more accurate description
* and also accepts an array of options rather than a long list
*
- * function for adding address fields to construct function in reports
+ * adding address fields to construct function in reports
*
* @param bool $groupBy Add GroupBy? Not appropriate for detail report
* @param bool $orderBy Add GroupBy? Not appropriate for detail report
$this->beginPostProcess();
$sql = $this->buildQuery(TRUE);
- //CRM_Core_Error::debug('sql', $sql);
$rows = $graphRows = array();
$this->buildRows($sql, $rows);
) {
$errors['fields'] = ts('To view totals please select all of activity id, date and duration.');
}
- // CRM_Core_Error::debug('xx', print_r($fields, true));
return $errors;
}
}
/*
- * function for adding address fields to construct function in reports
+ * adding address fields to construct function in reports
* @param array $options Options for the report
* - prefix prefix to add (e.g. 'honor' when getting address details for honor contact
* - prefix_label optional prefix lable eg. "Honoree " for front end
class CRM_Report_Form_Instance {
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
static function buildForm(&$form) {
// we should not build form elements in dashlet mode
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param $defaults
*/
static function setDefaultValues(&$form, &$defaults) {
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param bool $redirect
*/
static function postProcess(&$form, $redirect = TRUE) {
return;
}
- // crm_core_error::debug("$this->_actions", $this->_action);
$this->_opID = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionGroup',
'report_template', 'id', 'name'
);
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * function to get userContext params
+ * get userContext params
*
* @param int $mode mode that we are in
*
*
* @return bool
*/
- static function mailReport($fileContent, $instanceID = NULL, $outputMode = 'html', $attachments = array(
- )) {
+ static function mailReport($fileContent, $instanceID = NULL, $outputMode = 'html', $attachments = array()) {
if (!$instanceID) {
return FALSE;
}
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param $rows
*/
static function export2csv(&$form, &$rows) {
}
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
*
* @return string URL query string
*/
- static function getPreviewCriteriaQueryParams($defaults = array(
- ), $params = array()) {
+ static function getPreviewCriteriaQueryParams($defaults = array(), $params = array()) {
static $query_string;
if (!isset($query_string)) {
if (!empty($params)) {
class CRM_SMS_Form_Group extends CRM_Contact_Form_Task {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
class CRM_SMS_Form_Schedule extends CRM_Core_Form {
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
*
* @access public
*
}
/**
- * Build the form for the last step of the sms wizard
+ * Build the form object for the last step of the sms wizard
*
* @param
*
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * Function for validation
+ * validation
*
* @param array $params (ref.) an assoc array of name/value pairs
*
* @return object
* @static
*/
- static function &singleton($providerParams = array(
- ), $force = FALSE) {
+ static function &singleton($providerParams = array(), $force = FALSE) {
$mailingID = CRM_Utils_Array::value('mailing_id', $providerParams);
$providerID = CRM_Utils_Array::value('provider_id', $providerParams);
$providerName = CRM_Utils_Array::value('provider', $providerParams);
abstract function send($recipients, $header, $message, $dncID = NULL);
/**
- * Function to return message text. Child class could override this function to have better control over the message being sent.
+ * return message text. Child class could override this function to have better control over the message being sent.
*
* @access public
*/
* @return $this|null|object
* @throws CRM_Core_Exception
*/
- function createActivity($apiMsgID, $message, $headers = array(
- ), $jobID = NULL, $userID = NULL) {
+ function createActivity($apiMsgID, $message, $headers = array(), $jobID = NULL, $userID = NULL) {
if ($jobID) {
$sql = "
SELECT scheduled_id FROM civicrm_mailing m
}
/**
- * Function to build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- *
* @access public
*
* @return void
CRM_Core_Session::setStatus(ts('Your update(s) have been saved.'), ts('Saved'), 'success');
}
- //end of function
}
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
class CRM_UF_Form_AdvanceSetting extends CRM_UF_Form_Group {
/**
- * Function to build the form for Advance Settings.
+ * Build the form object for Advance Settings.
*
* @access public
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
*/
protected $_hasSearchableORInSelector;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
}
- // CRM_Core_Error::debug(array($sel1, $sel2, $sel3, $sel4));
$sel->setOptions(array($sel1, $sel2, $sel3, $sel4));
// proper interpretation of spec in CRM-8732
protected $_allPanes;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form. Note that in edit/view mode
+ * Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
* @access public
/**
* Preview custom field
*
- * @param $fieldId
- * @param $groupId
- *
- * @internal param int $id custom field id
+ * @param int $fieldId custom field id
+ * @param int $groupId
*
* @return void
* @access public
* @param array $entityTypes strings, e.g. "IndividualModel", "ActivityModel"
*/
static function registerSchemas($entityTypes) {
- /* CRM_Core_Error::backtrace(); */
- /* CRM_Core_Error::debug( '$entityTypes', $entityTypes ); */
// TODO in cases where registerSchemas is called multiple times for same entity, be more efficient
CRM_Core_Resources::singleton()->addSettingsFactory(function () use ($entityTypes) {
return array(
* @param $rev string, the target (intermediate) revision e.g '3.2.alpha1'
*
* @return bool
- * @internal param string $currentVer , the original revision
- * @internal param string $latestVer , the target (final) revision
- * @internal param string $postUpgradeMessageFile , path of a modifiable file which lists the post-upgrade messages
*/
static function doIncrementalUpgradeStart(CRM_Queue_TaskContext $ctx, $rev) {
$upgrade = new CRM_Upgrade_Form();
* @param $rev string, a version number, e.g. '4.4.alpha1', '4.4.beta3', '4.4.0'
* @param null $currentVer
*
- * @internal param string $postUpgradeMessage , alterable
* @return void
*/
function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL) {
/**
* (Queue Task Callback)
*
- * Function to update the line items
+ * update the line items
*
*
* @param CRM_Queue_TaskContext $ctx
* @param $rev string, a version number, e.g. '4.4.alpha1', '4.4.beta3', '4.4.0'
* @param null $currentVer
*
- * @internal param string $postUpgradeMessage , alterable
* @return void
*/
function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL) {
}
/**
- * @param $params
+ * @param array $params
*/
static function retrieveDirectoryAndURLPaths(&$params) {
* @param $rev string, a version number, e.g. '4.4.alpha1', '4.4.beta3', '4.4.0'
* @param null $currentVer
*
- * @internal param string $postUpgradeMessage , alterable
* @return void
*/
function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL) {
* @param $rev string, a version number, e.g. '4.3.alpha1', '4.3.beta3', '4.3.0'
* @param null $currentVer
*
- * @internal param string $postUpgradeMessage , alterable
* @return void|bool
*/
function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL) {
* @param $rev string, a version number, e.g. '4.2.alpha1', '4.2.beta3', '4.2.0'
* @param null $currentVer
*
- * @internal param string $postUpgradeMessage , alterable
* @return void
*/
function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL) {
/**
*
- * Function to create price sets
+ * create price sets
*/
static function createPriceSet($daoName, $addTo, $options = array()) {
$query = "SELECT title FROM {$addTo[0]} where id =%1";
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @internal param array $ids the array that holds all the db ids
- *
- * @return object CRM_Upgrade_Snapshot_V4p2_Price_BAO_Field object
+ * @return CRM_Upgrade_Snapshot_V4p2_Price_BAO_Field object
* @access public
* @static
*/
*
* @param array $params (reference) an assoc array of name/value pairs
*
- * @return object CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field object
+ * @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field object
* @access public
* @static
*/
}
/**
- * 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
*
- * @return object CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field object
+ * @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field object
* @access public
* @static
*/
/**
* This function for building custom fields
*
- * @param object $qf form object (reference)
+ * @param CRM_Core_Form $qf form object (reference)
* @param string $elementName name of the custom field
* @param $fieldId
* @param boolean $inactiveNeeded
* @param boolean $useRequired true if required else false
* @param string $label label for custom field
- *
* @param null $fieldOptions
- * @param array $feezeOptions
+ * @param array $freezeOptions
*
* @return null
- * @internal param bool $search true if used for search else false
* @access public
* @static
*/
$useRequired = TRUE,
$label = NULL,
$fieldOptions = NULL,
- $feezeOptions = array()
+ $freezeOptions = array()
) {
$field = new CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field();
);
// CRM-6902
- if (in_array($optionKey, $feezeOptions)) {
+ if (in_array($optionKey, $freezeOptions)) {
$element->freeze();
}
$choice[$opId] = $qf->createElement('radio', NULL, '', $opt['label'], $opt['id'], $extra);
// CRM-6902
- if (in_array($opId, $feezeOptions)) {
+ if (in_array($opId, $freezeOptions)) {
$choice[$opId]->freeze();
}
}
}
$selectOption[$opt['id']] = $opt['label'];
- if (!in_array($opt['id'], $feezeOptions)) {
+ if (!in_array($opt['id'], $freezeOptions)) {
$allowedOptions[] = $opt['id'];
}
}
// CRM-6902
$button = substr($qf->controller->getButtonName(), -4);
- if (!empty($feezeOptions) && $button != 'skip') {
+ if (!empty($freezeOptions) && $button != 'skip') {
$qf->addRule($elementName, ts('Sorry, this option is currently sold out.'), 'regex', "/" . implode('|', $allowedOptions) . "/");
}
break;
);
// CRM-6902
- if (in_array($opId, $feezeOptions)) {
+ if (in_array($opId, $freezeOptions)) {
$check[$opId]->freeze();
}
}
*
* @param $ids
*
- * @return object CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue object
+ * @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue object
* @access public
* @static
*/
*
* @param $ids
*
- * @return object CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue object
+ * @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue object
* @access public
* @static
*/
* @param array $params (reference ) an assoc array
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
- * @return object CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue object
+ * @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue object
* @access public
* @static
*/
*
* @param array $params (reference) an assoc array of name/value pairs
*
- * @return object CRM_Upgrade_Snapshot_V4p2_Price_DAO_LineItem object
+ * @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_LineItem object
* @access public
* @static
*/
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
- * @return object CRM_Upgrade_Snapshot_V4p2_Price_BAO_LineItem object
+ * @return CRM_Upgrade_Snapshot_V4p2_Price_BAO_LineItem object
* @access public
* @static
*/
*
* @param array $params (reference) an assoc array of name/value pairs
*
- * @return object CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set object
+ * @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set object
* @access public
* @static
*/
}
/**
- * 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
*
- * @return object CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set object
+ * @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set object
* @access public
* @static
*/
/**
* update the is_active flag in the db
*
- * @param int $id id of the database record
- * @param $isActive
- *
- * @internal param bool $is_active value we want to set the is_active field
+ * @param int $id id of the database record
+ * @param bool $isActive value we want to set the is_active field
*
* @return Object DAO object on sucess, null otherwise
* @static
*
* An array containing price set details (including price fields) is returned
*
- * @param $setID
+ * @param int $setID price set id whose details are needed
* @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
*/
public static function getSetDetail($setID, $required = TRUE, $validOnly = FALSE) {
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
* @param $id
* @param string $entityTable
* @param bool $validOnly
/**
* @param $fields
- * @param $params
+ * @param array $params
* @param $lineItem
*/
static function processAmount(&$fields, &$params, &$lineItem) {
}
/**
- * Function to build the price set form.
+ * build the price set form.
*
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return void
* @access public
}
/**
- * Function to check the current Membership
+ * check the current Membership
* having end date null.
*/
static function checkCurrentMembership(&$options, $userid) {
}
/**
- * Function to set daefult the price set fields.
+ * set daefult the price set fields.
*
- * @param $form
+ * @param CRM_Core_Form $form
* @param $defaults
*
* @return array $defaults
/**
* Create APIv3 "get" parameters to lookup an existing record using $keys
*
- * @param $origParams
+ * @param array $origParams api request
* @param array $keys list of keys to match against
*
- * @internal param array $apiRequest
* @return array APIv3 $params
*/
function createGetParams($origParams, $keys) {
var $returnError = 0;
/**
- * @param $params
+ * @param array $params
*/
public function __construct($params) {
* %P - uppercase ante/post meridiem ('AM', 'PM')
* %Y - year as a decimal number including the century ('2005')
*
- * @param string $dateString
+ * @param string $dateString date and time in 'YYYY-MM-DD hh:mm:ss' format
* @param string $format the output format
* @param array $dateParts an array with the desired date parts
*
- * @internal param string $date date and time in 'YYYY-MM-DD hh:mm:ss' format
* @return string the $format-formatted $date
- *
* @static
*/
static function customFormat($dateString, $format = NULL, $dateParts = NULL) {
}
/**
- * Function to get customized today
+ * get customized today
*
* This function is used for getting customized today. To get
* actuall today pass 'dayParams' as null. or else pass the day,
}
/**
- * Function to find whether today's date lies in
+ * find whether today's date lies in
* the given range
*
* @param date $startDate start date for the range
}
/**
- * Function to get start date and end from
+ * get start date and end from
* the given relative term and unit
*
* @param date $relative eg: term.unit
}
/**
- * Function to check duplicate contacts based on de-deupe parameters
+ * check duplicate contacts based on de-deupe parameters
*/
function _civicrm_api3_deprecated_check_contact_dedupe($params) {
static $cIndieFields = NULL;
/**
* @deprecated - this is part of the import parser not the API & needs to be moved on out
*
- * @param $params
+ * @param array $params
* @param $onDuplicate
*
- * @internal param $ <type> $params
- * @internal param $ <type> $onDuplicate
- *
* @return array|bool <type>
*/
function _civicrm_api3_deprecated_create_participant_formatted($params, $onDuplicate) {
}
/**
- * @param $params
+ * @param array $params
* @param bool $dupeCheck
* @param bool $dupeErrorArray
* @param bool $requiredCheck
* @param $result
* @param $activityTypeID
*
- * @internal param $ <type> $result
- * @internal param $ <type> $activityTypeID
- *
* @return array <type> $params
*/
function _civicrm_api3_deprecated_activity_buildmailparams($result, $activityTypeID) {
* delete a directory given a path name, delete children directories
* and files if needed
*
- * @param $target
+ * @param string $target the path name
* @param bool $rmdir
* @param bool $verbose
*
* @throws Exception
- * @internal param string $path the path name
- *
* @return void
* @access public
* @static
* address. Note that at a later stage, we could make this function also clean up
* the address into a more valid format
*
- * @param $values
+ * @param array $values
* @param bool $stateName
*
- * @internal param object $address
- *
* @return boolean true if we modified the address, false otherwise
* @static
*/
* This hook is invoked during the CiviCRM form preProcess phase.
*
* @param string $formName the name of the form
- * @param object $form reference to the form object
+ * @param CRM_Core_Form $form reference to the form object
*
* @return null the return value is ignored
*/
* be used to set the default values of a form element
*
* @param string $formName the name of the form
- * @param object $form reference to the form object
+ * @param CRM_Core_Form $form reference to the form object
*
* @return null the return value is ignored
*/
* any form elements, this hook should save the values in the database
*
* @param string $formName the name of the form
- * @param object $form reference to the form object
+ * @param CRM_Core_Form $form reference to the form object
*
* @return null the return value is ignored
*/
* This hook is called when building the amount structure for a Contribution or Event Page
*
* @param int $pageType - is this a contribution or event page
- * @param object $form - reference to the form object
+ * @param CRM_Core_Form $form - reference to the form object
* @param array $amount - the amount structure to be displayed
*
* @return null
* @param string $entity the API entity (like contact)
* @param string $action the API action (like get)
* @param array &$params the API parameters
- * @param $permissions
+ * @param array &$permissions the associative permissions array (probably to be altered by this hook)
*
* @return mixed
- * @internal param array $permisisons the associative permissions array (probably to be altered by this hook)
*/
static function alterAPIPermissions($entity, $action, &$params, &$permissions) {
return self::singleton()->invoke(4, $entity, $action, $params, $permissions,
}
/**
- * @param $dao
+ * @param CRM_Core_DAO $dao
*
* @return mixed
*/
private $drupalModules = NULL;
/**
- *
* @see CRM_Utils_Hook::invoke()
*
* @param integer $numParams Number of parameters to pass to the hook
* Send an HTTP POST for a remote resource
*
* @param string $remoteFile URL of a .zip file
- * @param $params
+ * @param array $params
*
- * @internal param string $localFile path at which to store the .zip file
* @return array array(0 => STATUS_OK|STATUS_DL_ERROR, 1 => string)
*/
public function post($remoteFile, $params) {
}
/**
- *
* Send the ICalendar to the browser with the specified content type
* - 'text/calendar' : used for downloaded ics file
* - 'text/plain' : used for iCal formatted feed
* @access public
*
* @param string $calendar The calendar data to be published.
- *
* @param string $content_type
- *
- * @param string $charset The character set to use, defaults to
- * 'us-ascii'.
- *
- * @param null $fileName
+ * @param string $charset The character set to use, defaults to 'us-ascii'.
+ * @param string $fileName The file name (for downloads)
* @param string $disposition How the file should be sent ('attachment' for downloads)
*
- * @internal param string $filename The file name (for downloads)
- *
* @return void
*/
static function send($calendar, $content_type = 'text/calendar', $charset = 'us-ascii', $fileName = NULL, $disposition = NULL) {
}
/**
- * Function to create JSON object
+ * create JSON object
* @deprecated
*
* @param array $params associated array, that needs to be
}
/**
- * Function to encode json format for flexigrid, NOTE: "id" should be present in $params for each row
+ * encode json format for flexigrid, NOTE: "id" should be present in $params for each row
*
* @param array $params associated array of values rows
* @param int $page page no for selector
}
/**
- *
* @param string $fileName
* @param string $html
* @param string $format
/**
* @param $civiMail
- * @param $dao
+ * @param CRM_Core_DAO $dao
*
* @throws Exception
*/
/**
* @param $address
- * @param $params
+ * @param array $params
* @param $subParam
* @param $mail
*/
/**
* @param $addresses
* @param $token
- * @param $params
+ * @param array $params
* @param $mail
*/
public static function parseAddresses(&$addresses, $token, &$params, &$mail) {
/**
* @param $groupName
- * @param $daoName
+ * @param string $daoName
* @param null $sql
*/
function fetch($groupName, $daoName, $sql = NULL) {
* @param string $tagName
* @param array $keyValues
* @throws Exception
- * @internal param string $additional XML
* @return string XML
*/
public function renderKeyValueXML($tagName, $keyValues) {
protected $_sitePrefix = 'Site 1';
/**
- * @param $params
+ * @param array $params
*/
function __construct(&$params) {
foreach ($params as $name => $value) {
}
/**
- * @param $daoName
+ * @param string $daoName
* @param bool $onlyKeys
*
* @return array
}
/**
- * @param $dao
+ * @param CRM_Core_DAO $dao
* @param $xml
* @param bool $save
* @param null $keyName
/**
* @param $chunk
- * @param $daoName
+ * @param string $daoName
* @param null $lookUpMapping
* @param null $dateFields
*/
}
/**
- * @param $params
+ * @param array $params
* @param $chart
*
* @return array
}
/*
- * Function to initialize label format settings
+ * initialize label format settings
*/
/**
* @param $format
}
/*
- * function to Generate the pdf of one label (can be modified using SetGenerator)
+ * Generate the pdf of one label (can be modified using SetGenerator)
*/
/**
* @param $text
}
/*
- * function to Print a label
+ * Print a label
*/
/**
* @param $texte
}
/*
- * function to convert value from one metric to another
+ * convert value from one metric to another
*/
/**
* @param $value
'embedding encoding=winansi'
);
- /**
- if ( $res == 0 ) {
- CRM_Core_Error::debug( "$key, $value: $res", $pdf->get_errmsg( ) );
- } else {
- CRM_Core_Error::debug( "SUCCESS: $key, $value", null );
- }
- **/
}
$pdf->end_page_ext('');
* We have embedded some html in this class. Need to figure out how to export this
* to the top level at some point in time
*
- * @param $params
+ * @param array $params
*
* @internal param \total $int the total count of items to be displayed
* @internal param \currentPage $int the page currently being displayed
*
* @param int $defaultPageId defaultPageId current pageId
*
- * @param $params
+ * @param array $params
*
* @return int new pageId to display to the user
* @access public
}
/**
- * Function to return the all the static characters
+ * return the all the static characters
*
* @return array $staticAlphabets is a array of static characters
* @access private
}
/**
- * Function to return the all the dynamic characters
+ * return the all the dynamic characters
*
* @param $query
* @param $isDAO
* If there's a full, preloaded map, use it. Otherwise, use search
* class space.
*
- * @param $constant
+ * @param string $constant constant-name
*
- * @internal param string $name constant-name
* @return string|NULL class-name
*/
public static function findConstantClass($constant) {
// Generates values needed for non-error responses.
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
/**
* @param $args
- * @param $params
+ * @param array $params
*
* @return array|int
*/
/**
* @param $value
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return mixed
*/
* @param string $title the title to display
* @param string $url the link for the above title
* @param string $id object id
- *
* @param $type
* @param $contactId
* @param $contactName
* @param array $others
*
- * @internal param string $icon a link to a graphical image
* @return void
* @access public
* @static
* This is a replacement for $_REQUEST which includes $_GET/$_POST
* but excludes $_COOKIE / $_ENV / $_SERVER.
*
- * @internal param string $method
* @return array
*/
static function exportValues() {
/**
* @param $key
- * @param $params
+ * @param array $params
*
* @return array|int
* @throws SoapFault
}
/**
- * Function to extract variable values
+ * extract variable values
*
* @param mix $query this is basically url
*
/**
* @param $string
- * @param $params
+ * @param array $params
*/
static function extractName($string, &$params) {
$name = trim($string);
* @param bool $throwError
* @param $realPath
*/
- static function loadBootStrap($params = array(
- ), $loadUser = TRUE, $throwError = TRUE, $realPath = NULL) {
+ static function loadBootStrap($params = array(), $loadUser = TRUE, $throwError = TRUE, $realPath = NULL) {
if (!is_array($params)) {
$params = array();
}
* @param string $url
* @param bool $removeLanguagePart
*
- * @internal param bool $remoteLanguagePart
* @return string
*/
static function absoluteURL($url, $removeLanguagePart = FALSE) {
}
/**
- * Function to clean url, replaces first '&' with '?'
+ * clean url, replaces first '&' with '?'
*
* @param string $url
*
* each element.
* @access public
*/
- static function getPluginList($relpath, $fext = '.php', $skipList = array(
- )) {
- $fext_len = strlen($fext);
- $plugins = array();
+ static function getPluginList($relpath, $fext = '.php', $skipList = array()) {
+ $fext_len = strlen($fext);
+ $plugins = array();
$inc_files = CRM_Utils_System::listIncludeFiles($relpath);
foreach ($inc_files as $inc_file) {
if (substr($inc_file, 0 - $fext_len) == $fext) {
class CRM_Utils_System_Drupal extends CRM_Utils_System_DrupalBase {
/**
- * Function to create a user in Drupal.
+ * create a user in Drupal.
*
* @param array $params associated array
* @param string $mail email id for cms user
* if we want to submit this form more than once in a process (e.g. create more than one user)
* we must force it to validate each time for this form. Otherwise it will not validate
* subsequent submissions and the manner in which the password is passed in will be invalid
- * */
+ */
$form_state['must_validate'] = TRUE;
$config = CRM_Core_Config::singleton();
/**
* Check if username and email exists in the drupal db
*
- * @params $params array array of name and mail values
- * @params $errors array array of errors
- * @params $emailName string field label for the 'email'
- *
- * @param $params
- * @param $errors
- * @param string $emailName
+ * @param array $params array of name and mail values
+ * @param array $errors array of errors
+ * @param string $emailName field label for the 'email'
*
* @return void
*/
}
/*
- * Function to get the drupal destination string. When this is passed in the
+ * Get the drupal destination string. When this is passed in the
* URL the user will be directed to it after filling in the drupal form
*
- * @param object $form Form object representing the 'current' form - to which the user will be returned
+ * @param CRM_Core_Form $form Form object representing the 'current' form - to which the user will be returned
* @return string $destination destination value for URL
*
*/
/**
- * @param $form
+ * @param CRM_Core_Form $form
*
* @return null|string
*/
/**
* Append an additional breadcrumb tag to the existing breadcrumb
*
- * @param $breadCrumbs
- *
+ * @param array $breadCrumbs
* @internal param string $title
* @internal param string $url
*
}
/**
- * Function to create a user in Drupal.
+ * create a user in Drupal.
*
* @param array $params associated array
* @param string $mail email id for cms user
/**
* Check if username and email exists in the drupal db
*
- * @params $params array array of name and mail values
- * @params $errors array array of errors
- * @params $emailName string field label for the 'email'
- *
- * @param $params
- * @param $errors
- * @param string $emailName
+ * @param array $params array of name and mail values
+ * @param array $errors array of errors
+ * @param string $emailName field label for the 'email'
*
* @return void
*/
}
/**
- * Function to get the drupal destination string. When this is passed in the
+ * get the drupal destination string. When this is passed in the
* URL the user will be directed to it after filling in the drupal form
*
- * @param object $form Form object representing the 'current' form - to which the user will be returned
+ * @param CRM_Core_Form $form Form object representing the 'current' form - to which the user will be returned
* @return string $destination destination value for URL
*
*/
class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase {
/**
- * Function to create a user in Drupal.
+ * create a user in Drupal.
*
* @param array $params associated array
* @param string $mail email id for cms user
}
/**
- * Function to get the drupal destination string. When this is passed in the
+ * get the drupal destination string. When this is passed in the
* URL the user will be directed to it after filling in the drupal form
*
- * @param object $form Form object representing the 'current' form - to which the user will be returned
+ * @param CRM_Core_Form $form Form object representing the 'current' form - to which the user will be returned
* @return string $destination destination value for URL
*
*/
}
/**
- * Function to create a user of Joomla.
+ * create a user of Joomla.
*
* @param array $params associated array
* @param string $mail email id for cms user
}
/**
- * Check if username and email exists in the Joomla! db
+ * Check if username and email exists in the drupal db
*
- * @params $params array array of name and mail values
- * @params $errors array array of errors
- * @params $emailName string field label for the 'email'
- *
- * @param $params
- * @param $errors
- * @param string $emailName
+ * @param array $params array of name and mail values
+ * @param array $errors array of errors
+ * @param string $emailName field label for the 'email'
*
* @return void
*/
}
/**
- * Function to set the email address of the user
+ * set the email address of the user
*
* @param object $user handle to the user object
*
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
public function getLoginDestination(&$form) {
$args = NULL;
}
/**
- * Function to set the email address of the user
+ * set the email address of the user
*
* @param object $user handle to the user object
*
}
/**
- * @param $params
+ * @param array $params
* @param $mail
*
* @return mixed
}
/**
- * @param $params
+ * @param array $params
* @param $errors
* @param string $emailName
*/
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
public function getLoginDestination(&$form) {
return;
/**
* get< the regex for token replacement
*
- * @param $token_type
- *
- * @internal param string $key a string indicating the the type of token to be used in the expression
+ * @param string $token_type a string indicating the the type of token to be used in the expression
*
* @return string regular expression sutiable for using in preg_replace
* @access private
* @param null $className
* @param int $jobID the mailing list jobID - this is a legacy param
*
- * @internal param array $contactIds of contacts
* @return array
* @access public
* @static
* gives required details of contribuion in an indexed array format so we
* can iterate in a nice loop and do token evaluation
*
- * @param $contributionIDs
- * @param array $returnProperties of required properties
- * @param array $extraParams extra params
- * @param array $tokens the list of tokens we've extracted from the content
- *
- * @param null $className
+ * @param array $contributionIDs
+ * @param array $returnProperties of required properties
+ * @param array $extraParams extra params
+ * @param array $tokens the list of tokens we've extracted from the content
+ * @param string $className
*
- * @internal param array $contributionId one contribution id
- * @internal param bool $skipOnHold don't return on_hold contact info.
- * @internal param bool $skipDeceased don't return deceased contact info.
* @return array
* @access public
* @static
*
* @param $nodeName
*
- * @internal param string $root
+ * @internal param string $rootNode
*
* @return CRM_Utils_Tree
* @access public
}
/**
- * Function to check if node is a leaf node.
+ * check if node is a leaf node.
* Currently leaf nodes are strings and non-leaf nodes are arrays
*
* @param array(
static $SIGNABLE_FIELDS = array('reset', 'dao', 'idName', 'url', 'filter'); // 'id','src','dst','dir'
/**
- * Function to correct duplicate weight entries by putting them (duplicate weights) in sequence.
+ * correct duplicate weight entries by putting them (duplicate weights) in sequence.
*
* @param string $daoName full name of the DAO
* @param array $fieldValues field => value to be used in the WHERE
*
* @param null $groupBy
*
- * @return Object CRM_Core_DAO objet that holds the results of the query
+ * @return CRM_Core_DAO objet that holds the results of the query
*/
static function &query($queryType,
$daoName,
/**
* @param $rows
- * @param $daoName
+ * @param string $daoName
* @param $idName
* @param $returnURL
* @param null $filter
/**
* Convert an XML element to an array
*
- * @pararm $obj SimpleXMLElement
- * @param $obj
+ * @param $obj SimpleXMLElement
*
* @return array
*/
}
/**
- *
* @param string $msg
* @param array $data
* @param array $apiRequest
private $frames = array();
/**
- *
* @var int
*/
private $savePointCount = 0;
}
/**
- * Function to call getfields from api wrapper. This function ensures that settings that could alter
+ * call getfields from api wrapper. This function ensures that settings that could alter
* getfields output (e.g. action for all api & profile_id for profile api ) are consistently passed in.
*
* We check whether the api call is 'getfields' because if getfields is being called we return an empty array
*
* @param $result
*
- * @internal param array $params (reference ) input parameters
- *
* @return boolean true if error, false otherwise
* @static void
* @access public
}
/**
- *
+ * @return string
*/
public function __toString() {
return json_encode($this->lastResult);
}
/**
- *
+ * Perform action
*/
public function __call($action, $params) {
// @TODO Check if it's a valid action.
}
/**
- *
+ * Call via rest
+ * @return stdClass
*/
function remoteCall($entity, $action, $params = array()) {
$fields = "key={$this->key}&api_key={$this->api_key}";
/**
* Return the last error message.
+ * @return string
*/
function errorMsg() {
return $this->lastResult->error_message;
}
/**
- *
+ * Initialize
*/
function init() {
CRM_Core_DAO::init($this->cfg->dsn);
}
/**
- *
+ * @return $this
*/
public function attr($name, $value = NULL) {
if ($value === NULL) {
}
/**
- *
+ * @return bool
*/
public function is_error() {
return (property_exists($this->lastResult, 'is_error') && $this->lastResult->is_error);
}
/**
- *
+ * @param $name
+ * @return bool
*/
public function is_set($name) {
return (isset($this->lastResult->$name));
}
/**
- *
+ * @return $this
*/
public function __get($name) {
// @TODO Test if valid entity.
/**
* Or use $api->value.
+ * @return array
*/
public function values() {
if (is_array($this->lastResult)) {
/**
* Or use $api->result.
+ * @return array
*/
public function result() {
return $this->lastResult;
* {@getfields acl_create}
* @example aclCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of newly created acl property values.
* @access public
* {@getfields acl_get}
* @example aclCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of retrieved acl property values.
* @access public
* {@getfields acl_delete}
* @example aclCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of deleted values.
* @access public
* {@getfields acl_role_create}
* @example acl_roleCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of newly created acl_role property values.
* @access public
* {@getfields acl_role_get}
* @example acl_roleCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of retrieved acl_role property values.
* @access public
* {@getfields acl_role_delete}
* @example acl_roleCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of deleted values.
* @access public
}
/**
- * Function to check for required params
+ * Check for required params
*
* @param array $params associated array of fields
*
* @throws API_Exception
* @throws Exception
- * @internal param bool $addMode true for add mode
- *
* @return array $error array with errors
*/
function _civicrm_api3_activity_check_params(&$params) {
*
* @example ActivityContact.php
*
- * @param $params
+ * @param array $params
*
* @return array of newly created activity contact records.
* @access public
}
/**
- * Function to retrieve activity types
+ * retrieve activity types
*
- * @param $params
+ * @param array $params
*
* @return array $activityTypes activity types keyed by id
* @access public
}
/**
- * Function to create activity type (
+ * create activity type (
*
* @param array $params associated array of fields
* $params['option_value_id'] is required for updation of activity type
}
/**
- * Function to delete activity type
+ * delete activity type
*
* @param array $params array including id of activity_type to delete
* {@getfields address_create}
* {@example AddressCreate.php}
*
- * @param $params
+ * @param array $params
*
* @return array of newly created tag property values.
* @access public
}
/**
- * create array for BAO (expects address params in as an
- * element in array 'address'
- */
+ * Create array for BAO (expects address params in as an
+ * element in array 'address'
+ */
$addressBAO = CRM_Core_BAO_Address::add($params, TRUE);
if (empty($addressBAO)) {
return civicrm_api3_create_error("Address is not created or updated ");
* {@getfields batch_create}
* @example BatchCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of newly created batch property values.
* @access public
* {@getfields batch_get}
* @example BatchCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of retrieved batch property values.
* @access public
* {@getfields batch_delete}
* @example BatchCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of deleted values.
* @access public
*
* @param $options
*
- * @internal param $params
- *
- * @internal param $options
- *
- * @return array (reference) case object
+ * @return array case object
*/
function _civicrm_api3_case_read($caseId, $options) {
$return = CRM_Utils_Array::value('return', $options, array());
*/
/**
- * Function to create or update case type
+ * create or update case type
*
* @param array $params input parameters
*
}
/**
- * Function to retrieve case types
+ * retrieve case types
*
- * @param $params
+ * @param array $params
*
* @return array $caseTypes case types keyed by id
* @access public
}
/**
- * Function to format definition
+ * format definition
*
* @param $caseTypes
* @return mixed
}
/**
- * @param $params
+ * @param array $params
*/
function _civicrm_api3_constant_get_spec(&$params) {
$options = array(
}
/**
- * @param $params
+ * @param array $params
*
* @return int
*/
/**
- * @param $params
+ * @param array $params
* @param bool $dupeCheck
* @param bool $dupeErrorArray
* @param bool $obsoletevalue
* @param array $params (reference ) an assoc array of name/value pairs
* @param int $contactID if present the contact with that ID is updated
*
- * @return object CRM_Contact_BAO_Contact object
+ * @return CRM_Contact_BAO_Contact object
* @access public
* @static
*/
}
/**
- * @param $params
+ * @param array $params
*/
function _civicrm_api3_contact_proximity_spec(&$params) {
$params['latitude']['api.required'] = 1;
}
/**
- * @param $params
+ * @param array $params
*
* @return array
* @throws Exception
*
* @param array $params (reference ) input parameters
*
- * @internal param array $returnProperties Which properties should be included in the
- * returned Contribution object. If NULL, the default
- * set of properties will be included.
- *
- * @return array (reference ) array of contributions, if error an array with an error id and error message
+ * @return array of contributions, if error an array with an error id and error message
* @static void
* @access public
* {@getfields Contribution_get}
/**
* provide function metadata
- * @param $params
+ * @param array $params
*/
function _civicrm_api3_contribution_completetransaction_spec(&$params) {
$params['id'] = array(
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
-/*
- * Helper function to validate custom field values
- *
- * @params Array $params Custom fields with values
- * @params Array $errors Reference fields to be check with
- * @params Boolean $checkForDisallowed Check for disallowed elements
- * in params
- * @params Boolean $checkForRequired Check for non present required elements
- * in params
- * @return Array Validation errors
- */
-
/**
* Helper function to validate custom field value
+ * @deprecated
*
- * @params String $fieldName Custom field name (eg: custom_8 )
- * @params Mixed $value Field value to be validate
- * @params Array $fieldDetails Field Details
- * @params Array $errors Collect validation errors
- *
- * @param $fieldName
- * @param $value
- * @param $fieldDetails
- * @param array $errors
+ * @param String $fieldName Custom field name (eg: custom_8 )
+ * @param Mixed $value Field value to be validate
+ * @param Array $fieldDetails Field Details
+ * @param Array $errors Collect validation errors
*
- * @return Array Validation errors
+ * @return array Validation errors
* @todo remove this function - not in use but need to review functionality before
* removing as it might be useful in wrapper layer
*/
-function _civicrm_api3_custom_field_validate_field($fieldName, $value, $fieldDetails, &$errors = array(
- )) {
+function _civicrm_api3_custom_field_validate_field($fieldName, $value, $fieldDetails, &$errors = array()) {
return;
//see comment block
if (!$value) {
*
* FIXME This is a bare-minimum placeholder
*
- * @param $params
- *
- * @internal param $array $ params input parameters
+ * @param array $params
*
* {@example OptionValueGet.php 0}
* @example OptionValueGet.php
*
* {@example OptionValueCreate.php}
*
- * @param $params
+ * @param array $params
*
* @return array of newly created option_value property values.
* {@getfields OptionValue_create}
}
/**
- * @param $params
+ * @param array $params
*
* @return array|null
*/
*
* @example EmailCreate.php Standard Create Example
*
- * @param $params
+ * @param array $params
*
* @return array API result array
* {@getfields email_create}
$event[$eventDAO->id]['price_set_id'] = CRM_Price_BAO_PriceSet::getFor('civicrm_event', $eventDAO->id);
}
}
- //end of the loop
return civicrm_api3_create_success($event, $params, 'event', 'get', $eventDAO);
}
/*
/**
- * Function to add 'is_full' & 'available_seats' to the return array. (this might be better in the BAO)
+ * add 'is_full' & 'available_seats' to the return array. (this might be better in the BAO)
* Default BAO function returns a string if full rather than a Bool - which is more appropriate to a form
*
* @param array $event return array of the event
<?php
-
-define('API_V3_EXTENSION_DELIMITER', ',');
-
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.5 |
+--------------------------------------------------------------------+
*/
+define('API_V3_EXTENSION_DELIMITER', ',');
+
+
/**
* File for the CiviCRM APIv3 extension functions
*
/**
* Get a list of available extensions
*
- * @param $params
+ * @param array $params
*
* @return array API result
* @static void
* This API is used for deleting a file
* Required parameters : id of a file
*
- * @param $params
+ * @param array $params
*
* @return array API result array
* @access public
* {@getfields financial_account_create}
* @example financial_accountCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of newly created financial_account property values.
* @access public
* {@getfields financial_account_get}
* @example financial_accountCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of retrieved financial_account property values.
* @access public
* {@getfields financial_account_delete}
* @example financial_accountCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of deleted values.
* @access public
* {@getfields financial_type_create}
* @example financial_typeCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of newly created financial_type property values.
* @access public
* {@getfields financial_type_get}
* @example financial_typeCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of retrieved financial_type property values.
* @access public
* {@getfields financial_type_delete}
* @example financial_typeCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of deleted values.
* @access public
}
/**
- * @param $params
+ * @param array $params
*/
function _civicrm_api3_generic_getrefcount_spec(&$params) {
$params['id']['api.required'] = 1;
* Allowed @params array keys are:
* {@getfields im_create}
*
- * @param $params
+ * @param array $params
*
* @return array of newly created IM property values.
* @access public
}
/**
- * Function to create scheduled job
+ * create scheduled job
*
* @param array $params Associative array of property name/value pairs to insert in new job.
*
}
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
}
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
*
* @example LocationTypeCreate.php Standard Create Example
*
- * @param $params
+ * @param array $params
*
* @return array API result array
* {@getfields email_create}
* {@getfields mailing_component_create}
* @example mailing_componentCreate.php
*
- * @param $params
+ * @param array $params
*
* @throws API_Exception
* @return array of newly created mailing_component property values.
* {@getfields mailing_component_get}
* @example mailing_componentCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of retrieved mailing_component property values.
* @access public
* {@getfields mailing_component_delete}
* @example mailing_componentCreate.php
*
- * @param $params
+ * @param array $params
*
* @throws API_Exception
* @return array of deleted values.
}
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
* @param $membershipParams
*
* @throws API_Exception
- * @internal param Int $membershipID Id of a membership
- * @internal param String $statusDate
*
* @return Array Array of status id and status name
* @public
}
/**
- * @param $params
+ * @param array $params
*/
function _civicrm_api3_message_template_get_spec(&$params) {
}
*
* This API is used for deleting a note
*
- * @params array $paramsarray including id of the note to be deleted
+ * @param array $params including id of the note to be deleted
* {@getfields note_delete}
*
- * @param $params
- *
* @return null
* @access public
*/
<?php
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
/**
* Retrieve one or more OptionValues
*
- * @param $params
- *
- * @internal param $array $ params input parameters
+ * @param array $params
*
* {@example OptionValueGet.php 0}
* @example OptionValueGet.php
*
* {@example OptionValueCreate.php}
*
- * @param $params
+ * @param array $params
*
* @throws API_Exception
* @return array of newly created option_value property values.
*
* This API is used for deleting a Participant Payment
*
- * @param $params
- *
- * @internal param Int $participantPaymentID Id of the Participant Payment to be deleted
+ * @param array $params
*
* @return array API result
* @example ParticipantPaymentDelete.php
* Allowed @params array keys are:
* {@getfields payment_processor_create}
*
- * @param $params
+ * @param array $params
*
* @return array of newly created PaymentProcessor property values.
* @access public
*/
/**
- * Function to create payment_processor type
+ * create payment_processor type
*
* @param array $params Associative array of property name/value pairs to insert in new payment_processor type.
*
}
/**
- * Function to get all payment_processor type
+ * get all payment_processor type
* retruns An array of PaymentProcessor_type
* @access public
* {@getfields PaymentProcessorType_get}
* {@getfields phone_create}
* @example PhoneCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of newly created phone property values.
* @access public
}
/**
- * @param $params
+ * @param array $params
*/
function _civicrm_api3_pledge_delete_spec(&$params) {
// set as not required as pledge_id also acceptable & no either/or std yet
* convert it into the same format that we use in QF and BAO object
*
* @param array $values The reformatted properties that we can use internally
- * '
- *
* @param bool $create
*
- * @internal param array $params Associative array of property name/value
- * pairs to insert in new contact.
* @return array|CRM_Error
* @access public
*/
/**
* Gets field for civicrm_pledge_payment functions
*
- * @param $params
+ * @param array $params
*
* @return array fields valid for other functions
*/
* {@getfields premium_create}
* @example premiumCreate.php
*
- * @param $params
+ * @param array $params
*
* @throws API_Exception
* @return array of newly created premium property values.
* {@getfields premium_get}
* @example premiumCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of retrieved premium property values.
* @access public
* {@getfields premium_delete}
* @example premiumCreate.php
*
- * @param $params
+ * @param array $params
*
* @throws API_Exception
* @return array of deleted values.
* {@getfields print_label_create}
* @example print_labelCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of newly created print_label property values.
* @access public
* {@getfields print_label_get}
* @example print_labelCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of retrieved print_label property values.
* @access public
* {@getfields print_label_delete}
* @example print_labelCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of deleted values.
* @access public
* {@getfields product_create}
* @example productCreate.php
*
- * @param $params
+ * @param array $params
*
* @throws API_Exception
* @return array of newly created product property values.
* {@getfields product_get}
* @example productCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of retrieved product property values.
* @access public
* {@getfields product_delete}
* @example productCreate.php
*
- * @param $params
+ * @param array $params
*
* @throws API_Exception
* @return array of deleted values.
}
/**
- * @param $params
+ * @param array $params
*/
function _civicrm_api3_profile_get_spec(&$params) {
$params['profile_id']['api.required'] = TRUE;
* Note that that since the existing code for deriving a blank profile is not easily accessible our
* interim solution is just to return an empty array
*
- * @param $params
+ * @param array $params
*
* @return array
*/
* @param integer $optionsBehaviour 0 = don't resolve, 1 = resolve non-aggressively, 2 = resolve aggressively - ie include country & state
* @param $is_flush
*
- * @internal param $params
- *
* @return
*/
}
/**
- * Function to get the relationship
+ * get the relationship
*
* @param array $params input parameters.
* @todo Result is inconsistent depending on whether contact_id is passed in :
*/
/**
- * Function to create relationship type
+ * create relationship type
*
* @param array $params Associative array of property name/value pairs to insert in new relationship type.
*
}
/**
- * Function to get all relationship type
+ * get all relationship type
* retruns An array of Relationship_type
* @access public
* {@getfields RelationshipType_get}
/**
* Add or update a report instance.
*
- * @param $params
+ * @param array $params
*
* @return array of newly created report instance property values.
* @access public
*
* FIXME This is a bare-minimum placeholder
*
- * @param $params
- *
- * @internal param $array $ params input parameters
+ * @param array $params
*
* {@example OptionValueGet.php 0}
* @example OptionValueGet.php
*
* {@example OptionValueCreate.php}
*
- * @param $params
+ * @param array $params
*
* @return array of newly created option_value property values.
* {@getfields OptionValue_create}
}
/**
- * @param $params
+ * @param array $params
*
* @return array
* @throws API_Exception
}
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
* {@getfields sms_provider_create}
* @example sms_providerCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of newly created sms_provider property values.
* @access public
* {@getfields sms_provider_get}
* @example sms_providerCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of retrieved sms_provider property values.
* @access public
* {@getfields sms_provider_delete}
* @example sms_providerCreate.php
*
- * @param $params
+ * @param array $params
*
* @return array of deleted values.
* @access public
}
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
/**
* Metadata for log function
- * @param $params
+ * @param array $params
*/
function _civicrm_api3_system_log_spec(&$params) {
$params['level'] = array(
*/
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
* Create system log
* It's arguable whether this function should exist as it fits our crud pattern and adding it meets our SyntaxConformance test requirements
* but it just wraps system.log which is more consistent with the PSR3 implemented.
- * @param $params
+ * @param array $params
*
* @return array
*/
}
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
}
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
*
* {@example TagCreate.php}
*
- * @param $params
+ * @param array $params
*
* @return array of newly created tag property values.
* {@getfields tag_create}
* @param $params array Associative array of property name/value pairs to create new uf field.
*
* @throws API_Exception
- * @internal param int $groupId Valid uf_group id
*
- * @return Newly created $ufFieldArray array
+ * @return array Newly created $ufFieldArray
*
* @access public
* {@getfields UFField_create}
/**
* Gets field for civicrm_uf_field create
*
- * @param $params
+ * @param array $params
*
* @return array fields valid for other functions
*/
/**
* Delete uf field
*
- * @param $params
+ * @param array $params
*
* @throws API_Exception
- * @internal param int $fieldId Valid uf_field id that to be deleted
*
* @return true on successful delete or return error
*
/**
* Delete uf group
*
- * @param $params
+ * @param array $params
*
- * @internal param int $groupId Valid uf_group id that to be deleted
*
* @return true on successful delete or return error
- * @todo doesnt rtn success or error properly
* @access public
* {@getfields UFGroup_delete}
* @example UFGroupDelete.php
*/
function civicrm_api3_uf_group_delete($params) {
-
return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
* @example WebsiteCreate.php
* {@example WebsiteCreate.php}
*
- * @param $params
+ * @param array $params
*
* @return array of newly created website property values.
* @access public
}
/**
- * Function to check mandatory fields are included
+ * check mandatory fields are included
*
* @param array $params array of fields to check
* @param array $daoName string DAO to check for required fields (create functions only)
}
/**
- * Function to return the DAO of the function or Entity
+ * return the DAO of the function or Entity
* @param String $name either a function of the api (civicrm_{entity}_create or the entity name
* return the DAO name to manipulate this function
* eg. "civicrm_api3_contact_create" or "Contact" will return "CRM_Contact_BAO_Contact"
}
/**
- * Function to return the DAO of the function or Entity
+ * return the DAO of the function or Entity
* @param String $name is either a function of the api (civicrm_{entity}_create or the entity name
* return the DAO name to manipulate this function
* eg. "civicrm_contact_create" or "Contact" will return "CRM_Contact_BAO_Contact"
/**
* Converts an DAO object to an array
*
- * @param object $dao (reference )object to convert
- * @param null $params
+ * @param CRM_Core_DAO $dao object to convert
+ * @param array $params
* @param bool $uniqueFields
* @param string $entity
- *
* @param bool $autoFind
*
* @return array
*
- * @params array of arrays (key = id) of array of fields
- *
* @static void
* @access public
*/
* && it can take custom fields & there is the string 'custom' in their return request we get them all, they are filtered on the way out
* @todo filter so only required fields are queried
*
- * @param $params
+ * @param array $params
* @param string $entity - entity name in CamelCase
*
* @return bool
}
/**
- * @param $params
+ * @param array $params
* @param $entity
*/
function _civicrm_api3_format_params_for_create(&$params, $entity) {
*
* @param array $params Associative array of property name/value
* pairs to insert in new history.
- * @param $daoName
+ * @param string $daoName
* @param bool $return
*
* @daoName string DAO to check params agains
* if api::del doesn't exist it will try DAO delete method
*
* @param $bao_name
- * @param $params
+ * @param array $params
*
* @return array API result array
* @throws API_Exception
* @param $fieldType
*
* @throws Exception
- * @internal param $fieldInfo
- *
- * @internal param $params
* @return mixed
*/
function _civicrm_api3_getValidDate($dateValue, $fieldName, $fieldType) {
}
/**
- * @param $params
+ * @param array $params
*
* @return mixed
*/
class civicrm_cli_csv_importer extends civicrm_cli_csv_file {
/**
- * @param $params
+ * @param array $params
*/
function processline($params) {
$result = civicrm_api($this->_entity, 'Create', $params);
class civicrm_cli_csv_deleter extends civicrm_cli_csv_file {
/**
- * @param $params
+ * @param array $params
*/
function processline($params) {
$result = civicrm_api($this->_entity, 'Delete', $params);
*
* @param string $mode the mode of operation: live or test
* @param array $paymentProcessor the details of the payment processor being invoked
- * @param object $paymentForm reference to the form object if available
+ * @param CRM_Core_Form $paymentForm reference to the form object if available
* @param boolean $force should we force a reload of this payment object
*
* @return object
}
/**
- * Function to test getActivitiesCount BAO method
+ * test getActivitiesCount BAO method
*/
function testGetActivitiesCountforAdminDashboard() {
$op = new PHPUnit_Extensions_Database_Operation_Insert();
}
/**
- * Function to test getActivitiesCount BAO method
+ * test getActivitiesCount BAO method
*/
function testGetActivitiesCountforNonAdminDashboard() {
$op = new PHPUnit_Extensions_Database_Operation_Insert();
}
/**
- * Function to test getActivitiesCount BAO method
+ * test getActivitiesCount BAO method
*/
function testGetActivitiesCountforContactSummary() {
$op = new PHPUnit_Extensions_Database_Operation_Insert();
// }
/**
- * function to build common params
+ * build common params
*
*/
private function contactParams() {
$this->household = Contact::create($this->householdParams);
}
- /*
- * search with only type
- * success expected.
- */
+ /**
+ * search with only type
+ * success expected.
+ */
function testSearchWithType() {
- /*
- * for type:Individual
- */
-
- $defaults = array();
+ // for type:Individual
$params = array('contact_type' => 'Individual', 'version' => 3);
$result = civicrm_api('contact', 'get', $params);
$this->assertEquals($indiviParent['contact_type'], $this->indiviParentParams['contact_type'], 'In line ' . __LINE__);
$this->assertEquals(end($indiviParent['contact_sub_type']), $this->indiviParentParams['contact_sub_type'], 'In line ' . __LINE__);
- /*
- * for type:Organization
- */
-
+ // for type:Organization
$params = array('contact_type' => 'Organization', 'version' => 3);
$result = civicrm_api('contact', 'get', $params);
$this->assertEquals($orgSponsor['contact_type'], $this->orgSponsorParams['contact_type'], 'In line ' . __LINE__);
$this->assertEquals(end($orgSponsor['contact_sub_type']), $this->orgSponsorParams['contact_sub_type'], 'In line ' . __LINE__);
- /*
- * for type:Household
- */
-
+ // for type:Household
$params = array('contact_type' => 'Household', 'version' => 3);
$result = civicrm_api('contact', 'get', $params);
$this->assertNotContains('contact_sub_type', $household);
}
- /*
- * search with only subtype
- * success expected.
- */
+ /**
+ * search with only subtype
+ * success expected.
+ */
function testSearchWithSubype() {
- /*
- * for subtype:Student
- */
-
- $defaults = array();
+ // for subtype:Student
$params = array('contact_sub_type' => $this->student, 'version' => 3);
$result = civicrm_api('contact', 'get', $params);
$this->assertNotContains($this->orgSponsor, $result['values']);
$this->assertNotContains($this->household, $result['values']);
- /*
- * for subtype:Sponsor
- */
-
+ // for subtype:Sponsor
$params = array('contact_sub_type' => $this->sponsor, 'version' => 3);
$result = civicrm_api('contact', 'get', $params);
$this->assertNotContains($this->household, $result['values']);
}
- /*
- * search with type as well as subtype
- * success expected.
- */
+ /**
+ * search with type as well as subtype
+ * success expected.
+ */
function testSearchWithTypeSubype() {
- /*
- * for type:individual subtype:Student
- */
-
- $defaults = array();
+ // for type:individual subtype:Student
$params = array('contact_sub_type' => $this->student, 'version' => 3);
$result = civicrm_api('contact', 'get', $params);
$this->assertNotContains($this->orgSponsor, $result['values']);
$this->assertNotContains($this->household, $result['values']);
- /*
- * for type:Organization subtype:Sponsor
- */
-
+ // for type:Organization subtype:Sponsor
$params = array('contact_sub_type' => $this->sponsor, 'version' => 3);
$result = civicrm_api('contact', 'get', $params);
$this->assertNotContains($this->household, $result['values']);
}
- /*
- * search with invalid type or subtype
- */
+ /**
+ * search with invalid type or subtype
+ */
function testSearchWithInvalidData() {
-
// for invalid type
- $defaults = array();
$params = array('contact_type' => 'Invalid' . CRM_Core_DAO::VALUE_SEPARATOR . 'Invalid', 'version' => 3);
$result = civicrm_api('contact', 'get', $params);
$this->assertEquals(empty($result['values']), TRUE, 'In line ' . __LINE__);
$this->assertEquals(empty($result['values']), TRUE, 'In line ' . __LINE__);
}
- /* search with wrong type or subtype
- *
- */
+ /**
+ * search with wrong type or subtype
+ */
function testSearchWithWrongdData() {
// for type:Individual subtype:Sponsor
$this->subTypesHousehold[] = $params['name'];
}
- /*
- * test contactTypes() and subTypes() methods with valid data
- * success expected
- */
+ /**
+ * test contactTypes() and subTypes() methods with valid data
+ * success expected
+ */
function testGetMethods() {
// check all contact types
}
}
- /*
- * test subTypes() methods with invalid data
- */
+ /**
+ * test subTypes() methods with invalid data
+ */
function testGetMethodsInvalid() {
$params = 'invalid';
$this->assertEquals(empty($result), TRUE, 'In line ' . __LINE__);
}
- /*
- * test add() methods with valid data
- * success expected
- */
+ /**
+ * test add() methods with valid data
+ * success expected
+ */
function testAdd() {
$params = array(
CRM_Contact_BAO_ContactType::del($result->id);
}
- /*
- * test add() with invalid data
- */
+ /**
+ * test add() with invalid data
+ */
function testAddInvalid1() {
// parent id does not exist in db
$this->assertEquals($result, NULL, 'In line' . __LINE__);
}
- /*
- * test del() with valid data
- * success expected
- */
+ /**
+ * test del() with valid data
+ * success expected
+ */
function testDel() {
$params = array(
$this->assertEquals(in_array($subtype->name, $result), TRUE, 'In line ' . __LINE__);
}
- /*
- * test del() with invalid data
- */
+ /**
+ * test del() with invalid data
+ */
function testDelInvalid() {
$del = CRM_Contact_BAO_ContactType::del(NULL);
}
/**
- * @param $objects array(object) DAO or BAO objects
+ * @param $objects array DAO or BAO objects
*/
function registerTestObjects($objects) {
//if (is_object($objects)) {
}
/**
- * @param $objects array(object) DAO or BAO objects
+ * @param $objects array DAO or BAO objects
*/
function registerTestObjects($objects) {
//if (is_object($objects)) {
);
$getCustomFields = array();
$getCustomFields = CRM_Core_BAO_CustomField::getFields('Individual', TRUE, TRUE);
- //CRM_Core_Error::debug('fdf',$getCustomFields);
//$this->assertEquals( 'testFld1', $getCustomFields[$customFieldID1][0], 'Confirm First Custom field label' );
//$this->assertEquals( 'testFld2', $getCustomFields[$customFieldID2][0], 'Confirm Second Custom field label' );
}
/**
- * Function to test getTree()
+ * test getTree()
*/
function testGetTree() {
$params = array();
}
/**
- * Function to test retrieve() with Empty Params
+ * test retrieve() with Empty Params
*/
function testRetrieveEmptyParams() {
$params = array();
}
/**
- * Function to test retrieve() with Inalid Params
+ * test retrieve() with Inalid Params
*/
function testRetrieveInvalidParams() {
$params = array('id' => 99);
parent::setUp();
}
- /*
- * Test setValues() and GetValues() methods with custom Date field
- *
- */
+ /**
+ * Test setValues() and GetValues() methods with custom Date field
+ */
function testSetGetValuesDate() {
$params = array();
$contactID = Contact::createIndividual();
Contact::delete($contactID);
}
- /*
- * Test setValues() and getValues() methods with custom field YesNo(Boolean) Radio
- *
- */
+ /**
+ * Test setValues() and getValues() methods with custom field YesNo(Boolean) Radio
+ *
+ */
function testSetGetValuesYesNoRadio() {
$params = array();
$contactID = Contact::createIndividual();
}
- /*
- * function to test store function for country
- *
- */
+ /**
+ * test store function for country
+ *
+ */
function testStoreCountry() {
$params = array();
$contactID = Contact::createIndividual();
Contact::delete($contactID);
}
- /*
- * function to test store function for file
- *
- */
+ /**
+ * test store function for file
+ *
+ */
function atestStoreFile() {
$params = array();
$contactID = Contact::createIndividual();
Contact::delete($contactID);
}
- /*
- * function to test store function for state province
- *
- */
+ /**
+ * test store function for state province
+ *
+ */
function testStoreStateProvince() {
$params = array();
$contactID = Contact::createIndividual();
));
CRM_Core_BAO_CustomValueTable::store($params, 'civicrm_contact', $contactID);
- // $this->assertDBCompareValue('CRM_Custom_DAO_CustomValue', )
Custom::deleteField($customField);
Custom::deleteGroup($customGroup);
Contact::delete($contactID);
}
- /*
- * function to test store function for date
- *
- */
+ /**
+ * test store function for date
+ *
+ */
function testStoreDate() {
$params = array();
$contactID = Contact::createIndividual();
Contact::delete($contactID);
}
- /*
- * function to test store function for rich text editor
- *
- */
+ /**
+ * Test store function for rich text editor
+ *
+ */
function testStoreRichTextEditor() {
$params = array();
$contactID = Contact::createIndividual();
Contact::delete($contactID);
}
- /*
- * function to test getEntityValues function for stored value
- *
- */
+ /**
+ * test getEntityValues function for stored value
+ *
+ */
function testgetEntityValues() {
$params = array();
$this->assertContains('<p>Please print this confirmation for your records.</p>', $msg['html']);
$this->assertContains('Membership Type: General', $msg['body']);
}
- /*
- * Test that loadObjects works with participant values
- */
+
+ /**
+ * Test that loadObjects works with participant values
+ */
function testLoadParticipantObjects() {
$this->_setUpParticipantObjects();
$this->IPN->loadObjects($this->input, $this->ids, $this->objects, FALSE, $this->_processorId);
/**
* Test the LoadObjects function with a participant
- *
*/
function testComposeMailParticipant() {
$this->_setUpParticipantObjects();
}
/**
- *
*
*/
function testComposeMailParticipantObjects() {
/**
* Test the LoadObjects function with recurring membership data
- *
*/
function testsendMailParticipantObjectsCheckLog() {
$this->_setUpParticipantObjects();
);
$mut->stop();
}
+
/**
* Test the LoadObjects function with recurring membership data
- *
*/
function testsendMailParticipantObjectsNoMail() {
$this->_setUpParticipantObjects();
$mut->stop();
}
- /*
- * Test that loadObjects works with participant values
- */
+ /**
+ * Test that loadObjects works with participant values
+ */
function testLoadPledgeObjects() {
$this->_setUpPledgeObjects();
$this->IPN->loadObjects($this->input, $this->ids, $this->objects, FALSE, $this->_processorId);
$this->assertEquals($this->_pledgeId, $this->objects['pledge_payment'][0]->pledge_id);
}
- /*
- * Test that loadObjects works with participant values
- */
+ /**
+ * Test that loadObjects works with participant values
+ */
function testLoadPledgeObjectsInvalidPledgeID() {
$this->_setUpPledgeObjects();
$this->ids['pledge_payment'][0] = 0;
}
}
- /*
- * Prepare for contribution Test - involving only contribution objects
- */
/**
+ * Prepare for contribution Test - involving only contribution objects
+ *
* @param bool $contributionPage
*/
function _setUpContributionObjects($contributionPage = FALSE) {
);
}
- /*
- * Prepare for membership test
- */
+ /**
+ * Prepare for membership test
+ */
function _setUpMembershipObjects() {
try {
$this->_membershipTypeID = $this->membershipTypeCreate();
$this->ids['contributionRecur'] = $this->_recurId;
}
- /*
- * Set up participant requirements for test
- */
+ /**
+ * Set up participant requirements for test
+ */
function _setUpParticipantObjects() {
$event = $this->eventCreate(array('is_email_confirm' => 1));
$this->assertAPISuccess($event, 'line ' . __LINE__ . ' set-up of event');
$this->ids['event'] = $this->_eventId;
}
- /*
- * Set up participant requirements for test
- */
+ /**
+ * Set up participant requirements for test
+ */
function _setUpPledgeObjects() {
$this->_pledgeId = $this->pledgeCreate($this->_contactId);
//we'll create membership payment here because to make setup more re-usable
}
/**
- *
* @param string $createStyle 'sql-insert'|'bao-create'
* @param string $commitStyle 'implicit-commit'|'explicit-commit'
* @dataProvider dataCreateAndCommitStyles
}
/**
- *
* @param string $createStyle 'sql-insert'|'bao-create'
* @param string $commitStyle 'implicit-commit'|'explicit-commit'
* @dataProvider dataCreateAndCommitStyles
}
/**
- *
* @param array $existsByOffset array(int $cidOffset => bool $expectExists)
* @param int $generalOffset
*/
}
- /*
- * Function to get the contribution
- * page id from the membership record
- */
+ /**
+ * get the contribution
+ * page id from the membership record
+ */
function testgetContributionPageId() {
$contactId = Contact::createIndividual();
$this->membershipDelete($membershipId);
Contact::delete($contactId);
}
- /*
- * Function to get membership joins/renewals
- * for a specified membership
- * type.
- *
- */
+ /**
+ * Get membership joins/renewals
+ * for a specified membership
+ * type.
+ *
+ */
function testgetMembershipStarts() {
$contactId = Contact::createIndividual();
Contact::delete($contactId);
}
- /*
- * Function to get a count of membership for a specified membership type,
- * optionally for a specified date.
- *
- */
+ /**
+ * Get a count of membership for a specified membership type,
+ * optionally for a specified date.
+ *
+ */
function testGetMembershipCount() {
$contactId = Contact::createIndividual();
}
- /*
- * Function take sort name of contact during
- * batch update member via profile
- *
- */
+ /**
+ * Take sort name of contact during
+ * batch update member via profile
+ *
+ */
function testsortName() {
$contactId = Contact::createIndividual();
Contact::delete($contactId);
}
- /*
- * Function to delete related memberships
- *
- */
+ /**
+ * Delete related memberships
+ *
+ */
function testdeleteRelatedMemberships() {
$contactId = Contact::createIndividual();
Contact::delete($contactId);
}
- /*
- * Function to renew membership with change in membership type
- *
- */
+ /**
+ * Renew membership with change in membership type
+ *
+ */
function testRenewMembership() {
$contactId = Contact::createIndividual();
$joinDate = $startDate = date("Ymd", strtotime(date("Ymd") . " -6 month"));
Contact::delete($contactId);
}
- /*
- * Function to renew stale membership
- *
- */
+ /**
+ * Renew stale membership
+ *
+ */
function testStaleMembership() {
$statusId = 3;
$contactId = Contact::createIndividual();
}
/**
- * function to build params
+ * build params
*
*/
private function pcpBlockParams() {
}
/**
- * function to build params
+ * build params
*
*/
private function pcpParams() {
* @param $inputXmlFilePath
*
* @throws CRM_Core_Exception
- * @internal param $customGroupParams
- * @internal param $fieldParams
- * @internal param $expectedXmlFilePath
* @dataProvider basicXmlTestCases
*/
function testBasicXMLImports($expectCustomGroup, $expectCustomField, $inputXmlFilePath) {
* Class AuthorizeNet
*/
class AuthorizeNet extends PHPUnit_Framework_Testcase {
- /*
- * Helper function to create
- * a payment processor of type Authorize.net
- *
- * @return $paymentProcessor id of created payment processor
- */
/**
+ * Helper function to create
+ * a payment processor of type Authorize.net
* @return CRM_Financial_DAO_PaymentProcessor
*/
function create() {
return $paymentProcessor;
}
- /*
- * Helper function to delete a PayPal Pro
- * payment processor
- * @param int $id - id of the PayPal Pro payment processor
- * to be deleted
- * @return boolean true if payment processor deleted, false otherwise
- *
- */
/**
- * @param $id
+ * Helper function to delete a PayPal Pro
+ * payment processor
+ * @param int $id - id of the PayPal Pro payment processor
+ * to be deleted
+ * @return boolean true if payment processor deleted, false otherwise
*
- * @return mixed
*/
function delete($id) {
$paymentProcessor = new CRM_Financial_DAO_PaymentProcessor();
* Compare a single column value in a retrieved DB record to an expected value
*
* @param $testCase
- * @param $daoName
+ * @param string $daoName
* @param $searchValue
* @param $returnColumn
* @param $searchColumn
//$this->assertContains($sortName, $this->getValue('contact_1'), "autocomplete expected $sortName but didn’t find it in " . $this->getValue('contact_1'));
}
- /*
- * 1. By default, when no strtotime arg is specified, sets date to "now + 1 month"
- * 2. Does not set time. For setting both date and time use webtestFillDateTime() method.
- * 3. Examples of $strToTime arguments -
- * webtestFillDate('start_date',"now")
- * webtestFillDate('start_date',"10 September 2000")
- * webtestFillDate('start_date',"+1 day")
- * webtestFillDate('start_date',"+1 week")
- * webtestFillDate('start_date',"+1 week 2 days 4 hours 2 seconds")
- * webtestFillDate('start_date',"next Thursday")
- * webtestFillDate('start_date',"last Monday")
- */
/**
+ * 1. By default, when no strtotime arg is specified, sets date to "now + 1 month"
+ * 2. Does not set time. For setting both date and time use webtestFillDateTime() method.
+ * 3. Examples of $strToTime arguments -
+ * webtestFillDate('start_date',"now")
+ * webtestFillDate('start_date',"10 September 2000")
+ * webtestFillDate('start_date',"+1 day")
+ * webtestFillDate('start_date',"+1 week")
+ * webtestFillDate('start_date',"+1 week 2 days 4 hours 2 seconds")
+ * webtestFillDate('start_date',"next Thursday")
+ * webtestFillDate('start_date',"last Monday")
* @param $dateElement
* @param null $strToTimeArgs
*/
$this->click("link=$day");
}
- // 1. set both date and time.
/**
+ * 1. set both date and time.
* @param $dateElement
* @param null $strToTimeArgs
*/
}
/**
- * Function to update default strict rule.
+ * update default strict rule.
*
- * @params string $contactType Contact type
* @param string $contactType
- * @param array $fields Fields to be set for strict rule
- * @param Integer $threshold Rule's threshold value
+ * @param array $fields Fields to be set for strict rule
+ * @param int $threshold Rule's threshold value
*/
function webtestStrictDedupeRuleDefault($contactType = 'Individual', $fields = array(), $threshold = 10) {
// set default strict rule.
// Request a record from the DB by seachColumn+searchValue. Success if a record is found.
/**
- * @param $daoName
+ * @param string $daoName
* @param $searchValue
* @param $returnColumn
* @param $searchColumn
// Request a record from the DB by seachColumn+searchValue. Success if returnColumn value is NULL.
/**
- * @param $daoName
+ * @param string $daoName
* @param $searchValue
* @param $returnColumn
* @param $searchColumn
// Request a record from the DB by id. Success if row not found.
/**
- * @param $daoName
+ * @param string $daoName
* @param $id
* @param $message
*/
// Compare a single column value in a retrieved DB record to an expected value
/**
- * @param $daoName
+ * @param string $daoName
* @param $searchValue
* @param $returnColumn
* @param $searchColumn
// Compare all values in a single retrieved DB record to an array of expected values
/**
- * @param $daoName
+ * @param string $daoName
* @param $searchParams
* @param $expectedValues
*/
}
/**
- * function to type and select first occurance of autocomplete
+ * type and select first occurance of autocomplete
*/
function select2($fieldName,$label, $multiple = FALSE, $xpath=FALSE) {
// In the case of chainSelect, wait for options to load
}
/**
- * function to select multiple options
+ * select multiple options
*/
function multiselect2($fieldid, $params) {
// In the case of chainSelect, wait for options to load
// Request a record from the DB by seachColumn+searchValue. Success if a record is found.
/**
- * @param $daoName
+ * @param string $daoName
* @param $searchValue
* @param $returnColumn
* @param $searchColumn
// Request a record from the DB by seachColumn+searchValue. Success if returnColumn value is NULL.
/**
- * @param $daoName
+ * @param string $daoName
* @param $searchValue
* @param $returnColumn
* @param $searchColumn
// Request a record from the DB by id. Success if row not found.
/**
- * @param $daoName
+ * @param string $daoName
* @param $id
* @param null $message
*/
// Request a record from the DB by id. Success if row not found.
/**
- * @param $daoName
+ * @param string $daoName
* @param $id
* @param null $message
*/
// Compare a single column value in a retrieved DB record to an expected value
/**
- * @param $daoName
+ * @param string $daoName
* @param $searchValue
* @param $returnColumn
* @param $searchColumn
// Compare all values in a single retrieved DB record to an array of expected values
/**
- * @param $daoName
+ * @param string $daoName
* @param $searchParams
* @param $expectedValues
*/
/**
* check that api returned 'is_error' => 1
* else provide full message
- * @param $result
+ * @param array $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'));
*
* @param $entity
* @param $action
- * @param $params
+ * @param array $params
* @return array|int
*/
function civicrm_api($entity, $action, $params) {
/**
* Private helper function for calling civicrm_contact_add
*
- * @param $params
+ * @param array $params for civicrm_contact_add api function call
*
* @throws Exception
- * @internal param \parameters $array for civicrm_contact_add api function call
*
* @return int id of Household created
*/
}
/**
- * @param $params
+ * @param array $params
*
* @return mixed
*/
}
/**
- * Function to delete Membership Type
+ * delete Membership Type
*
- * @param $params
- * @internal param int $membershipTypeID
+ * @param array $params
*/
function membershipTypeDelete($params) {
$this->callAPISuccess('MembershipType', 'Delete', $params);
}
/**
- * Function to delete Relatinship Type
+ * delete Relatinship Type
*
* @param int $relationshipTypeID
*/
}
/**
- * Function to create Participant
+ * create Participant
*
* @param array $params array of contact id and event id values
*
/**
* Function to create contribution page
*
- * @param $params
+ * @param array $params
* @return object of contribution page
*/
function contributionPageCreate($params) {
*
* @param int $cID contact_id
*
- * @internal param int $cTypeID id of financial type
- *
* @return int id of created contribution
*/
function pledgeCreate($cID) {
/**
* Function to delete contribution
*
- * @param $pledgeId
- * @internal param int $contributionId
+ * @param int $pledgeId
*/
function pledgeDelete($pledgeId) {
$params = array(
/**
* Function to create online contribution
*
- * @param $params
+ * @param array $params
* @param int $financialType id of financial type
*
* @param int $invoiceID
/**
* Function to delete Locations of contact
*
- * @params array $pamars parameters
+ * @param array $params parameters
*/
function locationDelete($params) {
- $result = $this->callAPISuccess('Location', 'delete', $params);
+ $this->callAPISuccess('Location', 'delete', $params);
}
/**
/**
* Function to add a Group
*
- * @params array to add group
- *
* @param array $params
* @return int groupId of created group
*/
/**
* Function to delete a Group
*
- * @param $gid
- * @internal param int $id
+ * @param int $gid
*/
function groupDelete($gid) {
* Function to delete Group for a contact
*
* @param $contactId
- * @internal param array $params
*/
function contactGroupDelete($contactId) {
$params = array(
/**
* Function to create Activity
*
- * @param null $params
+ * @param array $params
* @return array|int
- * @internal param int $contactId
*/
function activityCreate($params = NULL) {
/**
* Function to create an activity type
*
- * @params array $params parameters
+ * @param array $params parameters
*/
function activityTypeCreate($params) {
$result = $this->callAPISuccess('ActivityType', 'create', $params);
/**
* Function to delete activity type
*
- * @params Integer $activityTypeId id of the activity type
+ * @param int $activityTypeId id of the activity type
*/
function activityTypeDelete($activityTypeId) {
$params['activity_type_id'] = $activityTypeId;
*
* @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 $filename
- * @internal param string $file __FILE__
+ * @param $filename string $file __FILE__
*
* @return array $ids ids of created objects
*/
*
* @param array $params (custom_group_id) is required
* @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(
/**
* Function to create note
*
- * @params array $params name-value pair for an event
- *
* @param $cId
* @return array $note
*/
* Tidy up examples array so that fields that change often ..don't
* and debug related fields are unset
*
- * @param $result
+ * @param array $result
*
- * @internal param array $params
*/
function tidyExampleResult(&$result){
if(!is_array($result)) {
/**
* Function to delete note
*
- * @params int $noteID
+ * @param array $params
*
+ * @return array|int
*/
function noteDelete($params) {
return $this->callAPISuccess('Note', 'delete', $params);
*
*/
/**
- * @param $params
+ * @param array $params
* @param $id
* @param $entity
* @param int $delete
* Helper function to create
* a contact
*
- * @param $params
+ * @param array $params
*
* @return int $contactID id of created contact
*/
/**
* Helper function to create Custom Field
* @deprecated use parent object create fn
- * @param $params
+ * @param array $params
* @param null $fields
* @return object of created field
*/
/**
* Helper function to delete an Event
*
- * @param $eventId
- * @internal param int $eventID id of the event to delete
+ * @param int $eventId
* @return boolean true if event deleted, false otherwise
*/
static function delete($eventId) {
/**
* Helper function to delete a participant
*
- * @param $participantId
- * @internal param int $participantID id of the participant to delete
+ * @param int $participantId
* @return boolean true if participant deleted, false otherwise
*/
static function delete($participantId) {
}
/*
- * Function to test individual pane seperatly.
+ * test individual pane seperatly.
*/
function testIndividualPanes() {
$this->webtestLogin();
}
/*
- * Function to test by selecting all panes at a time.
+ * test by selecting all panes at a time.
*/
function testAllPanes() {
$this->webtestLogin();
}
/*
- * Function to test individual pane seperatly.
+ * test individual pane seperatly.
*/
function testAdvancedSearch() {
$this->webtestLogin();
//common function for doing offline contribution
/**
- * @param $params
+ * @param array $params
* @param $firstName
* @param $lastName
* @param $processorName
}
/**
- * Function to test to regiter participant for event with
+ * test to regiter participant for event with
* multiple price fields in price-set
* CRM-11986
}
/**
- * @param $params
+ * @param array $params
*
* @return string
*/
}
/**
- * @param $params
+ * @param array $params
*
* @return string
*/
class ExportCiviSeleniumTestCase extends CiviSeleniumTestCase {
/**
- * Function to download CSV file.
+ * download CSV file.
*
- * @params string $selector element selector(download button in most of the cases).
- * @params sting $fileName file name to be download.
- * @params string $downloadDir download dir.
- *
- * @param $selector
- * @param string $fileName
- * @param string $downloadDir
+ * @param string $selector element selector(download button in most of the cases).
+ * @param string $fileName file name to be download.
+ * @param string $downloadDir download dir.
*
* @return string downloaded file path.
*/
}
/**
- * Function to read CSV file and fire provided assertions.
+ * read CSV file and fire provided assertions.
*
- * @params string $file file path of CSV file.
- * @params array $checkHeaders check first row of csv
+ * @param string $file file path of CSV file.
+ * @param array $checkColumns check first row of csv
* independent of index.
- * @params array $checkRows array of header and rows according to row index
+ * @param array $checkRows array of header and rows according to row index
* eg: array(
* 1 => array(
// Row index 1
* 'Last Name' => 'mayekar'
* ),
* );
- * @params int $rowCount count rows (excluding header row).
- * @params array $settings used for override settings.
+ * @param int $rowCount count rows (excluding header row).
+ * @param array $settings used for override settings.
*/
- function reviewCSV($file, $checkColumns = array(
- ), $checkRows = array(), $rowCount = 0, $settings = array()) {
+ function reviewCSV($file, $checkColumns = array(), $checkRows = array(), $rowCount = 0, $settings = array()) {
// Check file exists before proceed.
$this->assertTrue(($file && file_exists($file)), "Not able to locate {$file}.");
}
}
- /*
- * Helper function to provide data for custom data import.
- */
/**
+ * Helper function to provide data for custom data import.
+ *
* @param $customDataParams
* @param $firstName1
*
function _individualCustomCSVData($customDataParams, $firstName1) {
$headers = array(
- 'first_name' => 'First Name',
- 'last_name' => 'Last Name',
- 'address_1' => 'Additional Address 1',
- 'address_2' => 'Additional Address 2',
- 'city' => 'City',
- 'state' => 'State',
- 'country' => 'Country',
- );
+ 'first_name' => 'First Name',
+ 'last_name' => 'Last Name',
+ 'address_1' => 'Additional Address 1',
+ 'address_2' => 'Additional Address 2',
+ 'city' => 'City',
+ 'state' => 'State',
+ 'country' => 'Country',
+ );
foreach( $customDataParams['headers'] as $key =>$value){
$headers[$key] = $value;
}
$rows = array( 0 =>
- array(
- 'first_name' => $firstName1,
- 'last_name' => 'Anderson',
- 'address_1' => 'Add 1',
- 'address_2' => 'Add 2',
- 'city' => 'Watson',
- 'state' => 'NY',
- 'country' => 'United States',
- ),
- );
+ array(
+ 'first_name' => $firstName1,
+ 'last_name' => 'Anderson',
+ 'address_1' => 'Add 1',
+ 'address_2' => 'Add 2',
+ 'city' => 'Watson',
+ 'state' => 'NY',
+ 'country' => 'United States',
+ ),
+ );
foreach ($customDataParams['rows'][0] as $key => $values) {
$rows[0][$key] = $values;
}
$customField6 = 'Customfield_alp_multiselect' . substr(sha1(rand()), 0, 4);
$customFieldId6 = $this->_createMultipleValueCustomField($customField6,'Multi-Select');
- // create custom field - "alphanumeric advmultiselect"
+ // create custom field - "alphanumeric advmultiselect"
$this->click("newCustomField");
$this->waitForElementPresent('_qf_Field_done-bottom');
$customField7 = 'Customfield_alp_advmultiselect' . substr(sha1(rand()), 0, 4);
$customFieldId10 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr/td/span[text()='$customField10']/../../td[8]/span/a@href"));
$customFieldId10 = $customFieldId10[1];
- return array('headers' =>
-
- array("custom_{$customFieldId}" => "$customField :: $customGroupTitle",
- "custom_{$customFieldId3}" => "$customField3 :: $customGroupTitle",
- "custom_{$customFieldId4}" => "$customField4 :: $customGroupTitle",
- "custom_{$customFieldId5}" => "$customField5 :: $customGroupTitle",
- "custom_{$customFieldId6}" => "$customField6 :: $customGroupTitle",
- "custom_{$customFieldId7}" => "$customField7 :: $customGroupTitle",
- "custom_{$customFieldId8}" => "$customField8 :: $customGroupTitle",
- "custom_{$customFieldId1}" => "$customField1 :: $customGroupTitle",
- "custom_{$customFieldId2}" => "$customField2 :: $customGroupTitle",
- "custom_{$customFieldId9}" => "$customField9 :: $customGroupTitle",
- "custom_{$customFieldId10}" => "$customField10 :: $customGroupTitle",
- ),
- 'rows' =>
- array( 0 => array("custom_{$customFieldId}" => "This is a test field",
- "custom_{$customFieldId3}" => "label1",
- "custom_{$customFieldId4}" => "label1",
- "custom_{$customFieldId5}" => "label1",
- "custom_{$customFieldId6}" => "label1",
- "custom_{$customFieldId7}" => "label1",
- "custom_{$customFieldId8}" => "label1",
- "custom_{$customFieldId1}" => 1,
- "custom_{$customFieldId2}" => 12345,
- "custom_{$customFieldId9}" => 123456,
- "custom_{$customFieldId10}" => "2009-12-31",
- ),
- ),
- 'customFields' => array(
- $customField => 'This is a test field',
- $customField3 => 'label1',
- $customField4 => 'label1',
- $customField5 => 'label1',
- $customField6 => 'label1',
- $customField7 => 'label1',
- $customField8 => 'label1',
- $customField1 => '1',
- $customField2 => '12345',
- $customField9 => '123,456.00',
- $customField10 => 'December 31st, 2009',
- ),
- );
+ return array(
+ 'headers' => array(
+ "custom_{$customFieldId}" => "$customField :: $customGroupTitle",
+ "custom_{$customFieldId3}" => "$customField3 :: $customGroupTitle",
+ "custom_{$customFieldId4}" => "$customField4 :: $customGroupTitle",
+ "custom_{$customFieldId5}" => "$customField5 :: $customGroupTitle",
+ "custom_{$customFieldId6}" => "$customField6 :: $customGroupTitle",
+ "custom_{$customFieldId7}" => "$customField7 :: $customGroupTitle",
+ "custom_{$customFieldId8}" => "$customField8 :: $customGroupTitle",
+ "custom_{$customFieldId1}" => "$customField1 :: $customGroupTitle",
+ "custom_{$customFieldId2}" => "$customField2 :: $customGroupTitle",
+ "custom_{$customFieldId9}" => "$customField9 :: $customGroupTitle",
+ "custom_{$customFieldId10}" => "$customField10 :: $customGroupTitle",
+ ),
+ 'rows' => array(
+ 0 => array(
+ "custom_{$customFieldId}" => "This is a test field",
+ "custom_{$customFieldId3}" => "label1",
+ "custom_{$customFieldId4}" => "label1",
+ "custom_{$customFieldId5}" => "label1",
+ "custom_{$customFieldId6}" => "label1",
+ "custom_{$customFieldId7}" => "label1",
+ "custom_{$customFieldId8}" => "label1",
+ "custom_{$customFieldId1}" => 1,
+ "custom_{$customFieldId2}" => 12345,
+ "custom_{$customFieldId9}" => 123456,
+ "custom_{$customFieldId10}" => "2009-12-31",
+ ),
+ ),
+ 'customFields' => array(
+ $customField => 'This is a test field',
+ $customField3 => 'label1',
+ $customField4 => 'label1',
+ $customField5 => 'label1',
+ $customField6 => 'label1',
+ $customField7 => 'label1',
+ $customField8 => 'label1',
+ $customField1 => '1',
+ $customField2 => '12345',
+ $customField9 => '123,456.00',
+ $customField10 => 'December 31st, 2009',
+ ),
+ );
}
/**
}
/**
- * Function to check for Valid Street Address
+ * check for Valid Street Address
*/
function testValidStreetAddressParsing() {
$this->webtestLogin();
$this->waitForPageToLoad($this->getTimeoutMsec());
}
- /*
- * Function to check for Invalid Street Address
- */
+ /**
+ * check for Invalid Street Address
+ */
function testInvalidStreetAddressParsing() {
$this->webtestLogin();
}
/**
- * Function to check Street Address when Address Parsing is Disabled
+ * Check Street Address when Address Parsing is Disabled
*/
function testStreetAddress() {
$this->webtestLogin();
$this->assertEquals('22 Adams Avenue Unit 3c', $actualvalue);
}
- /*
- * Helper function to provide csv data with Valid Street Address.
- */
/**
+ * Helper function to provide csv data with Valid Street Address.
+ *
* @return array
*/
function _validStreetAddressCSVData() {
return array($headers, $rows);
}
- /*
- * Helper function to provide csv data with Invalid Street Address.
- */
/**
+ * Helper function to provide csv data with Invalid Street Address.
+ *
* @return array
*/
function _invalidStreetAddressCSVData() {
);
$rows = array(
- array('first_name' => 'A' . substr(sha1(rand()), 0, 7),
+ array(
+ 'first_name' => 'A' . substr(sha1(rand()), 0, 7),
'middle_name' => substr(sha1(rand()), 0, 7),
'last_name' => substr(sha1(rand()), 0, 7) . 'and',
'email' => substr(sha1(rand()), 0, 7) . '@example.com',
'state' => 'NY',
'country' => 'United States',
),
- array('first_name' => 'S' . substr(sha1(rand()), 0, 7),
+ array(
+ 'first_name' => 'S' . substr(sha1(rand()), 0, 7),
'middle_name' => substr(sha1(rand()), 0, 7),
'last_name' => substr(sha1(rand()), 0, 7) . 'sum',
'email' => substr(sha1(rand()), 0, 7) . '@example.com',
$this->assertTrue($this->isTextPresent('This is a test field'));
}
- /*
- * Helper function to provide data for custom data import.
- */
/**
+ * Helper function to provide data for custom data import.
+ *
* @param $customDataParams
* @param $firstName1
*
}
}
- /*
- * Helper function to provide data for custom data import.
- */
/**
+ * Helper function to provide data for custom data import.
+ *
* @param $customGroupTitle
* @param $firstName1
* @param $firstName2
$contactReferenceFieldId = $contactReferenceFieldId[1];
$customDataParams = array(
- 'headers' =>
- array(
+ 'headers' => array(
"custom_{$dateFieldId}" => "$dateFieldLabel :: $customGroupTitle",
"custom_{$radioFieldId}" => "$radioFieldLabel :: $customGroupTitle",
"custom_{$multiSelectFieldId}" => "$multiSelectLabel :: $customGroupTitle",
"custom_{$contactReferenceFieldId}" => "$contactReferenceLabel :: $customGroupTitle",
),
- 'rows' =>
- array(0 => array("custom_{$dateFieldId}" => date('Y-m-d'),
+ 'rows' => array(
+ 0 => array(
+ "custom_{$dateFieldId}" => date('Y-m-d'),
"custom_{$radioFieldId}" => '2',
"custom_{$multiSelectFieldId}" => '3',
"custom_{$contactReferenceFieldId}" => $id1,
),
- 1 => array("custom_{$dateFieldId}" => date('Y-m-d', mktime(0, 0, 0, 4, 5, date('Y'))),
+ 1 => array(
+ "custom_{$dateFieldId}" => date('Y-m-d', mktime(0, 0, 0, 4, 5, date('Y'))),
"custom_{$radioFieldId}" => '1',
"custom_{$multiSelectFieldId}" => '2',
"custom_{$contactReferenceFieldId}" => $id2,
parent::setUp();
}
- /*
- * Test contact import for Individuals.
- */
+ /**
+ * Test contact import for Individuals.
+ */
function testIndividualImportWithGroup() {
$this->webtestLogin();
$this->assertTrue($this->isTextPresent("{$count} Contacts"), "Contacts Not Found");
}
- /*
- * Helper function to provide data for contact import for Individuals.
- */
/**
+ * Helper function to provide data for contact import for Individuals.
+ *
* @return array
*/
function _individualGroupCSVData() {
*/
class ImportCiviSeleniumTestCase extends CiviSeleniumTestCase {
- /*
- * Function to test csv import for each component.
- *
- * @params string $component component name ( Event, Contribution, Membership, Activity etc)
- * @params array $headers csv data headers
- * @params array $rows csv data rows
- * @params string $contactType contact type
- * @params string $mode import mode
- * @params array $fieldMapper select mapper fields while import
- * @params array $other other parameters
- * useMappingName : to reuse mapping
-
- * dateFormat : date format of data
- * checkMapperHeaders : to override default check mapper headers
- * saveMapping : save current mapping?
- * saveMappingName : to override mapping name
- *
- */
/**
- * @param $component
- * @param $headers
- * @param $rows
- * @param string $contactType
- * @param string $mode
- * @param array $fieldMapper
- * @param array $other
+ * test csv import for each component.
+ *
+ * @param string $component component name ( Event, Contribution, Membership, Activity etc)
+ * @param array $headers csv data headers
+ * @param array $rows csv data rows
+ * @param string $contactType contact type
+ * @param string $mode import mode
+ * @param array $fieldMapper select mapper fields while import
+ * @param array $other other parameters
+ * useMappingName : to reuse mapping
+
+ * dateFormat : date format of data
+ * checkMapperHeaders : to override default check mapper headers
+ * saveMapping : save current mapping?
+ * saveMappingName : to override mapping name
+ *
*/
function importCSVComponent($component,
$headers,
}
}
- /*
- * Function to test contact import.
- *
- * @params array $headers csv data headers
- * @params array $rows csv data rows
- * @params string $contactType contact type
- * @params string $mode import mode
- * @params array $fieldMapper select mapper fields while import
- * @params array $other other parameters
- * contactSubtype : import for selected Contact Subtype
-
- * useMappingName : to reuse mapping
- * dateFormat : date format of data
- * checkMapperHeaders : to override default check mapper headers
- * saveMapping : save current mapping?
- * saveMappingName : to override mapping name
- * createGroup : create new group?
- * createGroupName : to override new Group name
- * createTag : create new tag?
- * createTagName : to override new Tag name
- * selectGroup : select existing group for contacts
- * selectTag : select existing tag for contacts
- * callbackImportSummary : function to override default import summary assertions
- *
- * @params string $type import type (csv/sql)
- * @todo:currently only supports csv, need to work on sql import
-
- */
/**
- * @param $headers
- * @param $rows
- * @param string $contactType
- * @param string $mode
- * @param array $fieldMapper
- * @param array $other
- * @param string $type
+ * test contact import.
+ *
+ * @param array $headers csv data headers
+ * @param array $rows csv data rows
+ * @param string $contactType contact type
+ * @param string $mode import mode
+ * @param array $fieldMapper select mapper fields while import
+ * @param array $other other parameters
+ * contactSubtype : import for selected Contact Subtype
+
+ * useMappingName : to reuse mapping
+ * dateFormat : date format of data
+ * checkMapperHeaders : to override default check mapper headers
+ * saveMapping : save current mapping?
+ * saveMappingName : to override mapping name
+ * createGroup : create new group?
+ * createGroupName : to override new Group name
+ * createTag : create new tag?
+ * createTagName : to override new Tag name
+ * selectGroup : select existing group for contacts
+ * selectTag : select existing tag for contacts
+ * callbackImportSummary : function to override default import summary assertions
+ *
+ * @param string $type import type (csv/sql)
+ * @todo:currently only supports csv, need to work on sql import
*/
function importContacts($headers, $rows, $contactType = 'Individual', $mode = 'Skip', $fieldMapper = array(), $other = array(), $type = 'csv') {
}
}
- /*
- * Helper function to get the import url of the component.
- *
- * @params string $component component name
- *
- * @return string import url
-
- */
/**
- * @param $component
+ * Helper function to get the import url of the component.
+ * @param string $component component name
*
- * @return mixed
+ * @return string import url
*/
private function _getImportComponentUrl($component) {
$importComponentUrl = array(
return $importComponentUrl[$component];
}
- /*
- * Helper function to get the import url of the component.
- *
- * @params string $component component name
- *
- * @return string import url
-
- */
/**
* @param $component
* @param $contactType
*
- * @return mixed
+ * @return string
*/
function _getImportComponentContactType($component, $contactType) {
$importComponentMode = array(
- 'Event' => array('Individual' => 'CIVICRM_QFID_1_8',
+ 'Event' => array(
+ 'Individual' => 'CIVICRM_QFID_1_8',
'Household' => 'CIVICRM_QFID_2_10',
'Organization' => 'CIVICRM_QFID_4_12',
),
return $importComponentMode[$component][$contactType];
}
- /*
- * Helper function to check import mapping fields.
- *
- * @params array $headers field headers
- * @params array $rows field rows
- * @params array $checkMapperHeaders override default mapper headers
- */
/**
- * @param $headers
- * @param $rows
+ * Helper function to check import mapping fields.
+ * @param array $headers
+ * @param array $rows
* @param null $existingMapping
* @param array $checkMapperHeaders
* @param string $headerSelector
*/
- function _checkImportMapperData($headers, $rows, $existingMapping = NULL, $checkMapperHeaders = array(
- ), $headerSelector = 'th') {
+ function _checkImportMapperData($headers, $rows, $existingMapping = NULL, $checkMapperHeaders = array(), $headerSelector = 'th') {
if (empty($checkMapperHeaders)) {
$checkMapperHeaders = array(
}
}
- /*
- * Helper function to get imported contact ids.
- *
- * @params array $rows fields rows
- * @params string $contactType contact type
-
- *
- * @return array $contactIds imported contact ids
- */
/**
- * @param $rows
+ * Helper function to get imported contact ids.
+ *
+ * @param array $rows
* @param string $contactType
*
- * @return array
+ * @return array $contactIds imported contact ids
*/
function _getImportedContactIds($rows, $contactType = 'Individual') {
$contactIds = array();
return $contactIds;
}
- /*
- * Helper function to format headers and rows for contact relationship data.
- *
- * @params array $headers data headers
- * @params string $rows data rows
- */
/**
- * @param $headers
- * @param $rows
+ * Helper function to format headers and rows for contact relationship data.
+ *
+ * @param array $headers
+ * @param array $rows
*/
function _formatContactCSVdata(&$headers, &$rows) {
if (!isset($headers['contact_relationships'])) {
parent::setUp();
}
- /*
- * Test participant import for Individuals matching on external identifier.
- */
+ /**
+ * Test participant import for Individuals matching on external identifier.
+ */
function testContributionImport() {
$this->webtestLogin();
$this->importCSVComponent('Contribution', $headers, $rows, 'Individual', 'Insert new contributions', $fieldMapper);
}
- /*
- * Test membership import for Individuals matching on external identifier.
- */
+ /**
+ * Test membership import for Individuals matching on external identifier.
+ */
function testMemberImportIndividual() {
$this->webtestLogin();
$this->importCSVComponent('Membership', $headers, $rows, 'Individual', 'Skip', $fieldMapper);
}
- /*
- * Test participant import for Individuals matching on external identifier.
- */
+ /**
+ * Test participant import for Individuals matching on external identifier.
+ */
function testParticipantImportIndividual() {
// Log in using webtestLogin() method
$this->webtestLogin();
$this->importCSVComponent('Event', $headers, $rows, 'Individual', 'Skip', $fieldMapper);
}
- /*
- * Helper function to provide data for contribution import for Individual.
- */
/**
+ * Helper function to provide data for contribution import for Individual.
+ *
* @return array
*/
function _contributionIndividualCSVData() {
return array($headers, $rows, $fieldMapper);
}
- /*
- * Helper function to provide data for membership import for Individual.
- */
/**
+ * Helper function to provide data for membership import for Individual.
+ *
* @return array
*/
function _memberIndividualCSVData() {
return array($headers, $rows, $fieldMapper);
}
- /*
- * Helper function to provide data for participant import for Individual.
- */
/**
+ * Helper function to provide data for participant import for Individual.
+ *
* @return array
*/
function _participantIndividualCSVData() {
return array($headers, $rows, $fieldMapper);
}
- /*
- * Helper function to add new contact
- *
- * @params $firstName, $lastName, $externalId
- *
- * @return int external id
- */
/**
+ * Helper function to add new contact
+ *
* @param $firstName
* @param $lastName
* @param $externalId
*
- * @return mixed
+ * @return int external id
*/
function _addContact($firstName, $lastName, $externalId) {
$this->openCiviPage('contact/add', 'reset=1&ct=Individual');
return $externalId;
}
- /*
- * Helper function to add new event
- *
- * @params array $params parameters to create an event
- *
- * @return array $params event details of newly created event
- */
/**
+ * Helper function to add new event
+ *
* @param array $params
*
- * @return array
+ * @return array event details of newly created event
*/
- function _addNewEvent($params = array(
- )) {
+ function _addNewEvent($params = array()) {
if (empty($params)) {
// Use default payment processor
parent::setUp();
}
- /*
- * Test participant import for Individuals.
- */
+ /**
+ * Test participant import for Individuals.
+ */
function testMemberImportIndividual() {
$this->webtestLogin();
$this->importCSVComponent('Membership', $headers, $rows, 'Individual', 'Skip', $fieldMapper);
}
- /*
- * Test participant import for Households.
- */
+ /**
+ * Test participant import for Households.
+ */
function testMemberImportHousehold() {
$this->webtestLogin();
$this->importCSVComponent('Membership', $headers, $rows, 'Household', 'Skip', $fieldMapper);
}
- /*
- * Test participant import for Organizations.
- */
+ /**
+ * Test participant import for Organizations.
+ */
function testMemberImportOrganization() {
$this->webtestLogin();
$this->importCSVComponent('Membership', $headers, $rows, 'Organization', 'Skip', $fieldMapper);
}
- /*
- * Helper function to provide data for Membeship import for Individuals.
- */
/**
+ * Helper function to provide data for Membeship import for Individuals.
+ *
* @return array
*/
function _memberIndividualCSVData() {
return array($headers, $rows, $fieldMapper);
}
- /*
- * Helper function to provide data for Membeship import for Households.
- */
/**
+ * Helper function to provide data for Membeship import for Households.
+ *
* @return array
*/
function _memberHouseholdCSVData() {
return array($headers, $rows, $fieldMapper);
}
- /*
- * Helper function to provide data for Membeship import for Organizations.
- */
/**
+ * Helper function to provide data for Membeship import for Organizations.
+ *
* @return array
*/
function _memberOrganizationCSVData() {
parent::setUp();
}
- /*
- * Test participant import for Individuals.
- */
+ /**
+ * Test participant import for Individuals.
+ */
function testParticipantImportIndividual() {
// Log in using webtestLogin() method
$this->webtestLogin();
$this->importCSVComponent('Event', $headers, $rows, 'Individual', 'Skip', $fieldMapper);
}
- /*
- * Test participant import for Organizations.
- */
+ /**
+ * Test participant import for Organizations.
+ */
function testParticipantImportOrganization() {
// Log in using webtestLogin() method
$this->webtestLogin();
$this->importCSVComponent('Event', $headers, $rows, 'Organization', 'Skip', $fieldMapper);
}
- /*
- * Test participant import for Households.
- */
+ /**
+ * Test participant import for Households.
+ */
function testParticipantImportHousehold() {
// Log in using webtestLogin() method
$this->webtestLogin();
$this->importCSVComponent('Event', $headers, $rows, 'Household', 'Skip', $fieldMapper);
}
- /*
- * Helper function to provide data for participant import for Individuals.
- */
/**
+ * Helper function to provide data for participant import for Individuals.
+ *
* @return array
*/
function _participantIndividualCSVData() {
return array($headers, $rows);
}
- /*
- * Helper function to provide data for participant import for Household.
- */
/**
+ * Helper function to provide data for participant import for Household.
+ *
* @return array
*/
function _participantHouseholdCSVData() {
return array($headers, $rows);
}
- /*
- * Helper function to provide data for participant import for Organization.
- */
/**
+ * Helper function to provide data for participant import for Organization.
* @return array
*/
function _participantOrganizationCSVData() {
return array($headers, $rows);
}
- /*
- * Helper function to add new event
- *
- * @params array $params parameters to create an event
- *
- * @return array $params event details of newly created event
- */
/**
- * @param array $params
+ * Helper function to add new event
*
- * @return array
+ * @param array $params parameters to create an event
+ *
+ * @return array $params event details of newly created event
*/
- function _addNewEvent($params = array(
- )) {
+ function _addNewEvent($params = array()) {
if (empty($params)) {
parent::setUp();
}
- /*
- * Function to test Saved Import Mapping for Individuals.
- */
+ /**
+ * test Saved Import Mapping for Individuals.
+ */
function testSaveIndividualMapping() {
// Logging in.
$this->importContacts($headers, $rows, 'Individual', 'Skip', array(), $other);
}
- /*
- * Helper function to provide csv data for Individuals contact import.
- */
/**
+ * Helper function to provide csv data for Individuals contact import.
+ *
* @return array
*/
function _individualCSVData() {
$this->assertTrue($this->isTextPresent("{$countContacts} Contacts"));
}
- /*
- * Helper function to provide data for contact import for sample.
- */
/**
+ * Helper function to provide data for contact import for sample.
+ *
* @return array
*/
function _contactTagCSVData() {
);
$rows = array(
- array('first_name' => substr(sha1(rand()), 0, 7),
+ array(
+ 'first_name' => substr(sha1(rand()), 0, 7),
'middle_name' => substr(sha1(rand()), 0, 7),
'last_name' => 'Anderson',
'email' => substr(sha1(rand()), 0, 7) . '@example.com',
'state' => 'NY',
'country' => 'United States',
),
- array('first_name' => substr(sha1(rand()), 0, 7),
+ array(
+ 'first_name' => substr(sha1(rand()), 0, 7),
'middle_name' => substr(sha1(rand()), 0, 7),
'last_name' => 'Summerson',
'email' => substr(sha1(rand()), 0, 7) . '@example.com',
);
}
- /*
- * test checks that all v3 API return a standardised error message when
- * the $params passed in is not an array.
- */
+ /**
+ * test checks that all v3 API return a standardised error message when
+ * the $params passed in is not an array.
+ */
function testParamsNotArray() {
/*I have commented this out as the check for is_array has been moved to civicrm_api. But keeping in place as
* this test, in contrast to the standards test, tests all existing API rather than just CRUD ones
}*/
}
- /*
- * Get all the files in the API directory for the relevant version which contain API functions
- * @return array $files array of php files in the directory excluding helper files
- */
/**
- * @return array
+ * Get all the files in the API directory for the relevant version which contain API functions
+ * @return array $files array of php files in the directory excluding helper files
*/
function getAllFilesinAPIDir() {
$files = array();
return $files;
}
- /*
- * Require once Files
- * @files array list of files to load
- */
/**
- * @param $files
+ * Require once Files
+ * @param $files array list of files to load
*/
function requireOnceFilesArray($files) {
foreach ($files as $key => $file) {
}
}
- /*
- * Get all api exposed functions that are expected to conform to standards
- * @return array $functionlist
- */
/**
- * @return array
+ * Get all api exposed functions that are expected to conform to standards
+ * @return array $functionlist
*/
function getAllAPIStdFunctions() {
$functionlist = get_defined_functions();
}
- /*
- * is_primary should be set as a default
- */
-
-
-
+ /**
+ * is_primary should be set as a default
+ */
public function testCreateAddressTestDefaults() {
$params = $this->_params;
unset($params['is_primary']);
$params['street_number_suffix'] = 'really long string';
$result = $this->callAPIFailure('address', 'create', $params);
}
- /*
- * is_primary shoule be set as a default. ie. create the address, unset the params & recreate.
- * is_primary should be 0 before & after the update. ie - having no other address
- * is_primary is invalid
- */
-
-
+ /**
+ * is_primary shoule be set as a default. ie. create the address, unset the params & recreate.
+ * is_primary should be 0 before & after the update. ie - having no other address
+ * is_primary is invalid
+ */
public function testCreateAddressTestDefaultWithID() {
$params = $this->_params;
$params['is_primary'] = 0;
/**
* Check deceased contacts are not retrieved
* Note at time of writing the default is to return default. This should possibly be changed & test added
- *
*/
function testGetDeceasedRetrieved() {
$this->callAPISuccess($this->_entity, 'create', $this->_params);
$this->assertFalse(array_key_exists($c2['id'], $result['values']));
}
- /*
- * Test that sort works - old syntax
- */
+ /**
+ * Test that sort works - old syntax
+ */
function testGetSort() {
$c1 = $this->callAPISuccess($this->_entity, 'create', $this->_params);
$c2 = $this->callAPISuccess($this->_entity, 'create', array('first_name' => 'bb', 'last_name' => 'ccc', 'contact_type' => 'Individual'));
$this->assertEquals(1, $countDeleted, 'in line ' . __LINE__);
$this->assertEquals(1, $countDefault, 'Only active by default in line ' . __LINE__);
}
- /*
- * Test that sort works - new syntax
- */
+
+ /**
+ * Test that sort works - new syntax
+ */
function testGetSortNewSYntax() {
$c1 = $this->callAPISuccess($this->_entity, 'create', $this->_params);
$c2 = $this->callAPISuccess($this->_entity, 'create', array('first_name' => 'bb', 'last_name' => 'ccc', 'contact_type' => 'Individual'));
$this->callAPISuccess($this->_entity, 'delete', array('id' => $c1['id']));
$this->callAPISuccess($this->_entity, 'delete', array('id' => $c2['id']));
}
- /*
+
+ /**
* Test apostrophe works in get & create
*/
function testGetApostropheCRM10857() {
$this->customFieldDelete($ids['custom_field_id']);
$this->customGroupDelete($ids['custom_group_id']);
}
- /*
- * check with complete array + custom field
- * Note that the test is written on purpose without any
- * variables specific to participant so it can be replicated into other entities
- * and / or moved to the automated test suite
- */
+
+ /**
+ * check with complete array + custom field
+ * Note that the test is written on purpose without any
+ * variables specific to participant so it can be replicated into other entities
+ * and / or moved to the automated test suite
+ */
function testGetWithCustomReturnSyntax() {
$ids = $this->entityCustomGroupWithSingleFieldCreate(__FUNCTION__, __FILE__);
}
}
- /*
- * test add methods with valid data
- * success expected
- */
+ /**
+ * test add methods with valid data
+ * success expected
+ */
function testContactCreate() {
// check for Type:Individual Subtype:sub_individual
}
- /*
- * test add with invalid data
- */
+ /**
+ * test add with invalid data
+ */
function testContactAddInvalidData() {
// check for Type:Individual Subtype:sub_household
}
- /*
- * test update with no subtype to valid subtype
- * success expected
- */
+ /**
+ * test update with no subtype to valid subtype
+ * success expected
+ */
function testContactUpdateNoSubtypeValid() {
// check for Type:Individual
}
- /*
- * test update with no subtype to invalid subtype
- */
+ /**
+ * test update with no subtype to invalid subtype
+ */
function testContactUpdateNoSubtypeInvalid() {
// check for Type:Individual
$this->callAPISuccess('contact', 'delete', $params);
}
- /*
- * test update with no subtype to valid subtype
- * success expected
- */
+ /**
+ * test update with no subtype to valid subtype
+ * success expected
+ */
function testContactUpdateSubtypeValid() {
$params = array(
$this->callAPISuccess('contact', 'delete', $params);
}
- /*
- * test update with no subtype to invalid subtype
- */
+ /**
+ * test update with no subtype to invalid subtype
+ */
function testContactUpdateSubtypeInvalid() {
// check for Type:Individual subtype:sub_individual
$this->assertEquals(1,$contribution['count']);
}
- /*
- * Create test with unique field name on source
- */
+ /**
+ * Create test with unique field name on source
+ */
function testCreateContributionSource() {
$params = array(
$this->assertEquals(date('Y-m-d'), date('Y-m-d', strtotime($contribution['receive_date'])));
}
- /*
- * Create test with unique field name on source
- */
+ /**
+ * Create test with unique field name on source
+ */
function testCreateContributionSourceInvalidContac() {
$params = array(
$this->assertEquals('my contribution note', $result['values'][0]['note']);
$this->callAPISuccess('contribution', 'delete', array('id' => $contribution['id']));
}
- /*
- * This is the test for creating soft credits - however a 'get' is not yet possible via API
- * as the current BAO functions are contact-centric (from what I can find)
- *
- */
+
+ /**
+ * This is the test for creating soft credits - however a 'get' is not yet possible via API
+ * as the current BAO functions are contact-centric (from what I can find)
+ */
function testCreateContributionWithSoftCredt() {
$description = "Demonstrates creating contribution with SoftCredit";
$subfile = "ContributionCreateWithSoftCredit";
}
/**
- * @param $params
+ * @param array $params
* @param $context
*/
function _checkFinancialRecords($params,$context) {
* Can't figure out the point of this?
*/
/**
- * @param $params
+ * @param array $params
*/
function _loopingCustomFieldCreateTest($params) {
$customField = $this->callAPISuccess('custom_field', 'create', $params);
$result = $this->callAPIAndDocument('custom_group', 'delete', $params, __FUNCTION__, __FILE__);
$this->assertAPISuccess($result, 'In line ' . __LINE__);
}
- /*
- * main success get function
- */
-
-
+ /**
+ * main success get function
+ */
public function testGetCustomGroupSuccess() {
$this->callAPISuccess($this->_entity, 'create', $this->_params);
*/
- /*
- * Test 'is.Current' option. Existing event is 'old' so only current should be returned
- */
+ /**
+ * Test 'is.Current' option. Existing event is 'old' so only current should be returned
+ */
function testGetIsCurrent() {
$params = array(
'isCurrent' => 1,
$this->assertEquals(3, $allEvents['count'], 'confirm three events exist (ie. two not found) ' . __LINE__);
$this->assertEquals($currentEvent['id'], $result['id'], '');
}
-/*
- * There has been a schema change & the api needs to buffer developers from it
- */
+
+ /**
+ * There has been a schema change & the api needs to buffer developers from it
+ */
function testGetPaymentProcessorId() {
$params = $this->_params[0];
$params['payment_processor_id'] = 1;
}
- /*
- * Test 'is.Current' option. Existing event is 'old' so only current should be returned
- */
+ /**
+ * Test 'is.Current' option. Existing event is 'old' so only current should be returned
+ */
function testGetSingleReturnIsFull() {
$contactID = $this->individualCreate();
$params = array(
$this->assertEquals('2008-06-01 00:00:00', $result['values'][$result['id']]['registration_start_date'], 'start date is not set in line ' . __LINE__);
$this->assertEquals('2008-10-15 00:00:00', $result['values'][$result['id']]['registration_end_date'], 'end date is not set in line ' . __LINE__);
}
- /*
- * Test that passing in Unique field names works
- */
+
+ /**
+ * Test that passing in Unique field names works
+ */
function testCreateEventSuccessUniqueFieldNames() {
$this->_params[0]['event_start_date'] = $this->_params[0]['start_date'];
unset($this->_params[1]['start_date']);
$result = $this->callAPISuccess('Event', 'Delete', $params);
$this->assertAPISuccess($result, 'in line ' . __LINE__);
}
- /*
- * Trying to delete an event with participants should return error
- */
+
+ /**
+ * Trying to delete an event with participants should return error
+ */
function testDeleteWithExistingParticipant() {
$contactID = $this->individualCreate();
$participantID = $this->participantCreate(
$result = $this->callAPISuccess('event', 'getfields', $params);
$this->assertEquals(1, $result['values']['title']['api.required'], 'in line ' . __LINE__);
}
- /*
- * test api_action param also works
- */
+
+ /**
+ * test api_action param also works
+ */
function testgetfieldsRest() {
$description = "demonstrate use of getfields to interrogate api";
$params = array('api_action' => 'create');
);
}
- /*
- * Set up for group contact tests
- *
- * @todo set up calls function that doesn't work @ the moment
- */
+ /**
+ * Set up for group contact tests
+ *
+ * @todo set up calls function that doesn't work @ the moment
+ */
function setUp() {
parent::setUp();
* @param $op
* @param $objectName
* @param $id
- * @param $params
+ * @param array $params
*/
function hookPreRelationship($op, $objectName, $id, &$params ) {
if($op == 'delete') {
parent::tearDown();
}
- /*
+ /**
* Test that the api responds correctly to null params
* Note to copy & pasters - tests like this that test the wrapper belong in the SyntaxConformance class
* (which already has a 'not array test)
* I have left this here in case 'null' isn't covered in that class
* but don't copy it only any other classes
*/
- public function testMailingNullParams() {
- $result = $this->callAPIFailure('MailingContact', 'get', null);
- }
-
- public function testMailingContactGetFields() {
- $result = $this->callAPISuccess('MailingContact', 'getfields', array(
- 'action' => 'get',
- )
- );
- $this->assertEquals('Delivered', $result['values']['type']['api.default']);
- }
+ public function testMailingNullParams() {
+ $result = $this->callAPIFailure('MailingContact', 'get', null);
+ }
+
+ public function testMailingContactGetFields() {
+ $result = $this->callAPISuccess('MailingContact', 'getfields', array(
+ 'action' => 'get',
+ )
+ );
+ $this->assertEquals('Delivered', $result['values']['type']['api.default']);
+ }
/**
* Test that the api will return the proper error when you do not
* Note to copy & pasters - test is of marginal if any value & testing of wrapper level functionaliy
* belongs in the SyntaxConformance class
*/
-
public function testMailingNoContactID() {
$params = array(
'something' => 'This is not a real field',
* Note to copy & pasters - test is of marginal if any value & testing of wrapper level functionaliy
* belongs in the SyntaxConformance class
*/
- public function testMailingContactInvalidContactID() {
- $params = array('contact_id' => 'This is not a number',);
- $result = $this->callAPIFailure('MailingContact', 'get', $params);
- }
-
- /**
- * Test that invalid types are returned with appropriate errors
- */
- public function testMailingContactInvalidType() {
- $params = array(
- 'contact_id' => 23,
- 'type' => 'invalid',
- );
- $result = $this->callAPIFailure('MailingContact', 'get', $params);
- }
-
- /**
- * Test that the API returns properly when there are no mailings
- * for a the given contact
- */
- public function testMailingContactNoMailings() {
- $params = array(
- 'contact_id' => $this->_contact['id'],
- );
- $result = $this->callAPISuccess('MailingContact', 'get', $params);
- $this->assertEquals($result['count'], 0, "In line " . __LINE__);
- $this->assertTrue(empty($result['values']), "In line " . __LINE__);
- }
-
- /*
+ public function testMailingContactInvalidContactID() {
+ $params = array('contact_id' => 'This is not a number',);
+ $result = $this->callAPIFailure('MailingContact', 'get', $params);
+ }
+
+ /**
+ * Test that invalid types are returned with appropriate errors
+ */
+ public function testMailingContactInvalidType() {
+ $params = array(
+ 'contact_id' => 23,
+ 'type' => 'invalid',
+ );
+ $result = $this->callAPIFailure('MailingContact', 'get', $params);
+ }
+
+ /**
+ * Test that the API returns properly when there are no mailings
+ * for a the given contact
+ */
+ public function testMailingContactNoMailings() {
+ $params = array(
+ 'contact_id' => $this->_contact['id'],
+ );
+ $result = $this->callAPISuccess('MailingContact', 'get', $params);
+ $this->assertEquals($result['count'], 0, "In line " . __LINE__);
+ $this->assertTrue(empty($result['values']), "In line " . __LINE__);
+ }
+
+ /**
* Test that the API returns a mailing properly when there is only one
*/
- public function testMailingContactDelivered() {
- $op = new PHPUnit_Extensions_Database_Operation_Insert();
- //Create the User
- $op->execute($this->_dbconn,
- $this->createXMLDataSet(
- dirname(__FILE__) . '/dataset/mailing_contact.xml'
- )
- );
- //~ Create the Mailing and connections to the user
- $op->execute($this->_dbconn,
- $this->createXMLDataSet(
- dirname(__FILE__) . '/dataset/mailing_delivered.xml'
- )
- );
-
- $params = array(
- 'contact_id' => 23,
- 'type' => 'Delivered',
- );
-
- $result = $this->callAPISuccess('MailingContact', 'get', $params);
- $count = $this->callAPISuccess('MailingContact', 'getcount', $params);
- $this->assertEquals($result['count'], 1, "In line " . __LINE__);
- $this->assertEquals($count, 1, "In line " . __LINE__);
- $this->assertFalse(empty($result['values']), "In line " . __LINE__);
- $this->assertEquals($result['values'][1]['mailing_id'], 1, "In line " . __LINE__);
- $this->assertEquals($result['values'][1]['subject'], "Some Subject", "In line " . __LINE__);
- $this->assertEquals($result['values'][1]['creator_id'], 1, "In line " . __LINE__);
- $this->assertEquals($result['values'][1]['creator_name'], "xyz1, abc1", "In line " . __LINE__);
- }
-
-
- /*
- * Test that the API returns only the "Bounced" mailings when instructed to do so
- */
- function testMailingContactBounced( ) {
- $op = new PHPUnit_Extensions_Database_Operation_Insert();
- //Create the User
- $op->execute($this->_dbconn,
- $this->createXMLDataSet(
- dirname(__FILE__) . '/dataset/mailing_contact.xml'
- )
- );
- //~ Create the Mailing and connections to the user
- $op->execute($this->_dbconn,
- $this->createXMLDataSet(
- dirname(__FILE__) . '/dataset/mailing_bounced.xml'
- )
- );
-
- $params = array(
- 'contact_id' => 23,
- 'type' => 'Bounced',
- );
-
- $result = $this->callAPISuccess('MailingContact', 'get', $params);
- $this->assertEquals($result['count'], 1, "In line " . __LINE__);
- $this->assertFalse(empty($result['values']), "In line " . __LINE__);
- $this->assertEquals($result['values'][2]['mailing_id'], 2, "In line " . __LINE__);
- $this->assertEquals($result['values'][2]['subject'], "Some Subject", "In line " . __LINE__);
- $this->assertEquals($result['values'][2]['creator_id'], 1, "In line " . __LINE__);
- $this->assertEquals($result['values'][2]['creator_name'], "xyz1, abc1", "In line " . __LINE__);
- }
+ public function testMailingContactDelivered() {
+ $op = new PHPUnit_Extensions_Database_Operation_Insert();
+ //Create the User
+ $op->execute($this->_dbconn,
+ $this->createXMLDataSet(
+ dirname(__FILE__) . '/dataset/mailing_contact.xml'
+ )
+ );
+ //~ Create the Mailing and connections to the user
+ $op->execute($this->_dbconn,
+ $this->createXMLDataSet(
+ dirname(__FILE__) . '/dataset/mailing_delivered.xml'
+ )
+ );
+
+ $params = array(
+ 'contact_id' => 23,
+ 'type' => 'Delivered',
+ );
+
+ $result = $this->callAPISuccess('MailingContact', 'get', $params);
+ $count = $this->callAPISuccess('MailingContact', 'getcount', $params);
+ $this->assertEquals($result['count'], 1, "In line " . __LINE__);
+ $this->assertEquals($count, 1, "In line " . __LINE__);
+ $this->assertFalse(empty($result['values']), "In line " . __LINE__);
+ $this->assertEquals($result['values'][1]['mailing_id'], 1, "In line " . __LINE__);
+ $this->assertEquals($result['values'][1]['subject'], "Some Subject", "In line " . __LINE__);
+ $this->assertEquals($result['values'][1]['creator_id'], 1, "In line " . __LINE__);
+ $this->assertEquals($result['values'][1]['creator_name'], "xyz1, abc1", "In line " . __LINE__);
+ }
+
+
+ /**
+ * Test that the API returns only the "Bounced" mailings when instructed to do so
+ */
+ function testMailingContactBounced( ) {
+ $op = new PHPUnit_Extensions_Database_Operation_Insert();
+ //Create the User
+ $op->execute($this->_dbconn,
+ $this->createXMLDataSet(
+ dirname(__FILE__) . '/dataset/mailing_contact.xml'
+ )
+ );
+ //~ Create the Mailing and connections to the user
+ $op->execute($this->_dbconn,
+ $this->createXMLDataSet(
+ dirname(__FILE__) . '/dataset/mailing_bounced.xml'
+ )
+ );
+
+ $params = array(
+ 'contact_id' => 23,
+ 'type' => 'Bounced',
+ );
+
+ $result = $this->callAPISuccess('MailingContact', 'get', $params);
+ $this->assertEquals($result['count'], 1, "In line " . __LINE__);
+ $this->assertFalse(empty($result['values']), "In line " . __LINE__);
+ $this->assertEquals($result['values'][2]['mailing_id'], 2, "In line " . __LINE__);
+ $this->assertEquals($result['values'][2]['subject'], "Some Subject", "In line " . __LINE__);
+ $this->assertEquals($result['values'][2]['creator_id'], 1, "In line " . __LINE__);
+ $this->assertEquals($result['values'][2]['creator_name'], "xyz1, abc1", "In line " . __LINE__);
+ }
}
);
$result = $this->callAPISuccess('membership_status', 'delete', $params);
}
- /*
- * Test that trying to delete membership status while membership still exists creates error
- */
+
+ /**
+ * Test that trying to delete membership status while membership still exists creates error
+ */
function testDeleteWithMembershipError() {
$membershipStatusID = $this->membershipStatusCreate();
$this->_contactID = $this->individualCreate();
$result = $this->callAPIAndDocument('option_value', 'get', $params, __FUNCTION__, __FILE__);
$this->assertGreaterThan(1, $result['count'], 'In line ' . __LINE__);
}
- /*
- * test that using option_group_name returns more than 1 & less than all
- */
-
-
+ /**
+ * test that using option_group_name returns more than 1 & less than all
+ */
public function testGetOptionGroupByName() {
$activityTypesParams = array('option_group_name' => 'activity_type', 'option.limit' => 100);
$params = array('option.limit' => 100);
$this->assertGreaterThan(1, $activityTypes['count'], 'In line ' . __LINE__);
$this->assertGreaterThan($activityTypes['count'], $result['count'], 'In line ' . __LINE__);
}
+
public function testGetOptionDoesNotExist() {
$result = $this->callAPISuccess('option_value', 'get', array('label' => 'FSIGUBSFGOMUUBSFGMOOUUBSFGMOOBUFSGMOOIIB'));
$this->assertEquals(0, $result['count'], 'In line ' . __LINE__);
}
-/*
- * Check that domain_id is honoured
- */
+
+ /**
+ * Check that domain_id is honoured
+ */
public function testCreateOptionSpecifyDomain() {
$result = $this->callAPISuccess('option_group', 'get', array(
'name' => 'from_email_address',
));
$this->assertEquals(2, $domain_id);
}
- /*
+
+ /**
* Check that component_id is honoured
- */
+ */
public function testCreateOptionSpecifyComponentID() {
$result = $this->callAPISuccess('option_group', 'get', array(
'name' => 'from_email_address',
));
$this->assertEquals(2, $component_id);
}
- /*
+
+ /**
* Check that component continues to be honoured
- */
+ */
public function testCreateOptionSpecifyComponent() {
$result = $this->callAPISuccess('option_group', 'get', array(
'name' => 'from_email_address',
));
$this->assertEquals(2, $component_id);
}
- /*
+
+ /**
* Check that component string is honoured
- */
+ */
public function testCreateOptionSpecifyComponentString() {
$result = $this->callAPISuccess('option_group', 'get', array(
'name' => 'from_email_address',
));
$this->assertEquals(2, $component_id);
}
- /*
+
+ /**
* Check that domain_id is honoured
- */
+ */
public function testCRM12133CreateOptionWeightNoValue() {
$optionGroup = $this->callAPISuccess(
'option_group', 'get', array(
$this->callAPISuccess('option_value', 'delete', array('id' => $optionValue2['id']));
}
- /*
+ /**
* Check that domain_id is honoured
- */
+ */
public function testCreateOptionNoName() {
$optionGroup = $this->callAPISuccess('option_group', 'get', array(
'name' => 'gender',
}
- /*
+ /**
* update option value with 'id' paramter and the value to update
* and not passing option group id
*/
$this->assertEquals($val, 0, "update with no group id is not proper" . __LINE__);
}
- /*
+ /**
* update option value with 'id' paramter and the value to update
* and as well as option group id
*/
}
/**
- * @param $params
+ * @param array $params
* @param $context
*/
function _checkFinancialRecords($params, $context) {
$this->assertEquals($result['values'][$this->_participantID]['participant_source'], 'Wimbeldon');
$this->assertEquals($this->_eventID, $result['values'][$this->_participantID]['api.event.get']['id']);
}
- /*
- * Check Participant Get respects return properties
- */
+
+ /**
+ * Check Participant Get respects return properties
+ */
function testGetWithReturnProperties() {
$params = array(
'contact_id' => $this->_contactID, 'return.status_id' => 1,
// assertDBState compares expected values in $match to actual values in the DB
$this->assertDBState('CRM_Event_DAO_Participant', $participant['id'], $params);
}
- /*
- * Test to check if receive date is being changed per CRM-9763
- */
+
+ /**
+ * Test to check if receive date is being changed per CRM-9763
+ */
function testCreateUpdateReceiveDate() {
$participant = $this->callAPISuccess('participant', 'create', $this->_params);
$update = array(
$this->callAPISuccess('participant', 'create', $update);
$this->getAndCheck(array_merge($this->_params, $update), $participant['id'], 'participant');
}
- /*
- * Test to check if participant fee level is being changed per CRM-9781
- */
+
+ /**
+ * Test to check if participant fee level is being changed per CRM-9781
+ */
function testCreateUpdateParticipantFeeLevel() {
$myParams = $this->_params + array('participant_fee_level' => CRM_Core_DAO::VALUE_SEPARATOR . "fee" . CRM_Core_DAO::VALUE_SEPARATOR);
$participant = $this->callAPISuccess('participant', 'create', $myParams);
}
/**
- * Test the line items for participant fee with multiple price field values.
- */
+ * Test the line items for participant fee with multiple price field values.
+ */
function testCreateParticipantLineItems() {
// Create a price set for this event.
$participant = $this->callAPIFailure('participant', 'delete', $params);
$this->assertNotNull($participant['error_message']);
}
- /*
- * delete with a get - a 'criteria delete'
- */
+
+ /**
+ * delete with a get - a 'criteria delete'
+ */
function testNestedDelete() {
$description = "Criteria delete by nesting a GET & a DELETE";
$subfile = "NestedDelete";
$check = $this->callAPISuccess('participant', 'getcount', array());
$this->assertEquals(1, $check,"only one participant should be left. line " . __LINE__);
}
- /*
- * Test creation of a participant with an associated contribution
- */
+
+ /**
+ * Test creation of a participant with an associated contribution
+ */
function testCreateParticipantWithPayment() {
$description = "single function to create contact w partipation & contribution. Note that in the
case of 'contribution' the 'create' is implied (api.contribution.create)";
$this->assertEquals(5, $result['count'], " in line " . __LINE__);
}
- /*
- * Test that passing in a single variable works
- */
+ /**
+ * Test that passing in a single variable works
+ */
function testGetSinglePledgePayment() {
-
-
$createparams = array(
'contact_id' => $this->_individualId,
'pledge_id' => $this->_pledgeID,
$this->assertEquals(1, $result['count'], " in line " . __LINE__);
}
- /*
- * Test that passing in a single variable works:: status_id
- */
+ /**
+ * Test that passing in a single variable works:: status_id
+ */
function testGetSinglePledgePaymentByStatusID() {
-
-
$createparams = array(
'contact_id' => $this->_individualId,
'pledge_id' => $this->_pledgeID,
$this->assertEquals(1, $result['count'], " in line " . __LINE__);
}
- /*
- * Test that creating a payment will add the contribution ID
- */
+ /**
+ * Test that creating a payment will add the contribution ID
+ */
function testCreatePledgePayment() {
//check that 5 pledge payments exist at the start
$beforeAdd = $this->callAPISuccess('pledge_payment', 'get', array());
$this->assertEquals($this->_contributionID, $getIndPaymentAgain['values'][$result['id']]['contribution_id'], " in line " . __LINE__);
}
- /*
- * test checks behaviour when more payments are created than should be possible
- */
+ /**
+ * test checks behaviour when more payments are created than should be possible
+ */
function testCreatePledgePaymentAllCreated() {
$params = array(
'pledge_id' => $this->_pledgeID,
$this->assertEquals(6, $result['count']);
}
- /*
- * Test that creating a payment will add the contribution ID where only one pledge payment
- * in schedule
- */
- function testCreatePledgePaymentWhereOnlyOnePayment() {
+ /**
+ * Test that creating a payment will add the contribution ID where only one pledge payment
+ * in schedule
+ */
+ function testCreatePledgePaymentWhereOnlyOnePayment() {
$pledgeParams = array(
'contact_id' => $this->_individualId,
'pledge_create_date' => date('Ymd'),
}
- /*
- * Test creation of pledge with only one payment.
- *
- * Pledge status id left empty as it is not a required field
- * http://issues.civicrm.org/jira/browse/CRM-8551
- *
- */
+ /**
+ * Test creation of pledge with only one payment.
+ *
+ * Pledge status id left empty as it is not a required field
+ * http://issues.civicrm.org/jira/browse/CRM-8551
+ *
+ */
function testCreatePledgeSinglePayment() {
$params = array(
'scheduled_date' => '20110510',
$pledge = $this->callAPISuccess('pledge', 'delete', $pledgeID);
}
- /*
- * test that status is set to pending
- */
+ /**
+ * test that status is set to pending
+ */
function testCreatePledgeNoStatus() {
$params = $this->_params;
$pledge = $this->callAPISuccess('pledge', 'delete', $pledgeID);
}
- //To Update Pledge
+ /**
+ * To Update Pledge
+ */
function testCreateUpdatePledge() {
-
// we test 'sequential' param here too
$pledgeID = $this->pledgeCreate($this->_individualId);
$old_params = array(
$this->assertEquals($pledge['values'][$pledgeID]['pledge_status'], 'Cancelled', 'In line ' . __LINE__);
$pledge = $this->callAPISuccess('pledge', 'delete', $new_params);
}
-/**
- * Here we ensure we are maintaining our 'contract' & supporting previously working syntax
- * ie contribution_type_id
- *
- */
+
+ /**
+ * Here we ensure we are maintaining our 'contract' & supporting previously working syntax
+ * ie contribution_type_id
+ */
function testCreateUpdatePledgeLegacy() {
// we test 'sequential' param here too
$pledge = $this->callAPIFailure('pledge', 'delete', $params, 'Mandatory key(s) missing from params array: id');
}
- /*
- * legacy support for pledge_id
- */
+ /**
+ * legacy support for pledge_id
+ */
function testDeletePledge() {
$pledgeID = $this->pledgeCreate($this->_individualId);
$result = $this->callAPIAndDocument('pledge', 'delete', $params, __FUNCTION__, __FILE__);
}
- /*
- * std is to accept id
- */
+ /**
+ * std is to accept id
+ */
function testDeletePledgeUseID() {
$pledgeID = $this->pledgeCreate($this->_individualId);
);
$result = $this->callAPIAndDocument('pledge', 'delete', $params, __FUNCTION__, __FILE__);
}
- /*
- * test to make sure empty get returns nothing
- * Note that the function gives incorrect results if no pledges exist as it does a
- * contact search instead - test only checks that the get finds the one existing
- */
+
+ /**
+ * test to make sure empty get returns nothing
+ * Note that the function gives incorrect results if no pledges exist as it does a
+ * contact search instead - test only checks that the get finds the one existing
+ */
function testGetEmpty() {
$result = $this->callAPISuccess('pledge', 'create', $this->_params);
$result = $this->callAPISuccess('pledge', 'get', array());
'Invalid Activity Id (aid).');
}
- /*
- * check contact activity profile with wrong activity type
- */
+ /**
+ * check contact activity profile with wrong activity type
+ */
function testContactActivityGetWrongActivityType() {
//flush cache by calling with reset
$activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, TRUE, 'name', TRUE);
);
}
- /*
- * check contact activity profile with success
- */
+ /**
+ * check contact activity profile with success
+ */
function testContactActivityGetSuccess() {
list($params, $expected) = $this->_createContactWithActivity();
$this->assertEquals('defaultValue', $result['values']['custom_1']['default_value']);
$this->assertFalse(array_key_exists('participant_status', $result['values']));
}
+
/**
* Check getfields works & gives us our fields - partipant profile
*/
);
}
}
- /*
- * check contact activity profile without activity id
- */
+
+ /**
+ * check contact activity profile without activity id
+ */
function testContactActivitySubmitWithoutActivityId() {
list($params, $expected) = $this->_createContactWithActivity();
$this->assertEquals($result['error_message'], 'Mandatory key(s) missing from params array: activity_id');
}
- /*
- * check contact activity profile wrong activity id
- */
+ /**
+ * check contact activity profile wrong activity id
+ */
function testContactActivitySubmitWrongActivityId() {
list($params, $expected) = $this->_createContactWithActivity();
$params = array_merge($params, $expected);
$this->assertEquals($result['error_message'], 'Invalid Activity Id (aid).');
}
- /*
- * check contact activity profile with wrong activity type
- */
+ /**
+ * check contact activity profile with wrong activity type
+ */
function testContactActivitySubmitWrongActivityType() {
//flush cache by calling with reset
$activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, TRUE, 'name', TRUE);
'This activity cannot be edited or viewed via this profile.');
}
- /*
- * check contact activity profile with success
- */
+ /**
+ * check contact activity profile with success
+ */
function testContactActivitySubmitSuccess() {
list($params, $expected) = $this->_createContactWithActivity();
}
}
- /*
- * Helper function to create an Individual with address/email/phone info. Import UF Group and UF Fields
- */
/**
+ * Helper function to create an Individual with address/email/phone info. Import UF Group and UF Fields
* @param array $params
*
* @return mixed
parent::setUp();
$params = array(
'name' => 'Default Domain Name',
- );
+ );
$result = $this->callAPISuccess( 'domain','get',$params);
if(empty($result['id'])){
$result = $this->callAPISuccess( 'domain','create',$params );
$description = "shows setting a variable for a given domain - if no domain is set current is assumed";
$params = array(
- 'domain_id' => $this->_domainID2,
- 'uniq_email_per_site' => 1,
+ 'domain_id' => $this->_domainID2,
+ 'uniq_email_per_site' => 1,
);
$result = $this->callAPIAndDocument('setting', 'create', $params, __FUNCTION__, __FILE__);
* check getfields works
*/
function testCreateInvalidSettings() {
+ $params = array(
+ 'domain_id' => $this->_domainID2,
+ 'invalid_key' => 1,
+ );
+ $result = $this->callAPIFailure('setting', 'create', $params);
+ }
+ /**
+ * check invalid settings rejected -
+ */
+ function testCreateInvalidURLSettings() {
$params = array(
- 'domain_id' => $this->_domainID2,
- 'invalid_key' => 1,
+ 'domain_id' => $this->_domainID2,
+ 'userFrameworkResourceURL' => 'dfhkdhfd',
);
$result = $this->callAPIFailure('setting', 'create', $params);
- }
-
- /**
- * check invalid settings rejected -
- */
-
- function testCreateInvalidURLSettings() {
-
- $params = array(
- 'domain_id' => $this->_domainID2,
- 'userFrameworkResourceURL' => 'dfhkdhfd',
- );
- $result = $this->callAPIFailure('setting', 'create', $params);
- $params = array(
- 'domain_id' => $this->_domainID2,
- 'userFrameworkResourceURL' => 'http://blah.com',
- );
- $result = $this->callAPISuccess('setting', 'create', $params);
- }
-
- /**
- * check getfields works
- */
- function testCreateInvalidBooleanSettings() {
-
- $params = array(
- 'domain_id' => $this->_domainID2,
- 'track_civimail_replies' => 'dfhkdhfd',
- );
- $result = $this->callAPIFailure('setting', 'create', $params);
-
- $params = array('track_civimail_replies' => '0',);
- $result = $this->callAPISuccess('setting', 'create', $params);
- $getResult = $this->callAPISuccess('setting','get',$params);
- $this->assertEquals(0, $getResult['values'][$this->_currentDomain]['track_civimail_replies']);
-
- $getResult = $this->callAPISuccess('setting','get',$params);
- $this->assertEquals(0, $getResult['values'][$this->_currentDomain]['track_civimail_replies']);
- $params = array( 'domain_id' => $this->_domainID2,
- 'track_civimail_replies' => '1',
- );
- $result = $this->callAPISuccess('setting', 'create', $params);
- $getResult = $this->callAPISuccess('setting','get',$params);
- $this->assertEquals(1, $getResult['values'][$this->_domainID2]['track_civimail_replies']);
-
- $params = array(
- 'domain_id' => $this->_domainID2,
- 'track_civimail_replies' => 'TRUE',
- );
- $result = $this->callAPISuccess('setting', 'create', $params);
- $getResult = $this->callAPISuccess('setting','get',$params);
-
- $this->assertEquals(1, $getResult['values'][$this->_domainID2]['track_civimail_replies'], "check TRUE is converted to 1");
-
-
- }
+ $params = array(
+ 'domain_id' => $this->_domainID2,
+ 'userFrameworkResourceURL' => 'http://blah.com',
+ );
+ $result = $this->callAPISuccess('setting', 'create', $params);
+ }
+
+ /**
+ * check getfields works
+ */
+ function testCreateInvalidBooleanSettings() {
+ $params = array(
+ 'domain_id' => $this->_domainID2,
+ 'track_civimail_replies' => 'dfhkdhfd',
+ );
+ $result = $this->callAPIFailure('setting', 'create', $params);
+
+ $params = array('track_civimail_replies' => '0',);
+ $result = $this->callAPISuccess('setting', 'create', $params);
+ $getResult = $this->callAPISuccess('setting','get',$params);
+ $this->assertEquals(0, $getResult['values'][$this->_currentDomain]['track_civimail_replies']);
+
+ $getResult = $this->callAPISuccess('setting','get',$params);
+ $this->assertEquals(0, $getResult['values'][$this->_currentDomain]['track_civimail_replies']);
+ $params = array( 'domain_id' => $this->_domainID2,
+ 'track_civimail_replies' => '1',
+ );
+ $result = $this->callAPISuccess('setting', 'create', $params);
+ $getResult = $this->callAPISuccess('setting','get',$params);
+ $this->assertEquals(1, $getResult['values'][$this->_domainID2]['track_civimail_replies']);
+
+ $params = array(
+ 'domain_id' => $this->_domainID2,
+ 'track_civimail_replies' => 'TRUE',
+ );
+ $result = $this->callAPISuccess('setting', 'create', $params);
+ $getResult = $this->callAPISuccess('setting','get',$params);
+
+ $this->assertEquals(1, $getResult['values'][$this->_domainID2]['track_civimail_replies'], "check TRUE is converted to 1");
+ }
/**
* check getfields works
$description = "shows setting a variable for all domains";
$params = array(
- 'domain_id' => 'all',
- 'uniq_email_per_site' => 1,
+ 'domain_id' => 'all',
+ 'uniq_email_per_site' => 1,
);
$result = $this->callAPIAndDocument('setting', 'create', $params, __FUNCTION__, __FILE__,$description, 'CreateAllDomains');
$this->assertEquals(1, $result['values'][3]['uniq_email_per_site'], 'failed to set setting for domain 3.');
$params = array(
- 'domain_id' => 'all',
- 'return' => 'uniq_email_per_site'
+ 'domain_id' => 'all',
+ 'return' => 'uniq_email_per_site'
);
// we'll check it with a 'get'
$description = "shows getting a variable for all domains";
$this->assertEquals(1, $result['values'][3]['uniq_email_per_site']);
$params = array(
- 'domain_id' => array(1,3),
- 'uniq_email_per_site' => 0,
+ 'domain_id' => array(1,3),
+ 'uniq_email_per_site' => 0,
);
$description = "shows setting a variable for specified domains";
$result = $this->callAPIAndDocument('setting', 'create', $params, __FUNCTION__, __FILE__,$description, 'CreateSpecifiedDomains');
$this->assertEquals(0, $result['values'][3]['uniq_email_per_site']);
$this->assertEquals(0, $result['values'][1]['uniq_email_per_site']);
$params = array(
- 'domain_id' => array(1,2),
- 'return' => array('uniq_email_per_site'),
+ 'domain_id' => array(1,2),
+ 'return' => array('uniq_email_per_site'),
);
$description = "shows getting a variable for specified domains";
$result = $this->callAPIAndDocument('setting', 'get', $params, __FUNCTION__, __FILE__,$description, 'GetSpecifiedDomains', 'Get');
}
function testGetSetting() {
-
$params = array(
'domain_id' => $this->_domainID2,
'return' => 'uniq_email_per_site',
$result = $this->callAPISuccess('setting', 'getvalue', array('name' => 'test_key', 'group' => 'Test Settings'));
$this->assertEquals('keyset', $result);
}
-/**
- * setting api should set & fetch settings stored in config as well as those in settings table
- */
+
+ /**
+ * setting api should set & fetch settings stored in config as well as those in settings table
+ */
function testSetConfigSetting() {
$config = CRM_Core_Config::singleton();
$this->assertFalse($config->debug == 1);
$dao->fetch();
$this->assertEquals($dao->c, 0);
}
+
/**
* setting api should set & fetch settings stored in config as well as those in settings table
*/
function testGetConfigSetting() {
$settings = $this->callAPISuccess('setting', 'get', array(
- 'name' => 'defaultCurrency', 'sequential' => 1,)
+ 'name' => 'defaultCurrency', 'sequential' => 1,)
);
$this->assertEquals('USD', $settings['values'][0]['defaultCurrency']);
}
*/
function testGetSetConfigSettingMultipleDomains() {
$settings = $this->callAPISuccess('setting', 'create', array(
- 'defaultCurrency' => 'USD', 'domain_id' => $this->_currentDomain)
+ 'defaultCurrency' => 'USD', 'domain_id' => $this->_currentDomain)
);
$settings = $this->callAPISuccess('setting', 'create', array(
- 'defaultCurrency' => 'CAD', 'domain_id' => $this->_domainID2)
+ 'defaultCurrency' => 'CAD', 'domain_id' => $this->_domainID2)
);
$settings = $this->callAPISuccess('setting', 'get', array(
- 'return' => 'defaultCurrency', 'domain_id' => 'all',
+ 'return' => 'defaultCurrency', 'domain_id' => 'all',
)
);
$this->assertEquals('USD', $settings['values'][$this->_currentDomain]['defaultCurrency']);
}
-/*
- * Use getValue against a config setting
- */
+ /**
+ * Use getValue against a config setting
+ */
function testGetValueConfigSetting() {
$params = array( 'name' => 'monetaryThousandSeparator',
'group' => 'Localization Setting',
$this->assertEquals("{contact.addressee}\n{contact.street_address}\n{contact.supplemental_address_1}\n{contact.supplemental_address_2}\n{contact.city}{, }{contact.state_province}{ }{contact.postal_code}\n{contact.country}", $result['values'][CRM_Core_Config::domainID()]['mailing_format']);
$this->assertArrayHasKey(CRM_Core_Config::domainID(), $result['values']);
}
- /*
+
+ /**
* Function tests reverting a specific parameter
*/
function testRevert() {
-
$params = array( 'address_format' => 'xyz',
'mailing_format' => 'bcs',
);
//make sure it's unchanged
$this->assertEquals('bcs', $result['values'][CRM_Core_Config::domainID()]['mailing_format']);
}
- /*
+
+ /**
* Tests reverting ALL parameters (specific domain)
*/
function testRevertAll() {
-
$params = array( 'address_format' => 'xyz',
- 'mailing_format' => 'bcs',
+ 'mailing_format' => 'bcs',
);
$result = $this->callAPISuccess('setting', 'create', $params);
$revertParams = array( );
$this->assertEquals("{contact.addressee}\n{contact.street_address}\n{contact.supplemental_address_1}\n{contact.supplemental_address_2}\n{contact.city}{, }{contact.state_province}{ }{contact.postal_code}\n{contact.country}", $result['values'][CRM_Core_Config::domainID()]['mailing_format']);
}
- /*
+ /**
* Tests filling missing params
- */
+ */
function testFill() {
$domparams = array(
'name' => 'B Team Domain',
- );
+ );
$dom = $this->callAPISuccess('domain', 'create', $domparams);
$params = array( 'domain_id' => 'all',
);
$result = $this->callAPISuccess('setting', 'get', $params);
$params = array( 'address_format' => 'xyz',
- 'mailing_format' => 'bcs',
- 'domain_id' => $this->_domainID2,
+ 'mailing_format' => 'bcs',
+ 'domain_id' => $this->_domainID2,
);
$result = $this->callAPISuccess('setting', 'create', $params);
$params = array( 'domain_id' => $dom['id'],
*
* @dataProvider entities_getlimit
*
- * @param $entityName
+ * @param string $entityName
*
- * @internal param string $entity
*/
function testLimit($entityName) {
$cases = array(); // each case is array(0 => $inputtedApiOptions, 1 => $expectedResultCount)
*
* @dataProvider entities_getSqlOperators
*
- * @param $entityName
+ * @param string $entityName
*
- * @internal param string $entity
*/
function testSqlOperators($entityName) {
$baoString = _civicrm_api3_get_BAO($entityName);
* @param $entityName
* @param int $count
*
- * @internal param $entityName
*
* @return array
*/
}
/**
- * @param $params
+ * @param array $params
* @param $context
*/
function _checkFinancialRecords($params, $context) {
}
/**
- * @param $params
+ * @param array $params
* @param $financialTypeId
*/
function _getFinancialAccountId($financialTypeId) {
}
}
- /*
- * Test verify mandatory - includes DAO & passed as well as empty & NULL fields
- */
+ /**
+ * Test verify mandatory - includes DAO & passed as well as empty & NULL fields
+ */
function testVerifyMandatory() {
_civicrm_api3_initialize(TRUE);
$params = array(
$this->fail('An expected exception has not been raised.');
}
- /*
- * Test verify one mandatory - includes DAO & passed as well as empty & NULL fields
- */
+ /**
+ * Test verify one mandatory - includes DAO & passed as well as empty & NULL fields
+ */
function testVerifyOneMandatory() {
_civicrm_api3_initialize(TRUE);
$params = array(
$this->fail('An expected exception has not been raised.');
}
- /*
- * Test verify one mandatory - includes DAO & passed as well as empty & NULL fields
- */
+ /**
+ * Test verify one mandatory - includes DAO & passed as well as empty & NULL fields
+ */
function testVerifyOneMandatoryOneSet() {
_civicrm_api3_initialize(TRUE);
$params = array('version' => 3, 'entity_table' => 'civicrm_contact', 'note' => 'note', 'contact_id' => $this->_contactID, 'modified_date' => '2011-01-31', 'subject' => NULL);
}
- /*
+ /**
* Test GET DAO function returns DAO
*/
function testGetDAO() {
$this->assertEquals($expected, $result);
}
}
- /*
+
+ /**
* Test GET BAO function returns BAO when it exists
*/
function testGetBAO() {
<?php
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
<?php
/**
- * @param $params
+ * @param array $params
*
* @return array
*/
}
/**
- * 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
*
- * @return object CRM_Auction_BAO_Auction object
+ * @return CRM_Auction_BAO_Auction object
* @access public
* @static
*/
}
/**
- * function to add the auction
+ * add the auction
*
* @param array $params reference array contains the values submitted by the form
*
}
/**
- * function to create the auction
+ * create the auction
*
* @param array $params reference array contains the values submitted by the form
*
}
/**
- * Function to delete the auction
+ * delete the auction
*
* @param int $id auction id
*
}
/**
- * 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
*
- * @return object CRM_Auction_BAO_Item object
+ * @return CRM_Auction_BAO_Item object
* @access public
* @static
*/
}
/**
- * function to add the auction
+ * add the auction
*
* @param array $params reference array contains the values submitted by the form
*
}
/**
- * function to create the auction
+ * create the auction
*
* @param array $params reference array contains the values submitted by the form
*
}
/**
- * Function to delete the auction
+ * delete the auction
*
* @param int $id auction id
*
protected $_numbers;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return None
* @access public
* @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
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
public $_donorID;
/**
- * Function to set variables up before form is built
+ * set variables up before form is built
*
* @return void
* @access public
}
/**
- * This function sets the default values for the form.
+ * Set default values for the form.
* the default values are retrieved from the database
*
* @access public
}
/**
- * Function to build the form
+ * Build the form object
*
* @return None
* @access public
* @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
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * Function to build the form
+ * Build the form object
*
* @return None
* @access public
* @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
}
/**
- * Function to process the form
+ * Process the form submission
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * Build the form
+ * Build the form object
*
* @access public
*
}
/**
- * @param $params
+ * @param array $params
* @param bool $sortBy
* @param $force
*
}
/**
- * @param $params
+ * @param array $params
* @param bool $sortBy
* @param $force
*
}
/**
- * @param $params
+ * @param array $params
* @param bool $sortBy
* @param $force
*
* @param array $params array or parameters determined by getfields
*/
/**
- * @param $params
+ * @param array $params
*/
function _civicrm_api3_multisite_domain_create_spec(&$params) {
$params['name']['api.required'] = 1;
}
}
- // CRM_Core_Error::debug_var( 'c', $contribution );
$contribution->save();
$transaction->commit();
return TRUE;
$input['component'] = strtolower($component);
- // CRM_Core_Error::debug_var( "$status, $component", $dataRoot );
$orderNo = $dataRoot['google-order-number']['VALUE'];
require_once 'CRM/Contribute/DAO/Contribution.php';
require_once 'CRM/Core/Transaction.php';
$transaction = new CRM_Core_Transaction();
- // CRM_Core_Error::debug_var( 'c', $contribution );
if ($status == 'PAYMENT_DECLINED' ||
$status == 'CANCELLED_BY_GOOGLE' ||
$status == 'CANCELLED'
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
function buildForm(&$form) {
ON assignment.assignee_contact_id = contact_c.id ";
}
- /*
- * WHERE clause is an array built from any required JOINS plus conditional filters based on search criteria field values
- *
- */
/**
+ * WHERE clause is an array built from any required JOINS plus conditional filters based on search criteria field values
+ *
* @param bool $includeContactIDs
*
* @return string
}
/*
- * Functions below generally don't need to be modified
- */
+ * Functions below generally don't need to be modified
+ */
+
/**
* @return mixed
*/
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
function buildForm(&$form) {
}
/**
- * @param $form
+ * @param CRM_Core_Form $form
*/
function buildForm(&$form) {
}
/**
- * @param $daoName
+ * @param string $daoName
*
* @return mixed
*/
<?php
/**
- * @param $params
+ * @param array $params
* @param $text
* @param $smarty
*