1. These annotations are useful in PHP4-style code.
2. These annotations are useless in PHP5-style code. Either they're redundant with the code, or they contradict the code.
3. In cases where there are contradictions, I don't think there's anyway for us to generally resolve the contradiction except to say, "The code is right."
4. As a developer reading .php files, I look at the code and *never* look at @access.
*
* @return boolean true if yes, else false
* @static
- * @access public
*/
public static function check($str, $contactID = NULL) {
if ($contactID == NULL) {
* this means it is handled by generating query
*
* @return string the group where clause for this user
- * @access public
*/
public static function whereClause($type,
&$tables,
* @param null $includedGroups
*
* @return array the ids of the groups for which the user has permissions
- * @access public
*/
public static function group(
$type,
* @param bool $flush
*
* @return array the ids of the groups for which the user has permissions
- * @access public
*/
public static function groupPermission(
$type,
* @param boolean $acl_role - For grant operations, this flag determines if we're granting a single acl (false) or an entire group.
*
* @return string - The WHERE clause, or 0 on failure
- * @access public
* @static
*/
public static function permissionClause(&$tables, $operation,
*
* @return string|null - WHERE-style clause to filter results,
* or null if $table or $id is null
- * @access public
* @static
*/
public static function getClause($table, $id, &$tables) {
* @param bool $hideEmpty only return elements that have a value set.
*
* @return array - Assoc. array of the ACL rule's properties
- * @access public
*/
public function toArray($format = '%s', $hideEmpty = false) {
$result = array();
* @param boolean $aclRoles - Should we include ACL Roles
*
* @return array - Array of assoc. arrays of ACL rules
- * @access public
* @static
*/
public static function &getACLs($contact_id = NULL, $group_id = NULL, $aclRoles = FALSE) {
* @param int $group_id - ID of a group to search for
*
* @return array - Array of assoc. arrays of ACL rules
- * @access public
* @static
*/
public static function &getACLRoles($contact_id = NULL, $group_id = NULL) {
* @param boolean $aclRoles - Include ACL Roles?
*
* @return array - Assoc array of ACL rules
- * @access public
* @static
*/
public static function &getGroupACLs($contact_id, $aclRoles = FALSE) {
* @param int $contact_id - ID of a contact to search for
*
* @return array - Array of assoc. arrays of ACL rules
- * @access public
* @static
*/
public static function &getGroupACLRoles($contact_id) {
* @param int $contact_id - The contact ID
*
* @return array - Assoc array of ACL rules
- * @access public
* @static
*/
public static function &getAllByContact($contact_id) {
*
* @param int $aclId ID of the ACL record to be deleted.
*
- * @access public
* @static
*/
public static function del($aclId) {
*
* @param int $entityRoleId ID of the EntityRole record to be deleted.
*
- * @access public
* @static
*/
public static function del($entityRoleId) {
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
/**
* Build the form object
*
- * @access public
* @return void
*/
public function buildQuickForm( ) {
/**
* Process the form submission
*
- * @access public
* @return void
*/
public function postProcess() {
* This function should be shared from a similar one in
* distmaker/utils/joomlaxml.php
*
- * @access public
* @return array civicrm permissions
*/
public static function getPermissionArray(){
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
* Browse all acls
*
* @return void
- * @access public
* @static
*/
public function browse() {
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
* Browse all acls
*
* @return void
- * @access public
* @static
*/
public function browse() {
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
* Browse all acls
*
* @return void
- * @access public
* @static
*/
public function browse() {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return boolean
- * @access public
*/
public static function dataExists(&$params) {
if (!empty($params['source_contact_id']) || !empty($params['id'])) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Activity_DAO_Activity object
- * @access public
*/
public static function retrieve(&$params, &$defaults) {
$activity = new CRM_Activity_DAO_Activity();
* @param bool $moveToTrash
*
* @return void
- * @access public
*/
public static function deleteActivity(&$params, $moveToTrash = FALSE) {
// CRM-9137
* @param int $recordTypeID
*
* @return null
- * @access public
*/
public static function deleteActivityContact($activityId, $recordTypeID = NULL) {
$activityContact = new CRM_Activity_BAO_ActivityContact();
* @param array $params associated array of the submitted values
*
* @throws CRM_Core_Exception
- * @access public
*
* @return $this|null|object
*/
*
* @return array (reference) $values the relevant data object values of open activities
*
- * @access public
* @static
*/
public static function &getActivities($input) {
*
* @return int count of activities
*
- * @access public
* @static
*/
public static function &getActivitiesCount($input) {
*
* @return int count of activities
*
- * @access public
* @static
*/
public static function getActivitySQLClause($input) {
* @param string $additionalDetails the additional information of CC and BCC appended to the activity Details
*
* @return array ( sent, activityId) if any email is sent and activityId
- * @access public
* @static
*/
static function sendEmail(
* @param int $userID
*
* @return mixed true on success or PEAR_Error object
- * @access public
* @static
*/
static function sendSMSMessage($toID,
* @param null $bcc
*
* @return boolean true if successfull else false.
- * @access public
* @static
*/
static function sendMessage($from,
* @param bool $status
*
* @return array array of importable Fields
- * @access public
* @static
*/
public static function &importableFields($status = FALSE) {
* @param int $contactId Id of the contact whose activities need to find
*
* @return array array of activity fields
- * @access public
*/
public static function getContactActivity($contactId) {
$activities = array();
*
* @return bool
* @static
- * @access public
*/
static function addActivity(&$activity,
$activityType = 'Membership Signup',
* @param int $activityId current activity id
*
* @return int $parentId Id of parent activity otherwise false.
- * @access public
*/
public static function getParentActivity($activityId) {
static $parentActivities = array();
* @param $activityID current activity id
*
* @return int $params count of prior activities otherwise false.
- * @access public
*/
public static function getPriorCount($activityID) {
static $priorCounts = array();
* @param bool $onlyPriorRevisions
*
* @return array $result prior activities info.
- * @access public
*/
public static function getPriorAcitivities($activityID, $onlyPriorRevisions = FALSE) {
static $priorActivities = array();
* @param int $activityID prior activity id
*
* @return int current activity id.
- * @access public
*/
public static function getLatestActivityId($activityID) {
static $latestActivityIds = array();
*
* @return $this|null|object
*
- * @access public
*/
public static function createFollowupActivity($activityId, $params) {
if (!$activityId) {
* @param array $params associated array
*
* @return void
- * @access public
*
*/
public static function restoreActivity(&$params) {
* @param string $name if it is called by case $name = Case else $name = Activity
*
* @return array array of exportable Fields
- * @access public
* @static
*/
public static function &exportableFields($name = 'Activity') {
* Get the allowed profile fields for Activities
*
* @return array array of activity profile Fields
- * @access public
*/
public static function getProfileFields() {
$exportableFields = self::exportableFields('Activity');
* @param int $contactId contactId
*
* @return true/null
- * @access public
*/
public static function cleanupActivity($contactId) {
$result = NULL;
* @param int $action edit/view
*
* @return boolean $allow true/false
- * @access public
*/
public static function checkPermission($activityId, $action) {
$allow = FALSE;
* @param array $params associated array for params record id.
*
* @return array $contactActivities associated array of contact activities
- * @access public
*/
public static function getContactActivitySelector(&$params) {
// format the params
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return object activity type of object that is added
- * @access public
*/
public static function create(&$params) {
$assignment = new CRM_Activity_BAO_ActivityContact();
*
* @return array
*
- * @access public
*/
public static function retrieveAssigneeIdsByActivityId($activity_id) {
$assigneeArray = array();
*
* @return array
*
- * @access public
*
*/
public static function getAssigneeNames($activityIDs, $isDisplayName = FALSE, $skipDetails = TRUE) {
* @param array $params the values for this table: activity id, contact id, record type
*
* @return object activity_contact object
- * @access public
*
*/
public static function create(&$params) {
*
* @return array
*
- * @access public
*/
public static function getNames($activityID, $recordTypeID, $alsoIDs = FALSE) {
$names = array();
*
* @return mixed
*
- * @access public
*/
public static function retrieveContactIdsByActivityId($activityID, $recordTypeID) {
$activityContact = array();
* array = if there are links defined for this table.
* empty array - if there is a links.ini file, but no links on this table
* null - if no links.ini exists for this database (hence try auto_links).
- * @access public
* @see DB_DataObject::getLinks(), DB_DataObject::getLink()
*/
/**
* @param array $params
*
* @return object activity type of object that is added
- * @access public
*/
public static function create(&$params) {
$target = new CRM_Activity_BAO_ActivityContact();
*
* @return mixed
*
- * @access public
*/
public static function retrieveTargetIdsByActivityId($activity_id) {
$targetArray = array();
*
* @return array
*
- * @access public
*/
public static function getTargetNames($activityID) {
$targetNames = array();
* @param array $contacts Array of contacts (attendees)
*
* @return string Array index of the added attachment in the $attachments array, or else null.
- * @access public
*/
public function addAttachment( &$attachments, $contacts ) {
// Check preferences setting
* @param $query
*
* @return void
- * @access public
*/
public static function select(&$query) {
if (!empty($query->_returnProperties['activity_id'])) {
* @param $query
*
* @return void
- * @access public
*/
public static function where(&$query) {
$grouping = NULL;
* @param $values
* @param $query
* @return void
- * @access public
*/
public static function whereClauseSingle(&$values, &$query) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* Getter for the qill object
*
* @return string
- * @access public
*/
public function qill() {
return (isset($this->_qill)) ? $this->_qill : "";
/**
* Add all the elements shared between case activity search and advanced search
*
- * @access public
*
* @param CRM_Core_Form $form
* @return void
* Build the form object
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_cdType = CRM_Utils_Array::value('type', $_GET);
* Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* @param $self
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
/**
* Process the form submission
*
- * @access public
*
* @param array $params
* @return array|null
* @param array $params associated array of submitted values
*
* @return $this|null|object
- * @access protected
*/
protected function processActivity(&$params) {
$activityAssigned = array();
/**
* Shorthand for getting id by display name (makes code more readable)
*
- * @access protected
*/
protected function _getIdByDisplayName($displayName) {
return CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact',
/**
* Shorthand for getting display name by id (makes code more readable)
*
- * @access protected
*/
protected function _getDisplayNameById($id) {
return CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact',
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
//get the activity values
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* The params that are sent to the query
*
* @var array
- * @access protected
*/
protected $_queryParams;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_single = FALSE;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_limit = NULL;
* The saved search ID retrieved from the GET vars
*
* @var int
- * @access protected
*/
protected $_ssID;
* Processing needed for buildForm and later
*
* @return void
- * @access public
*/
public function preProcess() {
$this->set('searchFormName', 'Search');
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* @param
*
* @return void
- * @access public
*/
public function postProcess() {
if ($this->_done) {
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Find Activities');
* @param
*
* @return void
- * @access public
*/
public function preProcess() {
self::preProcessCommon($this);
* @param bool $submitOnce
*
* @return void
- * @access public
*/
public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
$this->addButtons(array(
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
/*
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/ function preProcess() {
CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this);
parent::preProcess();
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
/*
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields) {
if ( !isset($fields['with_contact']) &&
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
/*
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields) {
return TRUE;
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preprocess();
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
class CRM_Activity_Import_Field {
/**#@+
- * @access protected
* @var string
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$session = CRM_Core_Session::singleton();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
//Setting Upload File Size
* Process the uploaded file
*
* @return void
- * @access public
*/
public function postProcess() {
$this->controller->resetPage('MapField');
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Upload Data');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_mapperFields = $this->get('fields');
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
//to save the current mappings
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields) {
$errors = array();
* preview the file and extract some summary statistics
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->controller->exportValues('MapField');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader');
* preview the file and extract some summary statistics
*
* @return void
- * @access public
*/
public function postProcess() {
$fileName = $this->controller->exportValue('DataSource', 'uploadFile');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
protected $_fileName;
/**#@+
- * @access protected
* @var integer
*/
* @param array mapped array of values
*
* @return void
- * @access public
*/
public function setActiveFields($fieldKeys) {
$this->_activeFieldCount = count($fieldKeys);
* Format the field values for input to the api
*
* @return array (reference ) associative array of name/value pairs
- * @access public
*/
public function &getActiveFieldParams() {
$params = array();
* @param int $mode
*
* @return void
- * @access public
*/
public function set($store, $mode = self::MODE_SUMMARY) {
$store->set('fileSize', $this->_fileSize);
* @param array $data
*
* @return void
- * @access public
*/
public static function exportCSV($fileName, $header, $data) {
$output = array();
* The initializer code, called before the processing
*
* @return void
- * @access public
*/
public function init() {
$activityContact = CRM_Activity_BAO_ActivityContact::import();
* @param array $values the array of values belonging to this line
*
* @return boolean
- * @access public
*/
public function mapField(&$values) {
return CRM_Import_Parser::VALID;
* @param array $values the array of values belonging to this line
*
* @return boolean the result of this processing
- * @access public
*/
public function preview(&$values) {
return $this->summary($values);
* @param array $values the array of values belonging to this line
*
* @return boolean the result of this processing
- * @access public
*/
public function summary(&$values) {
$erroneousField = NULL;
* @param array $values the array of values belonging to this line
*
* @return boolean the result of this processing
- * @access public
*/
public function import($onDuplicate, &$values) {
// first make sure this is a valid line
* The initializer code, called before the processing
*
* @return void
- * @access public
*/
public function fini() {}
*
* @return void
*
- * @access public
*/
public function browse() {
$this->assign('admin', FALSE);
* the contact and calls the appropriate type of page to view.
*
* @return void
- * @access public
*
*/
public function preProcess() {
*
* @return void
*
- * @access public
*/
public function run() {
$context = CRM_Utils_Request::retrieve('context', 'String', $this);
* List participations for the UF user
*
* return null
- * @access public
*/
public function listActivities() {
* loads, it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
parent::preProcess();
* ContactId - contact id of contact whose activies are displayed
*
* @var int
- * @access protected
*/
protected $_contactId;
* @param null $compContext
*
* @return array
- * @access public
*/
public static function actionLinks($activityTypeId,
$sourceRecordId = NULL,
* @param $action
* @param array $params
*
- * @access public
*/
public function getPagerParams($action, &$params) {
$params['status'] = ts('Activities %%StatusMessage%%');
* @param enum $output what should the result set include (web/email/csv)
*
* @return array the column headers that need to be displayed
- * @access public
*/
public function &getColumnHeaders($action = NULL, $output = NULL) {
if ($output == CRM_Core_Selector_Controller::EXPORT || $output == CRM_Core_Selector_Controller::SCREEN) {
* @param null $case
*
* @return int Total number of rows
- * @access public
*/
public function getTotalCount($action, $case = NULL) {
$params = array(
*
*
* @return array $_columnHeaders
- * @access private
*/
private static function &_getColumnHeaders() {
if (!isset(self::$_columnHeaders)) {
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_single = FALSE;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_limit = NULL;
/**
* What context are we being invoked from
*
- * @access protected
* @var string
*/
protected $_context = NULL;
/**
* What component context are we being invoked from
*
- * @access protected
* @var string
*/
protected $_compContext = NULL;
* the HTML_QuickForm_Controller for that page.
*
* @var array
- * @access protected
*/
public $_queryParams;
* Represent the type of selector
*
* @var int
- * @access protected
*/
protected $_action;
* @param $action
* @param array $params
*
- * @access public
*/
public function getPagerParams($action, &$params) {
$params['status'] = ts('Activities %%StatusMessage%%');
* @param
*
* @return int Total number of rows
- * @access public
*/
public function getTotalCount($action) {
return $this->_query->searchQuery(0, 0, NULL,
/**
* @return array $qill which contains an array of strings
- * @access public
*/
public function getQILL() {
return $this->_query->qill();
* @param enum $output what should the result set include (web/email/csv)
*
* @return array the column headers that need to be displayed
- * @access public
*/
public function &getColumnHeaders($action = NULL, $output = NULL) {
if (!isset(self::$_columnHeaders)) {
* @param string $formName
*
* @return string the name of the form that will handle the task
- * @access protected
*/
public function taskName($controller, $formName = 'Search') {
// total hack, check POST vars and then session to determine stuff
* Return the form name of the task
*
* @return string
- * @access public
*/
public function getTaskFormName() {
return CRM_Utils_String::getClassName($this->_task);
*
* @return array the set of tasks for a group of contacts
* @static
- * @access public
*/
public static function &tasks() {
if (!(self::$_tasks)) {
*
* @return array the set of task titles
* @static
- * @access public
*/
public static function &taskTitles() {
self::tasks();
* @param int $permission
*
* @return array set of tasks that are valid for the user
- * @access public
*/
public static function &permissionedTaskTitles($permission) {
$tasks = array();
*
* @return array the set of tasks for a group of activity
* @static
- * @access public
*/
public static function getTask($value) {
self::tasks();
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return array
*/
* Add standard buttons
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_action & CRM_Core_Action::VIEW || $this->_action & CRM_Core_Action::PREVIEW) {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* @param $self
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* For pre-processing
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Set default values for the form.
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
* @param array $self this object.
*
* @return true if no errors, else an array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* @param bool $check
*
* @return void
- * @access public
*/
public function buildQuickForm($check = FALSE) {
parent::buildQuickForm();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields) {
$errors = array();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Set default values for the form.
* The default values are retrieved from the database.
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Pre-process
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Set default values for the form.
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* @param array $self current form object.
*
* @return array array of errors / empty array.
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* @param bool $check
*
* @return void
- * @access public
*/
public function buildQuickForm($check = FALSE) {
parent::buildQuickForm();
/**
* Process the form submission
*
- * @access public
*
* @return Void
*/
* @param bool $check
*
* @return void
- * @access public
*/
public function buildQuickForm($check = FALSE) {
parent::buildQuickForm();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->applyFilter('__ALL__', 'trim');
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->add('checkbox', 'invoicing', ts('Enable Tax and Invoicing'));
* Set default values for the form.
* default values are retrieved from the database
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$wysiwyg_options = array('' => ts('Textarea')) + CRM_Core_OptionGroup::values('wysiwyg_editor');
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
* @return array if errors then list of errors to be posted back to the form,
* true otherwise
* @static
- * @access public
*/
public static function formRule($fields) {
$errors = array();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* @param array $fields the input form values
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Set default values for the form.
* default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$session = CRM_Core_Session::singleton();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
CRM_Utils_System::setTitle(ts('Settings - Enable Components'));
* @param array $options additional user data
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $options) {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
CRM_Utils_System::setTitle(ts('Settings - Date'));
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
CRM_Utils_System::setTitle(ts(' Settings - Debugging and Error Handling '));
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$config = CRM_Core_Config::singleton();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
CRM_Utils_System::setTitle(ts('Settings - CiviMail'));
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
CRM_Utils_System::setTitle(ts('Settings - Mapping and Geocoding Providers'));
* @param array $fields the input form values
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields) {
* @param null
*
* @return void
- * @access public
*/
public function addRules() {
$this->addFormRule(array('CRM_Admin_Form_Setting_Mapping', 'formRule'));
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
CRM_Utils_System::setTitle(ts('Misc (Undelete, PDFs, Limits, Logging, Captcha, etc.)'));
* @param array $options additional user data
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $options) {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
CRM_Utils_System::setTitle(ts('Settings - Upload Directories'));
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
CRM_Utils_System::setTitle(ts('Settings - Search Preferences'));
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields) {
if ($fields['outBound_option'] == CRM_Mailing_Config::OUTBOUND_OPTION_SMTP) {
* Set default values for the form.
* default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$config = CRM_Core_Config::singleton();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
CRM_Utils_System::setTitle(ts('Settings - Cleanup Caches and Update Paths'));
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
CRM_Utils_System::setTitle(ts('Settings - Resource URLs'));
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->setPageTitle($this->_isTagSet ? ts('Tag Set') : ts('Tag'));
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$config = CRM_Core_Config::singleton();
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($values) {
$errors = array();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
* Browse all event templates.
*
* @return void
- * @access public
* @static
*/
public function browse() {
* Obtains the group name from url and sets the title.
*
* @return void
- * @access public
*
*/
public function preProcess() {
*
*
* @return void
- * @access public
* @static
*/
public function browse() {
* @param int $mode mode that we are in
*
* @return string
- * @access public
*/
public function userContextParams($mode = NULL) {
return 'reset=1&action=browse';
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
* @param null $action
*
* @return void
- * @access public
* @static
*/
public function browse($action = NULL) {
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
* @param null $action
*
* @return void
- * @access public
* @static
*/
public function browse($action = NULL) {
* @param null $action
*
* @return void
- * @access public
* @static
*/
public function browse($action = NULL) {
* Browse all mail settings.
*
* @return void
- * @access public
* @static
*/
public function browse() {
* Browse all entities.
*
* @return void
- * @access public
*/
public function browse() {
$action = func_num_args() ? func_get_arg(0) : NULL;
* Sets the title.
*
* @return void
- * @access public
*
*/
public function preProcess() {
*
*
* @return void
- * @access public
* @static
*/
public function browse() {
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
* @param null $action
*
* @return void
- * @access public
* @static
*/
public function browse($action = NULL) {
* @param null $action
*
* @return void
- * @access public
* @static
*/
public function browse($action = NULL) {
*
*
* @return void
- * @access public
* @static
*/
public function browse() {
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
* @param null $action
*
* @return void
- * @access public
* @static
*/
public function browse($action = NULL) {
* @param array $layoutInfo associated array which contains meta data about format/layout
*
* @return void
- * @access public
*/
public function createLabels(&$participants, &$layoutInfo) {
$this->pdf = new CRM_Utils_PDF_Label($layoutInfo['format'], 'mm');
* @param null $h
*
* @return void
- * @access public
*/
public function printImage($img, $x = '', $y = '', $w = NULL, $h = NULL) {
if (!$x) {
* @param CRM_Core_Form $form
*
* @return void
- * @access public
* @static
*/
public static function buildBadges(&$params, &$form) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_DAO_PrintLabel object on success, null otherwise
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return Object DAO object on success, null otherwise
*
- * @access public
* @static
*/
public static function setIsActive($id, $is_active) {
*
* @param array $params reference array contains the values submitted by the form
*
- * @access public
* @static
*
* @return object
*
* @param int $printLabelId ID of the name label to be deleted.
*
- * @access public
* @static
*/
public static function del($printLabelId) {
* get the list of print labels
*
* @return array list of labels
- * @access public
* @static
*/
public static function getList() {
* @param array $params associated array of submitted values
*
* @return array $formattedLayout array formatted array
- * @access public
*/
public static function buildLayout(&$params) {
$layoutParams = array('id' => $params['badge_id']);
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_action & CRM_Core_Action::DELETE) {
* Set default values for the form. MobileProvider that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* @param string $context string
*
* @return object $batch batch object
- * @access public
*/
public static function create(&$params, $ids = NULL, $context = NULL) {
if (empty($params['id'])) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return array CRM_Batch_BAO_Batch object on success, null otherwise
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* Create entity batch entry
* @param array $params associated array
* @return batch array
- * @access public
*/
public static function addBatchEntity(&$params) {
$entityBatch = new CRM_Batch_DAO_EntityBatch();
* @param int $batchId batch id
*
* @return void
- * @access public
*/
public static function deleteBatch($batchId) {
// delete entry from batch table
* @param array $params associated array for params record id.
*
* @return array $batchList associated array of batch list
- * @access public
*/
public function getBatchListSelector(&$params) {
// format the params
* @param array $params associated array for params
*
* @return array
- * @access public
*/
public static function getBatchList(&$params) {
$whereClause = self::whereClause($params);
* @param array $params associated array for params
*
* @return null|string
- * @access public
*/
public static function getBatchCount(&$params) {
$args = array();
* @param array $params associated array for params
*
* @return string
- * @access public
*/
public static function whereClause($params) {
$clauses = array();
* @param null $context
*
* @return array $links array of action links
- * @access public
*/
public function links($context = NULL) {
if ($context == 'financialBatch') {
* @return void
*
* @static
- * @access public
*/
public static function exportFinancialBatch($batchIds, $exportFormat) {
if (empty($batchIds)) {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_batchId = CRM_Utils_Request::retrieve('id', 'Positive', $this, TRUE);
/**
* Build the form object
*
- * @access public
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($params, $files, $self) {
$errors = array();
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
*
* @param array $params associated array of submitted values
*
- * @access public
*
* @return void
*/
*
* @param array $params associated array of submitted values
*
- * @access public
*
* @return bool
*/
*
* @param array $value associated array of submitted values
*
- * @access public
*
* @return void
*/
* Browse all entities.
*
* @return void
- * @access public
*/
public function browse() {
$status = CRM_Utils_Request::retrieve('status', 'Positive', CRM_Core_DAO::$_nullObject, FALSE, 1);
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Campaign_DAO_Campaign object
- * @access public
* @static
*/
public static function create(&$params) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return \CRM_Campaign_DAO_Campaign|null
- * @access public
*/
public function retrieve(&$params, &$defaults) {
$campaign = new CRM_Campaign_DAO_Campaign();
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Campaign_BAO_Petition
- * @access public
* @static
*/
public function createSignature(&$params) {
* @param object $tag an object of a tag.
*
* @return array $contactIds array of contact ids
- * @access public
*/
public function getEntitiesByTag($tag) {
$contactIds = array();
* @param $query
*
* @return void
- * @access public
*/
public static function select(&$query) {
self::$_applySurveyClause = FALSE;
* Add all the elements shared between,
* normal voter search and voter listing (GOTV form)
*
- * @access public
*
* @param CRM_Core_Form $form
* @return void
* @param array $params (reference ) an assoc array of name/value pairs
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
- * @access public
*/
/**
* @param array $params
*
* @return CRM_Survey_DAO_Survey object
- * @access public
* @static
*/
public static function create(&$params) {
* @param int $id survey id
*
* @return mixed|null
- * @access public
* @static
*
*/
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return array
*/
* @param $errors
*
* @return bool|array
- * @access public
* @see valid_date
*/
public static function formRule($fields, $files, $errors) {
/**
* Form submission of new/edit campaign is processed.
*
- * @access public
*
* @return void
*/
* Are we forced to run a search
*
* @var int
- * @access protected
*/
protected $_force;
* Processing needed for buildForm and later
*
* @return void
- * @access public
*/ function preProcess() {
$this->_search = CRM_Utils_Array::value('search', $_GET);
$this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE);
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* @param null
*
* @return array array of default values
- * @access public
*/
public function setDefaultValues() {
$defaults = $this->_values;
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
* @param $errors
*
* @return void
- * @access public
* @see valid_date
*/
/**
* Form submission of petition signature
*
- * @access public
*
* @return void
*/
* @param bool $viewOnly
*
* @return void
- * @access public
*/
public function buildCustom($id, $name, $viewOnly = FALSE) {
if ($id) {
* The params that are sent to the query
*
* @var array
- * @access protected
*/
protected $_queryParams;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_single = FALSE;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_limit = NULL;
* Processing needed for buildForm and later
*
* @return void
- * @access public
*/ function preProcess() {
$this->_done = FALSE;
$this->_defaults = array();
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* @param
*
* @return void
- * @access public
*/
public function postProcess() {
if ($this->_done) {
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Find Respondents');
* Are we forced to run a search
*
* @var int
- * @access protected
*/
protected $_force;
* Processing needed for buildForm and later
*
* @return void
- * @access public
*/ function preProcess() {
$this->_search = CRM_Utils_Array::value('search', $_GET);
$this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE, FALSE);
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* Are we forced to run a search
*
* @var int
- * @access protected
*/
protected $_force;
* Processing needed for buildForm and later
*
* @return void
- * @access public
*/ function preProcess() {
$this->_search = CRM_Utils_Array::value('search', $_GET);
$this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE, FALSE);
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* Are we forced to run a search
*
* @var int
- * @access protected
*/
protected $_force;
* Processing needed for buildForm and later
*
* @return void
- * @access public
*/ function preProcess() {
$this->_search = CRM_Utils_Array::value('search', $_GET);
$this->_force = CRM_Utils_Request::retrieve('force', 'Boolean', $this, FALSE, FALSE);
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* @param null
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$session = CRM_Core_Session::singleton();
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
if (!CRM_Campaign_BAO_Campaign::accessCampaign()) {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* Process the form when submitted
*
* @return void
- * @access public
*/
public function postProcess() {
if ($this->_surveyId) {
* @param null
*
* @return array array of default values
- * @access public
*/
public function setDefaultValues() {
if ($this->_cdType) {
* @param null
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_cdType) {
* @param null
*
* @return void
- * @access public
*/
public function postProcess() {
// store the submitted values in an array
* @param null
*
* @return array array of default values
- * @access public
*/
public function setDefaultValues() {
$defaults = array();
* @param null
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$subTypeId = CRM_Core_DAO::getFieldValue('CRM_Campaign_DAO_Survey', $this->_surveyId, 'activity_type_id');
* @param null
*
* @return void
- * @access public
*/
public function postProcess() {
// store the submitted values in an array
* @param null
*
* @return array array of default values
- * @access public
*/
public function setDefaultValues() {
$defaults = $this->_values;
* @param null
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$optionGroups = CRM_Campaign_BAO_Survey::getResultSets();
* @param null
*
* @return void
- * @access public
*/
public function postProcess() {
// store the submitted values in an array
* @param null
*
* @return void
- * @access public
*/ function preProcess() {
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this);
* @param null
*
* @return array array of default values
- * @access public
*/
public function setDefaultValues() {
$defaults = parent::setDefaultValues();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* @param
*
* @return void
- * @access public
*/ function preProcess() {
$values = $this->controller->exportValues('Search');
* @param bool $submitOnce
*
* @return void
- * @access public
*/
public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
$this->addButtons(array(
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_votingTab = $this->get('votingTab');
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preprocess();
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/ function preProcess() {
$this->_interviewToRelease = $this->get('interviewToRelease');
if ($this->_interviewToRelease) {
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
/**
* Build the form object
*
- * @access public
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields, $files, $self) {
$errors = array();
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {}
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* @param int $petition_id
*
* @return boolean True on success
- * @access public
* @static
*/
public static function confirm($contact_id, $subscribe_id, $hash, $activity_id, $petition_id) {
* Obtains the group name from url and sets the title.
*
* @return void
- * @access public
*
*/
public function preProcess() {
*
*
* @return void
- * @access public
* @static
*/
public function browse() {
* @param int $mode mode that we are in
*
* @return string
- * @access public
*/
public function userContextParams($mode = NULL) {
return 'reset=1';
* DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
* Get all the survey activity types
*
- * @access public
*
* @param string $returnColumn
*
*
* The static array campaignType is returned
*
- * @access public
* @static
*
* @return array - array reference of all campaign types.
*
* The static array campaignStatus is returned
*
- * @access public
* @static
*
* @return array - array reference of all campaign status.
*
* The static array Engagement Level is returned
*
- * @access public
* @static
*
* @return array - array reference of all Engagement Level.
* Flush given pseudoconstant so it can be reread from db
* next time it's requested.
*
- * @access public
* @static
*
* @param bool|string $name pseudoconstant to be flushed
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_single = FALSE;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_limit = NULL;
/**
* What context are we being invoked from
*
- * @access protected
* @var string
*/
protected $_context = NULL;
* the HTML_QuickForm_Controller for that page.
*
* @var array
- * @access protected
*/
public $_queryParams;
* Represent the type of selector
*
* @var int
- * @access protected
*/
protected $_action;
* - Edit
*
* @return array
- * @access public
*
*/
static
* @param $action
* @param array $params
*
- * @access public
*/
public function getPagerParams($action, &$params) {
$params['csvString'] = NULL;
* @param
*
* @return int Total number of rows
- * @access public
*/
public function getTotalCount($action) {
return $this->_query->searchQuery(0, 0, NULL,
/**
* @return array $qill which contains an array of strings
- * @access public
**/
public function getQILL() {
return $this->_query->qill();
* @param enum $output what should the result set include (web/email/csv)
*
* @return array the column headers that need to be displayed
- * @access public
*/
public function &getColumnHeaders($action = NULL, $output = NULL) {
self::$_columnHeaders = array();
* @param string $formName
*
* @return string the name of the form that will handle the task
- * @access protected
*/
public function taskName($controller, $formName = 'Search') {
// total hack, check POST vars and then session to determine stuff
* Return the form name of the task
*
* @return string
- * @access public
*/
public function getTaskFormName() {
return CRM_Utils_String::getClassName($this->_task);
*
* @return array the set of tasks for a group of voters.
* @static
- * @access public
*/
public static function &tasks() {
if (!(self::$_tasks)) {
*
* @return array the set of task titles
* @static
- * @access public
*/
public static function &taskTitles() {
self::tasks();
* @param int $permission
*
* @return array set of tasks that are valid for the user
- * @access public
*/
public static function &permissionedTaskTitles($permission) {
$tasks = self::taskTitles();
*
* @return array the set of tasks for a group of voters.
* @static
- * @access public
*/
public static function getTask($value) {
self::tasks();
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Case_BAO_Case object
- * @access public
* @static
*/
public static function add(&$params) {
* @param array $ids the array that holds all the db ids
*
* @return CRM_Case_BAO_Case|null the found object or null
- * @access public
* @static
*/
public static function &getValues(&$params, &$values, &$ids) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Case_BAO_Case object
- * @access public
* @static
*/
public static function &create(&$params) {
* @param array case_id, contact_id
*
* @return object
- * @access public
*/
public static function addCaseToContact($params) {
$caseContact = new CRM_Case_DAO_CaseContact();
* @param int case_id
*
* @return Void
- * @access public
*/
public static function deleteCaseContact($caseID) {
$caseContact = new CRM_Case_DAO_CaseContact();
* @param array $ids (reference) the array that holds all the db ids
*
* @return CRM_Case_BAO_Case object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults, &$ids) {
*
* @param array $params (reference ) an assoc array of name/value pairs
*
- * @access public
* @static
*/
public static function processCaseActivity(&$params) {
* @param int $activityId activity id
*
* @return case subject or null
- * @access public
* @static
*/
public static function getCaseSubject($activityId) {
* @param string $colName
*
* @return case type
- * @access public
* @static
*/
public static function getCaseType($caseId, $colName = 'title') {
* @param bool $moveToTrash
*
* @return bool is successful
- * @access public
* @static
*/
public static function deleteCase($caseId, $moveToTrash = FALSE) {
* @param boolean $enable action
*
* @return void
- * @access public
* @static
*/
public static function enableDisableCaseRelationships($caseId, $enable) {
* @param int $activityId id of the activity
*
* @return void
- * @access public
* @static
*/
public static function deleteCaseActivity($activityId) {
* @param int $contactID
*
* @return array
- * @access public
*/
public static function retrieveContactIdsByCaseId($caseId, $contactID = NULL) {
$caseContact = new CRM_Case_DAO_CaseContact();
*
* @return array
*
- * @access public
*
*/
public static function getContactNames($caseId) {
*
* @return array
*
- * @access public
*/
public static function retrieveCaseIdsByContactId($contactID, $includeDeleted = FALSE, $caseType = NULL) {
$query = "
*
* @return array Array of Cases
*
- * @access public
*/
public static function getCases($allCases = TRUE, $userID = NULL, $type = 'upcoming', $context = 'dashboard') {
$condition = NULL;
* @param int $caseId
*
* @return void
- * @access public
*/
public static function sendActivityCopy($clientId, $activityId, $contacts, $attachments = NULL, $caseId) {
if (!$activityId) {
*
* @return array
*
- * @access public
*
*/
public static function getCaseActivityCount($caseId, $activityTypeId) {
*
* @return array $activityInfo Array of scheduled activity type and date
*
- * @access public
*
* @static
*/
* Combine all the exportable fields from the lower levels object
*
* @return array array of exportable Fields
- * @access public
* @static
*/
public static function &exportableFields() {
* @param int $caseId id of the case to restore
*
* @return true if success.
- * @access public
* @static
*/
public static function restoreCase($caseId) {
*
* @return an array of cases.
*
- * @access public
*/
public static function getContactCases($contactId, $excludeDeleted = TRUE) {
$cases = array();
*
* @return an array of related cases.
*
- * @access public
*/
public static function getRelatedCases($mainCaseId, $contactId, $excludeDeleted = TRUE) {
//FIXME : do check for permissions.
* @throws CRM_Core_Exception
*
* @return CRM_Case_BAO_CaseType object
- * @access public
* @static
*/
public static function add(&$params) {
* @param array $definition the case-type defintion expressed as an array-tree
* @return string XML
* @static
- * @access public
*/
public static function convertDefinitionToXML($name, $definition) {
$xmlFile = '<?xml version="1.0" encoding="utf-8" ?>' . "\n\n<CaseType>\n";
* @param array $values output values of the object
*
* @return CRM_Case_BAO_CaseType|null the found object or null
- * @access public
* @static
*/
public static function &getValues(&$params, &$values) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Case_BAO_CaseType object
- * @access public
* @static
*/
public static function &create(&$params) {
* in a hierarchical manner
*
* @return CRM_Case_BAO_CaseType object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param $query
*
* @return void
- * @access public
*/
public static function select(&$query) {
if (($query->_mode & CRM_Contact_BAO_Query::MODE_CASE) || !empty($query->_returnProperties['case_id'])) {
* @param $query
*
* @return void
- * @access public
*/
public static function where(&$query) {
foreach ($query->_params as $id => $values) {
* @param $query
*
* @return void
- * @access public
*/
public static function whereClauseSingle(&$values, &$query) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* Getter for the qill object
*
* @return string
- * @access public
*/
public function qill() {
return (isset($this->_qill)) ? $this->_qill : "";
/**
* Add all the elements shared between case search and advanaced search
*
- * @access public
*
* @param CRM_Core_Form $form
*
* Build the form object
*
* @return void
- * @access public
*/
public function preProcess() {
$caseIds = CRM_Utils_Request::retrieve('caseid', 'String', $this);
* Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* @param $self
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
/**
* Process the form submission
*
- * @access public
*
* @param array $params
*
* Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @param CRM_Core_Form $form
*
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($values, $files, $form) {
return TRUE;
/**
* Process the form submission
*
- * @access public
*
* @param CRM_Core_Form $form
* @param array $params
/**
* Process the form submission
*
- * @access public
*
* @param CRM_Core_Form $form
* @param array $params
* Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @param CRM_Core_Form $form
*
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($values, $files, $form) {
return TRUE;
/**
* Process the form submission
*
- * @access public
*
* @param CRM_Core_Form $form
* @param array $params
/**
* Process the form submission
*
- * @access public
*
* @param CRM_Core_Form $form
* @param array $params
* Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @param CRM_Core_Form $form
*
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($values, $files, $form) {
return TRUE;
/**
* Process the form submission
*
- * @access public
*
* @param CRM_Core_Form $form
* @param array $params
/**
* Process the form submission
*
- * @access public
*
* @param CRM_Core_Form $form
* @param array $params
* Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @param CRM_Core_Form $form
*
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($values, $files, $form) {
$errors = array();
/**
* Process the form submission
*
- * @access public
*
* @param CRM_Core_Form $form
* @param array $params
/**
* Process the form submission
*
- * @access public
*
* @param CRM_Core_Form $form
* @param array $params
* Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @param CRM_Core_Form $form
*
/**
* Process the form submission
*
- * @access public
*
* @param CRM_Core_Form $form
* @param array $params
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields, $files, $form) {
if ($form->_context == 'caseActivity') {
/**
* Process the form submission
*
- * @access public
*
* @param $form
* @param array $params
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$activityStatus = CRM_Core_PseudoConstant::activityStatus();
* Build all the data structures needed to build the form.
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_activityId = CRM_Utils_Request::retrieve('activityId', 'Positive', CRM_Core_DAO::$_nullObject);
* Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return array
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->add('text', 'file_on_case_unclosed_case_id', ts('Select Case'), array('class' => 'huge'), TRUE);
/**
* Process the view
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_cdType = CRM_Utils_Array::value('type', $_GET);
* Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($values, $files, $form) {
return TRUE;
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_showRelatedCases = CRM_Utils_Array::value('relatedCases', $_GET);
* Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
//this call is for show related cases.
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->controller->exportValues($this->_name);
* Entity sub type of the table id
*
* @var string
- * @access protected
*/
protected $_subTypeID;
*
* @return void
*
- * @access public
*
*/
public function preProcess() {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
// make this form an upload since we dont know if the custom data injected dynamically
/**
* Process the user submitted custom data values.
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
$cid = CRM_Utils_Request::retrieve('cid', 'Positive', $this, TRUE);
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addEntityRef('reassign_contact_id', ts('Select Contact'), array('create' => TRUE), TRUE);
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->controller->exportValues($this->_name);
* Build the form object
*
* @return void
- * @access public
*/ function preProcess() {
$this->_caseID = CRM_Utils_Request::retrieve('caseid', 'Integer', $this, TRUE);
$this->_clientID = CRM_Utils_Request::retrieve('cid', 'Integer', $this, TRUE);
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* The params that are sent to the query
*
* @var array
- * @access protected
*/
protected $_queryParams;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_single = FALSE;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_limit = NULL;
* Processing needed for buildForm and later
*
* @return void
- * @access public
*/
public function preProcess() {
$this->set('searchFormName', 'Search');
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* @param
*
* @return void
- * @access public
*/
public function postProcess() {
if ($this->_done) {
* All local rules are added near the element
*
* @return void
- * @access public
* @see valid_date
*/
public function addRules() {
*
* @return void
* @static
- * @access public
*/
public static function formRule($fields) {
$errors = array();
/**
* Set the default form values
*
- * @access protected
*
* @return array the default array reference
*/
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Find Cases');
* @param
*
* @return void
- * @access public
*/
public function preProcess() {
self::preProcessCommon($this);
* @param bool $submitOnce
*
* @return void
- * @access public
*/
public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
$this->addButtons(array(
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/ function preProcess() {
//check for delete
if (!CRM_Core_Permission::checkActionPermission('CiviCase', CRM_Core_Action::DELETE)) {
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preprocess();
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/ function preProcess() {
parent::preProcess();
}
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {}
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
* the contact and calls the appropriate type of page to view.
*
* @return void
- * @access public
*
*/
public function preProcess() {
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* View details of a case
*
* @return void
- * @access public
*/
public function view() {
$controller = new CRM_Core_Controller_Simple(
* This function is called when action is browse
*
* return null
- * @access public
*/
public function browse() {
* This function is called when action is update or new
*
* return null
- * @access public
*/
public function edit() {
$config = CRM_Core_Config::singleton();
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$contactID = CRM_Utils_Request::retrieve('cid', 'Positive', CRM_Core_DAO::$_nullArray);
/**
* Get all the case statues
*
- * @access public
*
* @param string $column
* @param bool $onlyActive
/**
* Get all the redaction rules
*
- * @access public
*
* @param null $filter
*
/**
* Get all the case type
*
- * @access public
*
* @param string $column
* @param bool $onlyActive
/**
* Get all the Encounter Medium
*
- * @access public
*
* @param string $column
* @param bool $onlyActive
*
* @param bool $all
*
- * @access public
* @static
*
* @return array - array reference of all activity types.
* Flush given pseudoconstant so it can be reread from db
* next time it's requested.
*
- * @access public
* @static
*
* @param bool|string $name pseudoconstant to be flushed
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_single = FALSE;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_limit = NULL;
/**
* What context are we being invoked from
*
- * @access protected
* @var string
*/
protected $_context = NULL;
* the HTML_QuickForm_Controller for that page.
*
* @var array
- * @access protected
*/
public $_queryParams;
* Represent the type of selector
*
* @var int
- * @access protected
*/
protected $_action;
* @param null $key
*
* @return array
- * @access public
*/
static
public function &links($isDeleted = FALSE, $key = NULL) {
* @param $action
* @param array $params
*
- * @access public
*/
public function getPagerParams($action, &$params) {
$params['status'] = ts('Case') . ' %%StatusMessage%%';
* @param
*
* @return int Total number of rows
- * @access public
*/
public function getTotalCount($action) {
return $this->_query->searchQuery(0, 0, NULL,
/**
* @return array $qill which contains an array of strings
- * @access public
*/
// the current internationalisation is bad, but should more or less work
* @param enum $output what should the result set include (web/email/csv)
*
* @return array the column headers that need to be displayed
- * @access public
*/
public function &getColumnHeaders($action = NULL, $output = NULL) {
if (!isset(self::$_columnHeaders)) {
* @param string $formName
*
* @return string the name of the form that will handle the task
- * @access protected
*/
public function taskName($controller, $formName = 'Search') {
// total hack, check POST vars and then session to determine stuff
* Return the form name of the task
*
* @return string
- * @access public
*/
public function getTaskFormName() {
return CRM_Utils_String::getClassName($this->_task);
*
* @return array the set of tasks for a group of contacts
* @static
- * @access public
*/
public static function &tasks() {
if (!self::$_tasks) {
*
* @return array the set of task titles
* @static
- * @access public
*/
public static function &taskTitles() {
self::tasks();
*
* @return array the set of optional tasks for a group of contacts
* @static
- * @access public
*/
public static function &optionalTaskTitle() {
$tasks = array();
* @param int $permission
*
* @return array set of tasks that are valid for the user
- * @access public
*/
public static function &permissionedTaskTitles($permission) {
$tasks = array();
*
* @return array the set of tasks for a group of contacts
* @static
- * @access public
*/
public static function getTask($value) {
self::tasks();
/**
* Class constructor
*
- * @access public
* @return \CRM_Contact_DAO_Contact
*/
/**
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Contact_BAO_Contact object
- * @access public
* @static
*/
public static function add(&$params) {
*
* @throws Exception
* @return CRM_Contact_BAO_Contact object
- * @access public
* @static
*/
public static function &create(&$params, $fixAddress = TRUE, $invokeHooks = TRUE, $skipDelete = FALSE) {
* @param bool $type
*
* @return array the displayName and contactImage for this contact
- * @access public
* @static
*/
public static function getDisplayAndImage($id, $type = FALSE) {
* @param boolean $reverse true if we want to resolve the values in the reverse direction (value -> name)
*
* @return void
- * @access public
* @static
*/
public static function resolveDefaults(&$defaults, $reverse = FALSE) {
* @param boolean $microformat for location in microformat
*
* @return CRM_Contact_BAO_Contact object
- * @access public
* @static
*/
public static function &retrieve(&$params, &$defaults, $microformat = FALSE) {
*
* @return null|string display name of the contact if found
* @static
- * @access public
*/
public static function displayName($id) {
$displayName = NULL;
* @param bool $skipUndelete whether to force contact delete or not
*
* @return boolean true if contact deleted, false otherwise
- * @access public
* @static
*/
public static function deleteContact($id, $restore = FALSE, $skipUndelete = FALSE) {
*
* @return string contact_type if $id found else null ""
*
- * @access public
*
* @static
*
*
* @return string contact_sub_type if $id found else null ""
*
- * @access public
*
* @static
*/
*
* @return array
*
- * @access public
*
* @static
*
* @param bool $withMultiCustomFields
*
* @return array array of importable Fields
- * @access public
* @static
*/
static function importableFields($contactType = 'Individual',
* @param bool $withMultiRecord
*
* @return array array of exportable Fields
- * @access public
* @static
*/
public static function &exportableFields($contactType = 'Individual', $status = FALSE, $export = FALSE, $search = FALSE, $withMultiRecord = FALSE) {
*
* @return $values array contains the contact details
* @static
- * @access public
*/
public static function getHierContactDetails($contactId, &$fields) {
$params = array(array('contact_id', '=', $contactId, 0, 0));
* @param int $contactId contact id
*
* @return array a hierarchical property tree if appropriate
- * @access public
* @static
*/
public static function &makeHierReturnProperties($fields, $contactId = NULL) {
* @param null $block
*
* @return int $locationType location_type_id
- * @access public
* @static
*/
public static function getPrimaryLocationType($contactId, $skipDefaultPriamry = FALSE, $block = NULL) {
*
* @return array of display_name, email if found, do_not_email or (null,null,null)
* @static
- * @access public
*/
public static function getContactDetails($id) {
// check if the contact type
*
* @return int contact id created/edited
* @static
- * @access public
*/
static function createProfileContact(
&$params,
*
* @return string $dao->email email address if present else null
* @static
- * @access public
*/
public static function getPrimaryEmail($contactID) {
// fetch the primary email
*
* @return string $dao->openid OpenID if present else null
* @static
- * @access public
*/
public static function getPrimaryOpenId($contactID) {
// fetch the primary OpenID
* @param array $values output values of the object
*
* @return CRM_Contact_BAO_Contact|null the found object or null
- * @access public
* @static
*/
public static function getValues(&$params, &$values) {
* @param string $tableName optional tableName if component is custom group
*
* @return total number of count of occurence in database
- * @access public
* @static
*/
public static function getCountComponent($component, $contactId, $tableName = NULL) {
* @param boolean $useDefaults use default greeting values
*
* @return void
- * @access public
* @static
*/
public static function processGreetings(&$contact, $useDefaults = FALSE) {
* @param int $contactId contact id.
*
* @return display name |null the found display name or null.
- * @access public
* @static
*/
public static function getMasterDisplayName($masterAddressId = NULL, $contactId = NULL) {
*
* @link https://issues.civicrm.org/jira/browse/CRM-15602
* @see triggerInfo
- * @access public
* @static
*/
public static function generateTimestampTriggers(&$info, $reqTableName, $relatedTableNames, $contactRefColumn) {
* @param int $contactId contact id.
*
* @return bool true if present else false.
- * @access public
* @static
*/
public static function checkDomainContact($contactId) {
*
* @return array of display_name, email, location type and location id if found, or (null,null,null, null)
* @static
- * @access public
*/
public static function getEmailDetails($id, $isPrimary = TRUE, $locationTypeID = NULL) {
$primaryClause = NULL;
*
* @return array tuple of display_name and sms if found, or (null,null)
* @static
- * @access public
*/
public static function getPhoneDetails($id, $type = NULL) {
if (!$id) {
*
* @return null|string display name of the contact if found
* @static
- * @access public
*/
public static function &getMapInfo($ids, $locationTypeID = NULL, $imageUrlOnly = FALSE) {
$idString = ' ( ' . implode(',', $ids) . ' ) ';
* @param int|string $type the type of operation (view|edit)
*
* @return boolean true if the user has permission, false otherwise
- * @access public
* @static
*/
public static function allow($id, $type = CRM_Core_Permission::VIEW) {
* @param boolean $force should we force a recompute
*
* @return void
- * @access public
* @static
*/
public static function cache($userID, $type = CRM_Core_Permission::VIEW, $force = FALSE) {
* @param int $contactID contact id
*
* @return boolean
- * @access public
* @static
*/
static function hasContactsInCache($type = CRM_Core_Permission::VIEW,
* @param boolean $addProfileOverlay if profile overlay class should be added
*
* @return string
- * @access public
* @static
*/
public static function getImage($contactType, $urlOnly = FALSE, $contactId = NULL, $addProfileOverlay = TRUE) {
*
* @return boolen true or false true if mix contact array else fale
*
- * @access public
* @static
*/
public static function checkContactType(&$contactIds) {
*
* @return array ( $cs, $ts, $live )
* @static
- * @access public
*/
public static function generateChecksum($entityId, $ts = NULL, $live = NULL, $hash = NULL, $entityType = 'contact', $hashSize = NULL) {
// return a warning message if we dont get a entityId
*
* @return boolean true if valid, else false
* @static
- * @access public
*/
public static function validChecksum($contactID, $inputCheck) {
*
* @return int $locationCount max locations for the contact
* @static
- * @access public
*/
public static function maxLocations($contactId) {
$contactLocations = array();
* @param int $previousEmployerID
* @param bool $newContact
*
- * @access public
* @static
*/
public static function createCurrentEmployerRelationship($contactID, $organization, $previousEmployerID = NULL, $newContact = FALSE) {
* @param int $previousEmpID
*
* @throws CiviCRM_API3_Exception
- * @access public
* @static
*/
public static function currentEmployerRelatedMembership($contactID, $employerID, $relationshipParams, $duplicate = FALSE, $previousEmpID = NULL) {
*
* @return array $contactViewLinks returns array with links to contact view
* @static
- * @access public
*/
public static function formatContactIDSToLinks($contactIDs, $addViewLink = TRUE, $addEditLink = TRUE, $originalId = NULL) {
$contactLinks = array();
*
* @return void
* @static
- * @access public
*/
public static function processSharedAddress(&$address) {
if (!is_array($address)) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Contact_BAO_ContactType object on success, null otherwise
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param int $contactTypeId ID of the Contact Subtype to be deleted.
*
* @return bool
- * @access public
* @static
*/
public static function del($contactTypeId) {
* @param array $params an assoc array of name/value pairs
*
* @return object
- * @access public
* @static
*/
public static function add(&$params) {
* @param array $subtypes - list of subtypes related to which entry is to be removed.
*
* @return void
- * @access public
*/
public static function deleteCustomRowsOfSubtype($gID, $subtypes = array()) {
if (!$gID or empty($subtypes)) {
* @param int $entityID - entity id.
*
* @return void
- * @access public
*/
public function deleteCustomRowsForEntityID($customTable, $entityID) {
$customTable = CRM_Utils_Type::escape($customTable, 'String');
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Contact_BAO_Group object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param int $id group id
*
* @return null
- * @access public
* @static
*
*/
* @param bool $countChildGroups
*
* @return int count of members in the group with above status
- * @access public
*/
public static function memberCount($id, $status = 'Added', $countChildGroups = FALSE) {
$groupContact = new CRM_Contact_DAO_GroupContact();
* @param bool $useCache
*
* @return array $aMembers this array contains the list of members for this group id
- * @access public
* @static
*/
public static function &getMember($groupID, $useCache = TRUE) {
*
* @return array of group objects.
*
- * @access public
*
* @todo other BAO functions that use returnProperties (e.g. Query Objects) receive the array flipped & filled with 1s and
* add in essential fields (e.g. id). This should follow a regular pattern like the others
* @param int $id the id of the object
*
* @return string the permission that the user has (or null)
- * @access public
* @static
*/
public static function checkPermission($id) {
* @param array $params Associative array of parameters
*
* @return object|null The new group BAO (if created)
- * @access public
* @static
*/
public static function &create(&$params) {
* @param array $params Associative array of parameters
*
* @return object|null The new group BAO (if created)
- * @access public
* @static
*/
public static function createSmartGroup(&$params) {
* @param array $params ( reference ) an assoc array of name/value pairs
*
* @return array ( smartGroupId, ssId ) smart group id and saved search id
- * @access public
* @static
*/
public static function createHiddenSmartGroup($params) {
* -page= offset
* @todo there seems little reason for the small number of functions that call this to pass in
* params that then need to be translated in this function since they are coding them when calling
- * @access public
*/
static public function getGroupListSelector(&$params) {
// format the params
* @param array $params associated array for params
*
* @return array
- * @access public
*/
public static function getGroupList(&$params) {
$config = CRM_Core_Config::singleton();
* @param bool $titleOnly
*
* @return array
- * @access public
*/
static function getGroupsHierarchy(
$groupIDs,
* Define action links
*
* @return array $links array of action links
- * @access public
*/
public static function actionLinks() {
$links = array(
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Contact_BAO_Group object
- * @access public
* @static
*/
public static function add(&$params) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return boolean
- * @access public
* @static
*/
public static function dataExists(&$params) {
* @param array $values output values of the object
*
* @return array (reference) the values that could be potentially assigned to smarty
- * @access public
* @static
*/
public static function getValues(&$params, &$values) {
* @param int $tracking
*
* @return array (total, added, notAdded) count of contacts added to group
- * @access public
* @static
*/
static function addContactsToGroup(
* @param null $tracking
*
* @return array (total, removed, notRemoved) count of contacts removed to group
- * @access public
* @static
*/
static function removeContactsFromGroup(
*
* @param bool $visibility
*
- * @access public
*
* @return array $values this array has key-> group id and value group title
* @static
* @param string $method If we want the subscription history details for a specific method
*
* @return object of group contact
- * @access public
* @static
*/
public static function getMembershipDetail($contactId, $groupID, $method = 'Email') {
*
*
* @return groupID
- * @access public
* @static
*/
public static function getGroupId($groupContactID) {
* @param string $method
*
* @return void
- * @access public
* @static
*/
public static function create(&$params, $contactId, $visibility = FALSE, $method = 'Admin') {
* @param null $tracking
*
* @return array (total, added, notAdded) count of contacts added to group
- * @access public
* @static
*/
static function bulkAddContactsToGroup(
*
*
* @return void
- * @access public
*/
public static function add($parentID, $childID) {
// TODO: Add checks here to make sure invalid nests can't be created
*
* @return void
*
- * @access public
*/
public static function remove($parentID, $childID) {
$dao = new CRM_Contact_DAO_GroupNesting();
*
* @return void
*
- * @access public
*/
public static function removeAllParentForChild($childID) {
$dao = new CRM_Contact_DAO_GroupNesting();
*
* @return boolean True if association is found, false otherwise.
*
- * @access public
*/
public static function isParentChild($parentID, $childID) {
$dao = new CRM_Contact_DAO_GroupNesting();
*
* @return boolean True if 1 or more child groups are found, false otherwise.
*
- * @access public
*/
public static function hasChildGroups($groupId) {
$dao = new CRM_Contact_DAO_GroupNesting();
*
* @return boolean True if 1 or more parent groups are found, false otherwise.
*
- * @access public
*/
public static function hasParentGroups($groupId) {
$dao = new CRM_Contact_DAO_GroupNesting();
*
* @return boolean True if $checkGroupId points to a group that is a parent of one of the $groupIds groups, false otherwise.
*
- * @access public
*/
public static function isParentGroup($groupIds, $checkGroupId) {
if (!is_array($groupIds)) {
*
* @return boolean True if $checkGroupId points to a group that is a child of one of the $groupIds groups, false otherwise.
*
- * @access public
*/
public static function isChildGroup($groupIds, $checkGroupId) {
*
* @return boolean True if $checkGroupId points to a group that is an ancestor of one of the $groupIds groups, false otherwise.
*
- * @access public
*/
public static function isAncestorGroup($groupIds, $checkGroupId) {
if (!is_array($groupIds)) {
*
* @return boolean True if $checkGroupId points to a group that is a descendent of one of the $groupIds groups, false otherwise.
*
- * @access public
*/
public static function isDescendentGroup($groupIds, $checkGroupId) {
if (!is_array($groupIds)) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Contact_DAO_GroupOrganization
- * @access public
* @static
*/
public static function add(&$params) {
* @param array $formatedValues (reference ) an assoc array of name/value pairs
*
* @return void
- * @access public
* @static
*/
public static function formatValues(&$params, &$formatedValues) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return boolean
- * @access public
* @static
*/
public static function dataExists($params) {
* @param int $contactID
*
* @return boolean
- * @access public
* @static
*/
public static function hasGroupAssociated($contactID) {
* @param integer $contactId contact id
*
* @return Object DAO object on success
- * @access public
* @static
*/
public static function updatePrimaryContact($primaryContactId, $contactId) {
* @param array $contact contact object
*
* @return CRM_Contact_BAO_Contact object
- * @access public
* @static
*/
public static function format(&$params, &$contact) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return boolean
- * @access public
* @static
*/
public static function dataExists(&$params) {
* Function which actually does all the work for the constructor
*
* @return void
- * @access private
*/
public function initialize() {
$this->_select = array();
* hack to make them part of the query
*
* @return void
- * @access public
*/
public function addSpecialFields() {
static $special = array('contact_type', 'contact_sub_type', 'sort_name', 'display_name');
* in the params list
*
* @return void
- * @access public
*/
public function selectClause() {
* the return values
*
* @return void
- * @access public
*/
public function addHierarchicalElements() {
if (empty($this->_returnProperties['location'])) {
* the return values
*
* @return void
- * @access public
*/
public function addMultipleElements() {
if (empty($this->_returnProperties['website'])) {
* @param boolean $onlyDeleted
*
* @return array sql query parts as an array
- * @access public
*/
public function query($count = FALSE, $sortByChar = FALSE, $groupContacts = FALSE, $onlyDeleted = FALSE) {
// build permission clause
* where clause
*
* @return string
- * @access public
*/
public function whereClause() {
$this->_where[0] = array();
* Getter for tables array
*
* @return array
- * @access public
*/
public function tables() {
return $this->_tables;
* @param boolean $strict
*
* @return string
- * @access public
* @static
*/
public static function getWhereClause($params, $fields, &$tables, &$whereTables, $strict = FALSE) {
* @param int $mode
*
* @return string the from clause
- * @access public
* @static
*/
public static function fromClause(&$tables, $inner = NULL, $right = NULL, $primaryLocation = TRUE, $mode = 1) {
* @param $values
*
* @return void
- * @access public
*/
public function contactType(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param $values
*
* @return void
- * @access public
*/
public function contactSubType(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param $values
*
* @return void
- * @access public
*/
public function group(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param $values
*
* @return string|NULL
- * @access public
*/
public function savedSearch(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param $values
*
* @return void
- * @access public
*/
public function ufUser(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param $values
*
* @return void
- * @access public
*/
public function tagSearch(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param $values
*
* @return void
- * @access public
*/
public function tag(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param $values
*
* @return void
- * @access public
*/
public function notes(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param $values
*
* @return void
- * @access public
*/
public function sortName(&$values) {
list($fieldName, $op, $value, $grouping, $wildcard) = $values;
* @param $values
*
* @return void
- * @access public
*/
public function email(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param $values
*
* @return void
- * @access public
*/
public function phone_numeric(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param $values
*
* @return void
- * @access public
*/
public function phone_option_group($values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param $values
*
* @return void
- * @access public
*/
public function street_address(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param $values
*
* @return void
- * @access public
*/
public function street_number(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param $values
*
* @return void
- * @access public
*/
public function sortByCharacter(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* Where / qill clause for including contact ids
*
* @return void
- * @access public
*/
public function includeContactIDs() {
if (!$this->_includeContactIds || empty($this->_params)) {
* @param $values
*
* @return void
- * @access public
*/
public function postalCode(&$values) {
// skip if the fields dont have anything to do with postal_code
* @param null $status
*
* @return void
- * @access public
*/
public function locationType(&$values, $status = NULL) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param null $status
*
* @return void
- * @access public
*/
public function county(&$values, $status = null) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param null $status
*
* @return void
- * @access public
*/
public function stateProvince(&$values, $status = NULL) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param $values
*
* @return void
- * @access public
*/
public function changeLog(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param $values
*
* @return void
- * @access public
*/
public function relationship(&$values) {
list($name, $op, $value, $grouping, $wildcard) = $values;
* @param int $mode
*
* @return array derault return properties
- * @access public
*/
public static function &defaultReturnProperties($mode = 1) {
if (!isset(self::$_defaultReturnProperties)) {
* @param int $value
*
* @return string|NULL
- * @access public
*/
public static function getPrimaryCondition($value) {
if (is_numeric($value)) {
* @param bool $count
*
* @return string
- * @access public
*/
public static function getQuery($params = NULL, $returnProperties = NULL, $count = FALSE) {
$query = new CRM_Contact_BAO_Query($params, $returnProperties);
*
*
* @return array
- * @access public
*/
static function apiQuery(
$params = NULL,
* @param bool $skipOrderAndLimit
*
* @return CRM_Core_DAO
- * @access public
*/
function searchQuery(
$offset = 0, $rowCount = 0, $sort = NULL,
* Getter for the qill object
*
* @return string
- * @access public
*/
public function qill() {
return $this->_qill;
* Default set of return default hier return properties
*
* @return array
- * @access public
*/
public static function &defaultHierReturnProperties() {
if (!isset(self::$_defaultHierReturnProperties)) {
* @param string $dataType data type of the field
*
* @return string where clause for the query
- * @access public
*/
public static function buildClause($field, $op, $value = NULL, $dataType = NULL) {
$op = trim($op);
* "we are moving away from the $ids param "
*
* @return CRM_Contact_BAO_Relationship object
- * @access public
* @static
*/
public static function create(&$params, $ids = array()) {
* @param array $ids the array that holds all the db ids
*
* @return CRM_Contact_BAO_Relationship
- * @access public
* @static
*/
public static function add(&$params, $ids = array(), $contactId = NULL) {
* Specifiy defaults for creating a relationship
*
* @return array $defaults array of defaults for creating relationship
- * @access public
* @static
*/
public static function getdefaults() {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return boolean
- * @access public
* @static
*/
public static function dataExists(&$params) {
* @param boolean $onlySubTypeRelationTypes if set only subtype which is passed by $contactSubType
* related relationshiptypes get return
*
- * @access public
* @static
*
* @return array - array reference of all relationship types with context to current contact.
* @param int $id relationship id
*
* @return null
- * @access public
*
* @static
*/
* @param $action
*
* @return null
- * @access public
* @static
*/
public static function disableEnableRelationship($id, $action) {
* @param int $contactId id of the contact to delete
*
* @return void
- * @access public
* @static
*/
public static function deleteContact($contactId) {
* $returns returns the contact ids in the realtionship
*
* @return \CRM_Contact_DAO_Relationship
- * @access public
* @static
*/
public static function getContactIds($id) {
* @param int $relationshipTypeId relationship type id
*
* @return boolean true if it is valid relationship else false
- * @access public
* @static
*/
public static function checkRelationshipType($contact_a, $contact_b, $relationshipTypeId) {
* @param integer $relationshipId this is relationship id for the contact
*
* @return boolean true if record exists else false
- * @access public
* @static
*/
public static function checkDuplicateRelationship(&$params, $id, $contactId = 0, $relationshipId = 0) {
* @param array $values output values of the object
*
* @return array (reference) the values that could be potentially assigned to smarty
- * @access public
* @static
*/
public static function &getValues(&$params, &$values) {
*
* @return array
* @static
- * @access public
*/
public static function makeURLClause($contactId, $status, $numRelationship, $count, $relationshipId, $direction, $params = array()) {
$select = $from = $where = '';
*
* @return array|int
* @static
- * @access public
*/
static function getRelationship($contactId = NULL,
$status = 0, $numRelationship = 0,
* @param array $params associated array for params record id.
*
* @return array $contactRelationships associated array of contact relationships
- * @access public
*/
public static function getContactRelationshipSelector(&$params) {
// format the params
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Contact_BAO_RelationshipType object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param array $ids the array that holds all the db ids
*
* @return CRM_Contact_DAO_RelationshipType
- * @access public
* @static
*
*/
*
* @return array $aSavedSearch - contains the search name as value and and id as key
*
- * @access public
*/
public function getAll() {
$savedSearch = new CRM_Contact_DAO_SavedSearch();
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Contact_BAO_SavedSearch
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param int $id the id of the saved search
*
* @return array the values of the posted saved search
- * @access public
* @static
*/
public static function &getFormValues($id) {
* @param array $whereTables (reference ) add the tables that are needed for the where clause
*
* @return string the where clause for this saved search
- * @access public
* @static
*/
public static function whereClause($id, &$tables, &$whereTables) {
* @param string $value
*
* @return string the name of the saved search
- * @access public
* @static
*/
public static function getName($id, $value = 'name') {
/**
* Class constructor
*
- * @access public
* @return \CRM_Contact_DAO_SubscriptionHistory
*/
/**
* @param array $params Values for the new history record
*
* @return object $history The new history object
- * @access public
* @static
*/
public static function &create(&$params) {
* @param int $id The contact id
*
* @return void
- * @access public
* @static
*/
public static function deleteContact($id) {
* Name of de-dupe button
*
* @var string
- * @access protected
*/
protected $_dedupeButtonName;
* Name of optional save duplicate button
*
* @var string
- * @access protected
*/
protected $_duplicateButtonName;
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'add');
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* All local rules are added near the element
*
* @return void
- * @access public
* @see valid_date
*/
public function addRules() {
* @param int $contactId contact id if doing update.
*
* @return bool $primaryID email/openId@static
- * @access public
*/
public static function formRule($fields, &$errors, $contactId = NULL) {
$config = CRM_Core_Config::singleton();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
//load form for child blocks
/**
* Form submission of new/edit contact is processed.
*
- * @access public
*
* @return void
*/
*
* @return boolean true if data exists, false otherwise
* @static
- * @access public
*/
public static function blockDataExists(&$fields) {
if (!is_array($fields)) {
* Use the form name to create the tpl file name
*
* @return string
- * @access public
*/
public function getTemplateFileName() {
if ($this->_contactSubType) {
* Entity sub type of the table id
*
* @var string
- * @access protected
*/
protected $_entitySubType;
* Custom group id
*
* @int
- * @access public
*/
public $_groupID;
*
* @return void
*
- * @access public
*
*/
public function preProcess() {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_cdType || $this->_multiRecordDisplay == 'single') {
/**
* Set the default form values
*
- * @access protected
*
* @return array the default array reference
*/
/**
* Process the user submitted custom data values.
*
- * @access public
*
* @return void
*/
* Pre processing
*
* @return void
- * @access public
*/
public function preProcess() {
$this->rgid = CRM_Utils_Request::retrieve('rgid', 'Positive', $this, FALSE, 0);
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Pre processing
*
* @return void
- * @access public
*/
public function preProcess() {
// Ensure user has permission to be here
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$foo = CRM_Core_DAO::getAttribute('CRM_Dedupe_DAO_Rule', 'title');
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields, $files, $self) {
$errors = array();
* Set default values for the form. MobileProvider that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return array
*/
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Set default values for the form.
* the default values are retrieved from the database
*
- * @access public
* @return void
*/
/**
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields) {
// check for state/country mapping
* Process the form when submitted
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->exportValues();
*
* @return void
*
- * @access public
* @static
*/
public static function buildQuickForm(&$form, $addressBlockCount = NULL, $sharing = TRUE, $inlineEdit = FALSE) {
*
* @return array|bool if no errors
*
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
* @param CRM_Core_Form $form form object
*
* @static
- * @access public
*/
public static function setDefaultValues( &$defaults, &$form ) {
$addressValues = array();
* @param CRM_Core_Form $form reference to the form object
*
* @return void
- * @access public
* @static
*/
public static function buildQuickForm(&$form) {
* @param $self
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @param CRM_Core_Form $form
* @param $defaults
* @param $contactType
*
* @return void
- * @access public
*/
public static function getGreetingFields($contactType) {
if (empty(self::$greetings[$contactType])) {
* @param CRM_Core_Form $form
*
* @return void
- * @access public
*/
public static function preProcess(&$form) {
$form->_type = CRM_Utils_Request::retrieve('type', 'String', CRM_Core_DAO::$_nullObject);
* @param CRM_Core_Form $form reference to the form object
*
* @return void
- * @access public
* @static
*/
public static function buildQuickForm(&$form) {
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @param CRM_Core_Form $form
* @param $defaults
* @param CRM_Core_Form $form reference to the form object
*
* @return void
- * @access public
* @static
*/
public static function buildQuickForm(&$form) {
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @param CRM_Core_Form $form
* @param $defaults
* @param boolean $blockEdit is it block edit
*
* @return void
- * @access public
* @static
*/
public static function buildQuickForm(&$form, $blockCount = NULL, $blockEdit = FALSE) {
* @param int $inlineEditMode ( 1 for contact summary
* top bar form and 2 for display name edit )
*
- * @access public
* @return void
*/
public static function buildQuickForm(&$form, $inlineEditMode = NULL) {
* @param boolean $blockEdit is it block edit
*
* @return void
- * @access public
* @static
*/
public static function buildQuickForm(&$form, $blockCount = NULL, $blockEdit = FALSE) {
* @param int $inlineEditMode ( 1 for contact summary
* top bar form and 2 for display name edit )
*
- * @access public
* @return void
*/
public static function buildQuickForm(&$form, $inlineEditMode = NULL) {
* @param int $contactID
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $contactID = NULL) {
*
* @param CRM_Core_Form $form form object
*
- * @access public
* @return void
*/
public static function buildQuickForm(&$form) {
* @param int $contactID
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $contactID = NULL) {
* params object $form object of the form
*
* @static
- * @access public
*/
public static function buildQuickForm(&$form) {
$form->applyFilter('__ALL__', 'trim');
* @param boolean $blockEdit is it block edit
*
* @return void
- * @access public
* @static
*/
public static function buildQuickForm(&$form, $blockCount = NULL, $blockEdit = FALSE) {
* @param int $inlineEditMode ( 1 for contact summary
* top bar form and 2 for display name edit )
*
- * @access public
* @return void
*/
public static function buildQuickForm(&$form, $inlineEditMode = NULL) {
* @param boolean $blockEdit is it block edit
*
* @return void
- * @access public
* @static
*/
public static function buildQuickForm(&$form, $addressBlockCount = NULL, $blockEdit = FALSE) {
* @param string $groupElementType
*
* @static
- * @access public
*/
static function buildQuickForm(&$form,
$contactId = 0,
* @param string $groupElementType
*
* @return void
- * @access public
* @static
*/
public static function setDefaults($id, &$defaults, $type = self::ALL, $fieldName = NULL, $groupElementType = 'checkbox') {
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @param CRM_Core_Form $form
* @param $defaults
* @param int $blockCount block number to build
*
* @return void
- * @access public
* @static
*/
public static function buildQuickForm(&$form, $blockCount = NULL) {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
// get the list of all the groups
}
/**
- * @access public
*
* @return void
*/
* Common form elements
*
* @return void
- * @access public
*/
public function buildQuickForm() {
CRM_Contact_Form_Inline_Lock::buildQuickForm($this, $this->_contactId);
* Override default cancel action
*
* @return void
- * @access public
*/
public function cancelAction() {
$response = array('status' => 'cancel');
* Set defaults for the form
*
* @return array
- * @access public
*/
public function setDefaultValues() {
$defaults = $params = array();
* Build the form object elements for an address object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* Set defaults for the form
*
* @return array
- * @access public
*/
public function setDefaultValues() {
$defaults = $this->_values;
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->exportValues();
* Build the form object elements for communication preferences
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* Set defaults for the form
*
* @return array
- * @access public
*/
public function setDefaultValues() {
$defaults = parent::setDefaultValues();
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->exportValues();
* Build the form object elements
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* Set defaults for the form
*
* @return array
- * @access public
*/
public function setDefaultValues() {
return parent::setDefaultValues();
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->exportValues();
* Build the form object elements
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->exportValues();
* Custom group id
*
* @int
- * @access public
*/
public $_groupID;
* Build the form object elements for custom data
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* Set defaults for the form
*
* @return array
- * @access public
*/
public function setDefaultValues() {
return CRM_Custom_Form_CustomData::setDefaultValues($this);
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
// Process / save custom data
* Build the form object elements
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->exportValues();
* Build the form object elements for an email object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* @param array $errors list of errors to be posted back to the form
*
* @return array $errors@static
- * @access public
*/
public static function formRule($fields, $errors) {
$hasData = $hasPrimary = $errors = array();
* Set defaults for the form
*
* @return array
- * @access public
*/
public function setDefaultValues() {
$defaults = array();
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->exportValues();
* Build the form object elements for im object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* @param array $errors list of errors to be posted back to the form
*
* @return array $errors@static
- * @access public
*/
public static function formRule($fields, $errors) {
$hasData = $hasPrimary = $errors = array();
* Set defaults for the form
*
* @return array
- * @access public
*/
public function setDefaultValues() {
$defaults = array();
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->exportValues();
* @param CRM_Core_Form $form form object
* @param int $contactID
*
- * @access public
* @return void
*/
public static function buildQuickForm(&$form, $contactID) {
* @param int $contactID
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $contactID = NULL) {
* Build the form object elements for openID object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* @param array $errors list of errors to be posted back to the form
*
* @return array $errors@static
- * @access public
*/
public static function formRule($fields, $errors) {
$hasData = $hasPrimary = $errors = array();
* Set defaults for the form
*
* @return array
- * @access public
*/
public function setDefaultValues() {
$defaults = array();
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->exportValues();
* Build the form object elements for phone object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* @param array $errors list of errors to be posted back to the form
*
* @return array $errors@static
- * @access public
*/
public static function formRule($fields, $errors) {
$hasData = $hasPrimary = $errors = array();
* Set defaults for the form
*
* @return array
- * @access public
*/
public function setDefaultValues() {
$defaults = array();
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->exportValues();
* Build the form object elements for website object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* Set defaults for the form
*
* @return array
- * @access public
*/
public function setDefaultValues() {
$defaults = array();
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->exportValues();
* @param CRM_Core_Form $form
*
* @return void
- * @access public
*/
public static function buildQuickForm(&$form) {
// required for subsequent AJAX requests.
* @param CRM_Core_Form $form
*
* @return void
- * @access public
*/
public static function preProcess(&$form) {
$session = CRM_Core_Session::singleton();
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
// reset action from the session
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$params = array();
/**
* Form submission of new/edit contact is processed.
*
- * @access public
*
* @return void
*/
* Set default values for the form. Relationship that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* This function is used to add the rules for form.
*
* @return void
- * @access public
*/
public function addRules() {
if ($this->_cdType) {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_cdType) {
/**
* This function is called when the form is submitted
*
- * @access public
*
* @return void
*/
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return mixed true or array of errors
- * @access public
* @static
*/
public static function dateRule($params) {
* The contextMenu
*
* @var array
- * @access protected
*/
protected $_contextMenu;
* The groupId retrieved from the GET vars
*
* @var int
- * @access public
*/
public $_groupID;
* retrieved from the GET vars
*
* @var int
- * @access protected
*/
protected $_amtgID;
* The saved search ID retrieved from the GET vars
*
* @var int
- * @access protected
*/
protected $_ssID;
* The group elements
*
* @var array
- * @access public
*/
public $_group;
public $_groupElement;
* The tag elements
*
* @var array
- * @access protected
*/
public $_tag;
public $_tagElement;
* The params used for search
*
* @var array
- * @access protected
*/
protected $_params;
* The return properties used for search
*
* @var array
- * @access protected
*/
protected $_returnProperties;
* The sort by character
*
* @var string
- * @access protected
*/
protected $_sortByCharacter;
* The profile group id used for display
*
* @var integer
- * @access protected
*/
protected $_ufGroupID;
* Csv - common search values
*
* @var array
- * @access protected
* @static
*/
static $csv = array('contact_type', 'group', 'tag');
* Define the set of valid contexts that the search form operates on
*
* @return array the valid context set and the titles
- * @access protected
* @static
*/
public static function &validContext() {
/**
* Build the common elements between the search/advanced form
*
- * @access public
*
* @return void
*/
* Processing needed for buildForm and later
*
* @return void
- * @access public
*/
public function preProcess() {
// set the various class variables
* Common post processing
*
* @return void
- * @access public
*/
public function postProcess() {
/*
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Search');
* Processing needed for buildForm and later
*
* @return void
- * @access public
*/
public function preProcess() {
$this->set('searchFormName', 'Advanced');
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* Use the form name to create the tpl file name
*
* @return string
- * @access public
*/
/**
* @return string
/**
* Set the default form values
*
- * @access protected
*
* @return array the default array reference
*/
* @param
*
* @return void
- * @access public
*/
public function postProcess() {
$this->set('isAdvanced', '1');
* multiple purposes (queries, save/edit etc)
*
* @return void
- * @access private
*/
public function normalizeFormValues() {
$contactType = CRM_Utils_Array::value('contact_type', $this->_formValues);
*
* @param $defaults array
* @return array
- * @access private
*/
public function normalizeDefaultValues(&$defaults) {
if (!is_array($defaults)) {
* csv - common search values
*
* @var array
- * @access protected
* @static
*/
static $csv = array('contact_type', 'group', 'tag');
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Set the default form values
*
- * @access protected
*
* @return array the default array reference
*/
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
* Processing needed for buildForm and later
*
* @return void
- * @access public
*/
public function preProcess() {
$this->set('searchFormName', 'Basic');
* This method is called for processing a submitted search form
*
* @return void
- * @access public
*/
public function postProcess() {
$this->set('isAdvanced', '0');
* multiple purposes (queries, save/edit etc)
*
* @return void
- * @access private
*/
public function normalizeFormValues() {
$contactType = CRM_Utils_Array::value('contact_type', $this->_formValues);
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
/**
* @return string
* Number of columns in where
*
* @var int
- * @access public
*/
public $_columnCount;
* Number of blocks to be shown
*
* @var int
- * @access public
*/
public $_blockCount;
* Build the form object
*
* @return void
- * @access public
*/
public function preProcess() {
$this->set('searchFormName', 'Builder');
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($values, $files, $self) {
if (!empty($values['addMore']) || !empty($values['addBlock'])) {
* Process the uploaded file
*
* @return void
- * @access public
*/
public function postProcess() {
$this->set('isAdvanced', '2');
* Generate the custom Data Fields based
* on the is_searchable
*
- * @access private
*
* @param $form
*
* Use the form name to create the tpl file name
*
* @return string
- * @access public
*/
/**
* @return string
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
/**
* @return string
* multiple purposes (queries, save/edit etc)
*
* @return void
- * @access private
*/
public function normalize() {
$contactType = CRM_Utils_Array::value('contact_type', $this->_formValues);
* @param
*
* @return void
- * @access public
*/
public function preProcess() {
self::preProcessCommon($this);
* Set default values for the form. Relationship that in edit/view action
* the default values are retrieved from the database
*
- * @access public
*
* @return array
*/
* This function is used to add the rules for form.
*
* @return void
- * @access public
*/
public function addRules() {
}
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addDefaultButtons(ts('Confirm Action'));
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* @param bool $submitOnce
*
* @return void
- * @access public
*/
public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
$this->addButtons(array(
* Replace ids of household members in $this->_contactIds with the id of their household.
* CRM-8338
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
/*
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Set the default form values
*
- * @access protected
*
* @return array the default array reference
*/
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($params) {
$errors = array();
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* @param CRM_Core_Form $form
* @param array $params This contains elements for search criteria
*
- * @access public
*
* @return void
*/
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Set the default form values
*
- * @access protected
*
* @return array the default array reference
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
/*
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Set default values for the form.
*
- * @access public
*
* @return array
*/
* @param array $fields the input form values
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields) {
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* @param object $self form object
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
// store case id if present
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
/**
* Build the form object
*
- * @access public
*
* @param CRM_Core_Form $form
*
* @param array $self additional values form 'this'
*
* @return true if no errors, else array of errors
- * @access public
*
*/
public static function formRule($fields, $dontCare, $self) {
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @param CRM_Core_Form $form
*
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
/**
* Build the form object - it consists of
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
$this->set('contactIds', $this->_contactIds);
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* @param null
*
* @return array array of default values
- * @access public
*/
public function setDefaultValues() {
$defaults = array();
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* @param string $fileName The name of the file to save the label in
*
* @return null
- * @access public
*/
public function createLabel(&$contactRows, &$format, $fileName = 'MailingLabels_CiviCRM.pdf') {
$pdf = new CRM_Utils_PDF_Label($format, 'mm');
* @param string $format format for which return properties build
*
* @return array of returnProperties
- * @access public
*/
public function getReturnProperties(&$format) {
$returnProperties = array();
* @param string $fileName The name of the file to save the label in
*
* @return null
- * @access public
*/
public static function createLabel(&$contactRows, &$format, $fileName = 'MailingLabels_CiviCRM.pdf') {
$pdf = new CRM_Utils_PDF_Label($format, 'mm');
* @param bool $mergeSameHousehold UNUSED
*
* @return array of rows for labels
- * @access public
*/
public static function getRows($contactIDs, $locationTypeID, $respectDoNotMail, $mergeSameAddress, $mergeSameHousehold) {
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
$cid = CRM_Utils_Request::retrieve('cid', 'Positive',
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* @param string $type
*
* @return string the location of the file we have created
- * @access protected
*/
public static function createMapXML($ids, $locationId, &$page, $addBreadCrumb, $type = 'Contact') {
$config = CRM_Core_Config::singleton();
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
$ids = CRM_Utils_Request::retrieve('eid', 'Positive',
* Use the form name to create the tpl file name
*
* @return string
- * @access public
*/
/**
* @return string
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
* Set default values for the form. Relationship that in edit/view action
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* @param CRM_Core_Form $form
*
* @return void
- * @access public
*/
public static function preProcess(&$form) {
$messageText = array();
* @param array $self additional values form 'this'
*
* @return true if no errors, else array of errors
- * @access public
*
*/
public static function formRule($fields, $dontCare, $self) {
/**
* Part of the post process which prepare and extract information from the template
*
- * @access protected
*
* @param CRM_Core_Form $form
*
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @param CRM_Core_Form $form
*
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
/*
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields) {
if (CRM_Core_BAO_UFField::checkProfileType($fields['uf_group_id'])) {
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preprocess();
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
/*
/**
* Build the form object
*
- * @access public
*
* @param CRM_Core_Form $form
* @param $proxSearch
* @param CRM_Core_Form $form
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $form) {
/**
* Set the default form values
*
- * @access protected
*
* @param CRM_Core_Form $form
*
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Set the default form values
*
- * @access protected
*
* @return array the default array reference
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
$session = CRM_Core_Session::singleton();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
/**
* Build the form object
*
- * @access public
*
* @param CRM_Core_Form $form
*
* @param array $self additional values form 'this'
*
* @return true if no errors, else array of errors
- * @access public
*
*/
public static function formRule($fields, $dontCare, $self) {
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @param CRM_Core_Form $form
*
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/ function preProcess() {
$this->_id = NULL;
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Set default values for the form.
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$element = $this->add('text', 'name', ts('Full Name'), array('class' => 'huge'));
}
/**
- * @access public
*
* @return void
*/
class CRM_Contact_Import_Field {
/**#@+
- * @access protected
* @var string
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
* and then setup some common data structures for the next step
*
* @return void
- * @access public
*/
public function postProcess() {
$this->controller->resetPage('MapField');
* @param string $importTableName
*
* @return array
- * @access private
*/
private function _prepareImportTable($db, $importTableName) {
/* TODO: Add a check for an existing _status field;
*
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Choose Data Source');
* formatted custom field names.
*
* @var array
- * @access protected
*/
protected $_formattedFieldNames;
* @param mapperFields
*
* @return string
- * @access public
*/
public function defaultFromColumnName($columnName, &$patterns) {
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$dataSource = $this->get('dataSource');
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
//to save the current mappings
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields) {
$errors = array();
* preview the file and extract some summary statistics
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->controller->exportValues('MapField');
* @param $fields
*
* @return void
- * @access public
*/
public function formatCustomFieldName(&$fields) {
//CRM-2676, replacing the conflict for same custom field name from different custom group.
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
//get the data from the session
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addElement('text', 'newGroupName', ts('Name for new group'));
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields, $files, $self) {
$errors = array();
* preview the file and extract some summary statistics
*
* @return void
- * @access public
*/
public function postProcess() {
* preview the file and extract some summary statistics
*
* @return void
- * @access public
*/
public function postProcessOld() {
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
// set the error message path to display
* Clean up the import table we used
*
* @return void
- * @access public
*/
public function postProcess() {
$dao = new CRM_Core_DAO();
protected $_tableName;
/**#@+
- * @access protected
* @var integer
*/
* @param array mapped array of values
*
* @return void
- * @access public
*/
public function setActiveFields($fieldKeys) {
$this->_activeFieldCount = count($fieldKeys);
* @param array $elements IM service provider type ids
*
* @return void
- * @access public
*/
public function setActiveFieldImProviders($elements) {
for ($i = 0; $i < count($elements); $i++) {
* @param array $elements IM service provider type ids of related contact
*
* @return void
- * @access public
*/
public function setActiveFieldRelatedContactImProvider($elements) {
for ($i = 0; $i < count($elements); $i++) {
* Format the field values for input to the api
*
* @return array (reference ) associative array of name/value pairs
- * @access public
*/
public function &getActiveFieldParams() {
$params = array();
* @param int $mode
*
* @return void
- * @access public
*/
public function set($store, $mode = self::MODE_SUMMARY) {
$store->set('rowCount', $this->_rowCount);
* @param array $data
*
* @return void
- * @access public
*/
public static function exportCSV($fileName, $header, $data) {
* @param array $params
*
* @return void
- * @access public
*/
public function updateImportRecord($id, &$params) {
$statusFieldName = $this->_statusFieldName;
* The initializer code, called before the processing
*
* @return void
- * @access public
*/
public function init() {
$contactFields = CRM_Contact_BAO_Contact::importableFields($this->_contactType);
* @param array $values the array of values belonging to this line
*
* @return boolean
- * @access public
*/
public function mapField(&$values) {
return CRM_Import_Parser::VALID;
* @param array $values the array of values belonging to this line
*
* @return boolean the result of this processing
- * @access public
*/
public function preview(&$values) {
return $this->summary($values);
* @param array $values the array of values belonging to this line
*
* @return boolean the result of this processing
- * @access public
*/
public function summary(&$values) {
$erroneousField = NULL;
* @param bool $doGeocodeAddress
*
* @return boolean the result of this processing
- * @access public
*/
public function import($onDuplicate, &$values, $doGeocodeAddress = FALSE) {
$config = CRM_Core_Config::singleton();
* Get the array of successfully imported contact id's
*
* @return array
- * @access public
*/
public function &getImportedContacts() {
return $this->_newContacts;
* Get the array of successfully imported related contact id's
*
* @return array
- * @access public
*/
public function &getRelatedImportedContacts() {
return $this->_newRelatedContacts;
* The initializer code, called before the processing
*
* @return void
- * @access public
*/
public function fini() {}
* @param null $csType
* @param null $relationships
*
- * @access public
*/
public static function isErrorInCustomData($params, &$errorMessage, $csType = NULL, $relationships = NULL) {
$session = CRM_Core_Session::singleton();
* retunr gender value / false
*
* @return bool
- * @access public
*/
public function checkGender($gender) {
$gender = trim($gender, '.');
* @param array $params
* @param String $errorMessage A string containing all the error-fields.
*
- * @access public
*/
public function isErrorInCoreData($params, &$errorMessage) {
foreach ($params as $key => $value) {
*
* @return bool
*
- * @access public
*/
public function in_value($value, $valueArray) {
foreach ($valueArray as $key => $v) {
* @param String $errorMessage A string containing all the error-fields, where the new errorName is concatenated.
*
* @static
- * @access public
*/
public static function addToErrorMsg($errorName, &$errorMessage) {
if ($errorMessage) {
* @param $returnCode
*
* @return int
- * @access public
*/
public function processMessage(&$values, $statusFieldName, $returnCode) {
if (empty($this->_unparsedStreetAddressContacts)) {
* Run dashboard
*
* @return void
- * @access public
*/
public function run() {
// Add dashboard js and css
* Run dashboard
*
* @return void
- * @access public
*/
public function run() {
CRM_Utils_System::setTitle(ts('Dashlets'));
* the contact and calls the appropriate type of page to view.
*
* @return void
- * @access public
*
*/
public function preProcess() {
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* Browse all rule groups
*
* @return void
- * @access public
*/
public function run() {
$gid = CRM_Utils_Request::retrieve('gid', 'Positive', $this, FALSE, 0);
* Browse all rule groups
*
* @return void
- * @access public
*/
public function browse() {
$this->assign('main_contacts', $this->_mainContacts);
* method.
*
* @return void
- * @access public
*
*/
public function run() {
* Browse all rule groups
*
* @return void
- * @access public
*/
public function browse() {
// get all rule groups
* This method is called after the page is created.
*
* @return void
- * @access public
*
*/
public function run() {
* This method is called after the page is created.
*
* @return void
- * @access public
*
*/
public function run() {
* This method is called after the page is created.
*
* @return void
- * @access public
*
*/
public function run() {
* This method is called after the page is created.
*
* @return void
- * @access public
*
*/
public function run() {
* This method is called after the page is created.
*
* @return void
- * @access public
*
*/
public function run() {
* This method is called after the page is created.
*
* @return void
- * @access public
*
*/
public function run() {
* This method is called after the page is created.
*
* @return void
- * @access public
*
*/
public function run() {
* This method is called after the page is created.
*
* @return void
- * @access public
*
*/
public function run() {
* This method is called after the page is created.
*
* @return void
- * @access public
*
*/
public function run() {
* This method is called after the page is created.
*
* @return void
- * @access public
*
*/
public function run() {
* This method is called after the page is created.
*
* @return void
- * @access public
*
*/
public function run() {
* This method is called after the page is created.
*
* @return void
- * @access public
*
*/
public function run() {
* Returns the page title
*
* @return string the title of the page
- * @access public
*/
public function getTitle() {
return "Task Results";
* The id of the object being viewed (note/relationship etc)
*
* @int
- * @access protected
*/
protected $_id;
* The contact id of the contact being viewed
*
* @int
- * @access protected
*/
protected $_contactId;
* The action that we are performing
*
* @string
- * @access protected
*/
protected $_action;
* The permission we have on this contact
*
* @string
- * @access protected
*/
protected $_permission;
* the contact and calls the appropriate type of page to view.
*
* @return void
- * @access public
*
*/
public function preProcess() {
* @param int $contactId
*
* @return array contact fields in fixed order
- * @access public
*/
public static function getContactDetails($contactId) {
return list($displayName,
* This function is called when action is browse
*
* return null
- * @access public
*/
public function browse() {
$in = CRM_Contact_BAO_GroupContact::getContactGroup($this->_contactId, 'Added');
* to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* The id of the object being viewed (note/relationship etc)
*
* @int
- * @access protected
*/
public $_groupId;
* Add a few specific things to view contact
*
* @return void
- * @access public
*
*/
public function preProcess() {
* This method is called after the page is created. It checks for the
* type of action and executes that action.
*
- * @access public
*
* @return void
* @static
* This function is called when action is browse
*
* return null
- * @access public
*/
public function browse() {
* @param int $groupId
*
* return null
- * @access public
*/
public function edit($groupId = NULL) {
$controller = new CRM_Core_Controller_Simple(
* to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* This function is called when action is browse
*
* return null
- * @access public
*/
public function browse() {
$loggingReport = CRM_Core_BAO_Log::useLoggingReport();
* This function is the main function that is called when the page loads, it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* View details of a note
*
* @return void
- * @access public
*/
public function view() {
$note = new CRM_Core_DAO_Note();
* This function is called when action is browse
*
* return null
- * @access public
*/
public function browse() {
$note = new CRM_Core_DAO_Note();
* This function is called when action is update or new
*
* return null
- * @access public
*/
public function edit() {
$controller = new CRM_Core_Controller_Simple('CRM_Note_Form_Note', ts('Contact Notes'), $this->_action);
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* Delete the note object from the db
*
* @return void
- * @access public
*/
public function delete() {
CRM_Core_BAO_Note::del($this->_id);
* the contact and calls the appropriate type of page to view.
*
* @return void
- * @access public
*
*/
public function run() {
* View summary details of a contact
*
* @return void
- * @access public
*/
public function view() {
$params = array();
*
* @return void
*
- * @access public
*/
public function view() {
$viewRelationship = CRM_Contact_BAO_Relationship::getRelationship($this->_contactId, NULL, NULL, NULL, $this->_id);
* This function is called when action is browse
*
* return null
- * @access public
*/
public function browse() {
// do nothing :) we are using datatable for rendering relationship selectors
* This function is called when action is update or new
*
* return null
- * @access public
*/
public function edit() {
$controller = new CRM_Core_Controller_Simple('CRM_Contact_Form_Relationship', ts('Contact Relationships'), $this->_action);
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* This function is called to delete the relationship of a contact
*
* return null
- * @access public
*/
public function delete() {
// calls a function to delete relationship
* the contact and calls the appropriate type of page to view.
*
* @return void
- * @access public
*
*/
public function preProcess() {
* the contact and calls the appropriate type of page to view.
*
* @return void
- * @access public
*
*/
public function run() {
* Edit name and address of a contact
*
* @return void
- * @access public
*/
public function edit() {
// set the userContext stack
* View summary details of a contact
*
* @return void
- * @access public
*/
public function view() {
// Add js for tabs, in-place editing, and jstree for tags
* This function is called when action is browse
*
* return null
- * @access public
*/
public function browse() {
// get the primary city, state and zip for the contact
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* This function is called when action is browse
*
* return null
- * @access public
*/
public function browse() {
$controller = new CRM_Core_Controller_Simple('CRM_Tag_Form_Tag', ts('Contact Tags'), $this->_action);
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* the contact and calls the appropriate type of page to view.
*
* @return void
- * @access public
*/
public function preProcess() {
if (!$this->_contactId) {
* Build user dashboard
*
* @return void
- * @access public
*/
public function buildUserDashBoard() {
//build component selectors
*
* @return void
*
- * @access public
*/
public function run() {
$this->preProcess();
* This function is called when action is browse
*
* return null
- * @access public
*/
public function browse() {
$count = CRM_Contact_BAO_GroupContact::getContactGroup(
* @param int $groupId
*
* return null
- * @access public
*/
public function edit($groupId = NULL) {
$this->assign('edit', $this->_edit);
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->edit();
* This method is called after the page is created.
*
* @return void
- * @access public
*
*/
public function run() {
* the HTML_QuickForm_Controller for that page.
*
* @var array
- * @access protected
*/
public $_formValues;
* The contextMenu
*
* @var array
- * @access protected
*/
protected $_contextMenu;
* Params is the array in a value used by the search query creator
*
* @var array
- * @access protected
*/
public $_params;
* The return properties used for search
*
* @var array
- * @access protected
*/
protected $_returnProperties;
* Represent the type of selector
*
* @var int
- * @access protected
*/
protected $_action;
* The public visible fields to be shown to the user
*
* @var array
- * @access protected
*/
protected $_fields;
* @param null $contextMenu
*
* @return CRM_Contact_Selector
- * @access public
*/
function __construct(
$customSearchClass,
* - Edit
*
* @return array
- * @access public
*
*/
public static function &links() {
* @param $action
* @param array $params
*
- * @access public
*/
public function getPagerParams($action, &$params) {
$params['status'] = ts('Contact %%StatusMessage%%');
* @param enum $output what should the result set include (web/email/csv)
*
* @return array the column headers that need to be displayed
- * @access public
*/
public function &getColumnHeaders($action = NULL, $output = NULL) {
$headers = NULL;
* @param
*
* @return int Total number of rows
- * @access public
*/
public function getTotalCount($action) {
// Use count from cache during paging/sorting
reference) $formValues submitted formValues
*
* @return array $qill which contains an array of strings
- * @access public
*/
// the current internationalisation is bad, but should more or less work
*
*
* @return array $_columnHeaders
- * @access private
*/
private static function &_getColumnHeaders() {
if (!isset(self::$_columnHeaders)) {
* expect the subclass to do it
*
* @return string the status message
- * @access public
*/
/**
* @return string
* the HTML_QuickForm_Controller for that page.
*
* @var array
- * @access protected
*/
public $_formValues;
* Params is the array in a value used by the search query creator
*
* @var array
- * @access protected
*/
public $_params;
* Represent the type of selector
*
* @var int
- * @access protected
*/
protected $_action;
* The public visible fields to be shown to the user
*
* @var array
- * @access protected
*/
protected $_fields;
* - Edit
*
* @return array
- * @access public
*
*/
public static function &links() {
* @param $action
* @param array $params
*
- * @access public
*/
public function getPagerParams($action, &$params) {
$params['status'] = ts('Contact %%StatusMessage%%');
* @param enum $output what should the result set include (web/email/csv)
*
* @return array the column headers that need to be displayed
- * @access public
*/
public function &getColumnHeaders($action = NULL, $output = NULL) {
$columns = $this->_search->columns();
* @param
*
* @return int Total number of rows
- * @access public
*/
public function getTotalCount($action) {
return $this->_search->count();
reference) $formValues submitted formValues
*
* @return array $qill which contains an array of strings
- * @access public
*/
public function getQILL() {
return NULL;
* @param string $formName
*
* @return string the name of the form that will handle the task
- * @access protected
*/
public function taskName($controller, $formName = 'Search') {
// total hack, check POST vars and then session to determine stuff
* Return the form name of the task
*
* @return string
- * @access public
*/
public function getTaskFormName() {
if (is_array($this->_task)) {
*
* @return array the set of tasks for a group of contacts
* @static
- * @access public
*/
public static function &taskTitles() {
self::initTasks();
* @param bool $deletedContacts are these tasks for operating on deleted contacts?
*
* @return array set of tasks that are valid for the user
- * @access public
*/
public static function &permissionedTaskTitles($permission, $deletedContacts = FALSE) {
self::initTasks();
*
* @return array the set of optional tasks for a group of contacts
* @static
- * @access public
*/
public static function &optionalTaskTitle() {
$tasks = array(
/**
* Class constructor
*
- * @access public
* @return \CRM_Contribute_DAO_Contribution
*/
/**
* @param array $ids the array that holds all the db ids
*
* @return CRM_Contribute_BAO_Contribution object
- * @access public
* @static
*/
public static function add(&$params, $ids = array()) {
* @param array $ids the array that holds all the db ids
*
* @return CRM_Contribute_BAO_Contribution|null the found object or null
- * @access public
* @static
*/
public static function &getValues($params, &$values, &$ids) {
* @param array $ids the array that holds all the db ids
*
* @return CRM_Contribute_BAO_Contribution object
- * @access public
* @static
*/
public static function create(&$params, $ids = array()) {
* @param boolean $reverse true if we want to resolve the values in the reverse direction (value -> name)
*
* @return void
- * @access public
* @static
*/
public static function resolveDefaults(&$defaults, $reverse = FALSE) {
* @param array $ids (reference) the array that holds all the db ids
*
* @return CRM_Contribute_BAO_Contribution object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults, &$ids) {
* @param bool $status
*
* @return array array of importable Fields
- * @access public
* @static
*/
public static function &importableFields($contactType = 'Individual', $status = TRUE) {
* @param int $id
*
* @return boolean true if duplicate, false otherwise
- * @access public
* static
*/
public static function checkDuplicate($input, &$duplicates, $id = NULL) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Contribute_BAO_ContributionProduct object
- * @access public
* @static
*/
public static function addPremium(&$params) {
*
* @return array the list of contribution fields
* @static
- * @access public
*/
public static function getContributionFields($addExtraFields = TRUE) {
$contributionFields = CRM_Contribute_DAO_Contribution::export();
*
* @return return the list of contribution fields
*
- * @access public
* @static
*/
public static function getHonorContacts($honorId) {
*
* @return null|string sort name of the contact if found
* @static
- * @access public
*/
public static function sortName($id) {
$id = CRM_Utils_Type::escape($id, 'Integer');
* @param array $params an assoc array of name/value pairs
*
* @return array contribution id if success else NULL
- * @access public
* static
*/
public static function checkDuplicateIds($params) {
* @return array associated array
*
* @static
- * @access public
*/
public static function getContributionDetails($exportMode, $componentIds) {
$paymentDetails = array();
* @param int $contributionId
* @param int $contactId
*
- * @access public
* @static
*/
public static function deleteAddress($contributionId = NULL, $contactId = NULL) {
* @param int $contributorId contributor id
*
* @return array $ids containing organization id and individual id
- * @access public
*/
public static function getOnbehalfIds($contributionId, $contributorId = NULL) {
* @param bool $isNotCancelled
*
* @return boolean
- * @access public
* @static
*/
public static function isCancelSubscriptionSupported($contributionId, $isNotCancelled = TRUE) {
* @param int $contributionId contribution id
*
* @return string $status contribution status
- * @access public
* @static
*/
public static function isSubscriptionCancelled($contributionId) {
* @param array $financialTrxnValues
*
* @return null|object
- * @access public
* @static
*/
public static function recordFinancialAccounts(&$params, $financialTrxnValues = NULL) {
*
* @param null $skipTrxn
*
- * @access public
* @static
*/
public static function updateFinancialAccounts(&$params, $context = NULL, $skipTrxn = NULL) {
* @param array $errors list of errors
*
* @return bool
- * @access public
* @static
*/
public static function checkStatusValidation($values, &$fields, &$errors) {
*
* @param integer $contactId contact id
*
- * @access public
* @static
*/
public static function deleteContactContribution($contactId) {
* @param string $relationName
*
* @return array|bool
- * @access public
* @static
*/
public static function validateFinancialType($financialTypeId, $relationName = 'Expense Account is') {
* @return array associated array
*
* @static
- * @access public
*/
static function processConfirm(&$form,
&$paymentParams,
* @return array associated array
*
* @static
- * @access public
*/
public static function contributionChartMonthly($param) {
if ($param) {
* @return array associated array
*
* @static
- * @access public
*/
public static function contributionChartYearly() {
$config = CRM_Core_Config::singleton();
*
* @return array array of tax amount
*
- * @access public
* @static
*
*/
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Contribute_DAO_ContributionPage object
- * @access public
* @static
*/
public static function &create(&$params) {
* @param null $fieldTypes
*
* @return void
- * @access public
* @static
*/
public static function sendMail($contactID, $values, $isTest = FALSE, $returnMessageText = FALSE, $fieldTypes = NULL) {
* @param bool|object $autoRenewMembership is it a auto renew membership.
*
* @return void
- * @access public
* @static
*/
public static function recurringNotify($type, $contactID, $pageID, $recur, $autoRenewMembership = FALSE) {
* @param null $fieldTypes
*
* @return void
- * @access public
* @static
*/
public static function buildCustomDisplay($gid, $name, $cid, &$template, &$params, $fieldTypes = NULL) {
* @param int $id the contribution page id to copy
*
* @return the copy object
- * @access public
* @static
*/
public static function copy($id) {
* @return boolean true if payment processor supports recurring
* else false
*
- * @access public
* @static
*/
public static function checkRecurPaymentProcessor($contributionPageId) {
*
* @param array $contribPageIds
* @return array $info info regarding all sections.
- * @access public
* @static
*/
public static function getSectionInfo($contribPageIds = array()) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return object activity contact object
- * @access public
*
*/
public static function create(&$params) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @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
*/
* @param array $duplicates (reference ) store ids of duplicate contribs
*
* @return boolean true if duplicate, false otherwise
- * @access public
* static
*/
public static function checkDuplicate($params, &$duplicates) {
* @param array $ids (reference ) an array of recurring contribution ids
*
* @return array $totalCount an array of recurring ids count
- * @access public
* static
*/
public static function getCount(&$ids) {
* @param int $recurId
*
* @return bool
- * @access public
* @static
*/
public static function deleteRecurContribution($recurId) {
* @param array $activityParams
*
* @return bool
- * @access public
* @static
*/
public static function cancelRecurContribution($recurId, $objects, $activityParams = array()) {
*
* @return array list of recurring contribution fields
*
- * @access public
* @static
*/
public static function getRecurContributions($contactId) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return object soft contribution of object that is added
- * @access public
*
*/
public static function add(&$params) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Contribute_BAO_ContributionSoft object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Contribute_BAO_ManagePremium object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
*
- * @access public
* @static
*
* @return object
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Contribute_BAO_ManagePremium object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return array product and option arrays
* @static
- * @access public
*/
public static function getPremiumProductInfo() {
if (!self::$productInfo) {
* @param $query
*
* @return void
- * @access public
*/
public static function select(&$query) {
// if contribute mode add contribution id
/**
* Add all the elements shared between contribute search and advnaced search
*
- * @access public
*
* @param CRM_Core_Form $form
*
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return array
*/
/**
* Build the form object for Premium Information.
*
- * @access public
*
* @param CRM_Core_Form $form
*
/**
* Build the form object for Additional Details.
*
- * @access public
*
* @param CRM_Core_Form $form
*
*
* Build the form object for PaymentReminders Information.
*
- * @access public
*
* @param CRM_Core_Form $form
*
/**
* Process the Premium Information
*
- * @access public
*
* @param array $params
* @param int $contributionID
/**
* Process the Note
*
- * @access public
*
* @param array $params
* @param int $contactID
/**
* Process the Common data
*
- * @access public
*
* @param array $params
* @param $formatted
* @param array $params (reference ) an assoc array of name/value pairs.
* @$ccContribution boolen, is it credit card contribution.
* @param bool $ccContribution
- * @access public.
*
* @return array
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_mid = CRM_Utils_Request::retrieve('mid', 'Integer', $this, FALSE);
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
// Determine if we can cancel recurring contribution via API with this processor
* @param null
*
* @return array array of default values
- * @access public
*/
public function setDefaultValues() {
$defaults = array('is_notify' => 1);
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
//@todo document the purpose of cdType (if still in use)
*
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$config = CRM_Core_Config::singleton();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->assignToTemplate();
* no help display needed
*
* @return int
- * @access public
*/
public function getAction() {
if ($this->_action & CRM_Core_Action::PREVIEW) {
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$contactID = $this->getContactID();
* @param $contribution
*
* @return void
- * @access public
*/
public function postProcessPremium($premiumParams, $contribution) {
$hour = $minute = $second = 0;
*
* @throws Exception
* @return CRM_Contribute_DAO_Contribution
- * @access public
*/
static function processContribution(
&$form,
* @param null $fields
*
* @return void
- * @access public
*/
public static function processOnBehalfOrganization(&$behalfOrganization, &$contactID, &$values, &$params, $fields = NULL) {
$isCurrentEmployer = FALSE;
* @param object $contribution contribution object
*
* @static
- * @access public
*/
public static function processPcpSoft(&$params, &$contribution) {
//add soft contribution due to pcp or Submit Credit / Debit Card Contribution by admin.
*
* @return array
* @static
- * @access public
*/
public static function processPcp(&$page, $params) {
$params['pcp_made_through_id'] = $page->_pcpId;
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Set the default values
*
* @return void
- * @access public
*/
/**
*
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
// build profiles first so that we can determine address fields etc
/**
* Build elements to enable pay on behalf of an organization.
*
- * @access public
*/
public function buildOnBehalfOrganization() {
if ($this->_membershipContactID) {
/**
* Build elements to collect information for recurring contributions
*
- * @access public
*
* @param CRM_Core_Form $form
*/
*
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* @param CRM_Core_Form $form
*
* @return void
- * @access public
*/
public static function preProcess(&$form) {
$session = CRM_Core_Session::singleton();
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* no help display needed
*
* @return int
- * @access public
*/
public function getAction() {
if ($this->_action & CRM_Core_Action::PREVIEW) {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->assignToTemplate();
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$config = CRM_Core_Config::singleton();
* Set the default values
*
* @return void
- * @access public
*/
public function setDefaultValues() {
return $this->_defaults;
* Assign the minimal set of variables to the template
*
* @return void
- * @access public
*/
public function assignToTemplate() {
$name = CRM_Utils_Array::value('billing_first_name', $this->_params);
* @param null $fieldTypes
*
* @return void
- * @access public
*/
public function buildCustom($id, $name, $viewOnly = FALSE, $profileContactType = NULL, $fieldTypes = NULL) {
if ($id) {
* Use the form name to create the tpl file name
*
* @return string
- * @access public
*/
/**
* @return string
* i.e. we dont override
*
* @return string
- * @access public
*/
/**
* @return string
/**
* Authenticate pledge user during online payment.
*
- * @access public
*
* @return void
*/
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* The page id saved to the session for an update
*
* @var int
- * @access protected
*/
protected $_id;
* The pledgeBlock id saved to the session for an update
*
* @var int
- * @access protected
*/
protected $_pledgeBlockID;
* Are we in single form mode or wizard mode?
*
* @var boolean
- * @access protected
*/
protected $_single;
* Is this the first page?
*
* @var boolean
- * @access protected
*/
protected $_first = FALSE;
* Store price set id.
*
* @var int
- * @access protected
*/
protected $_priceSetID = NULL;
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
// current contribution page id
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->applyFilter('__ALL__', 'trim');
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return array defaults
*/
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$pageId = $this->get('id');
* Use the form name to create the tpl file name
*
* @return string
- * @access public
*/
/**
* @return string
/**
* Pre process the form
*
- * @access public
*
* @return void
*/
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$urlParams = 'civicrm/admin/contribute/premium';
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
// get the submitted form values.
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Add Premium to Contribution Page');
* Contribution amount block.
*
* @var array
- * @access protected
*/
protected $_amountBlock = array();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return array
*/
*
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
// get the submitted form values.
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Amounts');
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
// get the submitted form values.
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Include Profiles');
* @param int $contributionPageId
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $contributionPageId) {
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
//Check if there are contributions related to Contribution Page
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->_title = CRM_Core_DAO::getFieldValue('CRM_Contribute_DAO_ContributionPage', $this->_id, 'title');
* Process the form when submitted
*
* @return void
- * @access public
*/
public function postProcess() {
$transaction = new CRM_Core_Transaction();
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$attributes = CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_Premium');
* @param array $params (ref.) an assoc array of name/value pairs
*
* @return mixed true or array of errors
- * @access public
* @static
*/
public static function formRule($params) {
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
// get the submitted form values.
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Premiums');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($values, $files, $self) {
$errors = array();
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
// get the submitted form values.
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Title and Settings');
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->registerRule('emailList', 'callback', 'emailList', 'CRM_Utils_Rule');
* @param array $options additional user data
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $options) {
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
// get the submitted form values.
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Thanks and Receipt');
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* @param $self
*
* @return mixed true or array of errors
- * @access public
* @static
*/
public static function formRule($params, $files, $self) {
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Widget Settings');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$id = $this->get('id');
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
/**
* Pre process the form
*
- * @access public
*
* @return void
*/
* Set default values for the form. Manage Premiums that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm( );
* @param $files
*
* @return mixed true or array of errors
- * @access public
* @static
*/
public static function formRule($params, $files) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
/**
* Resize a premium image to a different size
*
- * @access private
*
* @param string $filename
* @param string $resizedName
* The params that are sent to the query
*
* @var array
- * @access protected
*/
protected $_queryParams;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_single = FALSE;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_limit = NULL;
* Processing needed for buildForm and later
*
* @return void
- * @access public
*/ function preProcess() {
$this->set('searchFormName', 'Search');
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* @param
*
* @return void
- * @access public
*/
public function postProcess() {
if ($this->_done) {
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Find Contributions');
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* @param CRM_Core_Form $form
*
* @return void
- * @access static
*/
public static function preProcess(&$form) {
$contriDAO = new CRM_Contribute_DAO_Contribution();
* Function used to build form element for soft credit block
*
* @param CRM_Core_Form $form
- * @access public
*
* @return void
*/
* @param $self
*
* @return array of errors
- * @access public
* @static
*/
public static function formRule($fields, $errors, $self) {
* @param
*
* @return void
- * @access public
*/
public function preProcess() {
self::preProcessCommon($this);
* @param bool $submitOnce
*
* @return void
- * @access public
*/
public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
$this->addButtons(array(
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
/*
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/ function preProcess() {
//check for delete
if (!CRM_Core_Permission::checkActionPermission('CiviContribute', CRM_Core_Action::DELETE)) {
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/ function preProcess() {
CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this);
parent::preProcess();
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
/**
* Gives all the statues for conribution
*
- * @access public
*/
public $_contributionStatusId;
/**
* Gives the HTML template of PDF Invoice
*
- * @access public
*/
public $_messageInvoice;
/**
* This variable is used to assign parameters for HTML template of PDF Invoice
*
- * @access public
*/
public $_invoiceTemplate;
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
$id = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE);
/**
* Build the form object
*
- * @access public
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($values) {
$errors = array();
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* @param string $fileName gives the location with name of the file
* @param array $params for invoices
*
- * @access public
* @static
*/
static public function addActivities($subject, $contactIds, $fileName, $params) {
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/ function preProcess() {
$id = CRM_Utils_Request::retrieve('id', 'Positive',
$this, FALSE
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
/**
* Declaration of common variables for Invoice and PDF
*
- * @access public
*
* @param array $contribIds Contribution Id
* @param array $params parameter for pdf or email invoices
*
* @return array array of common elements
*
- * @access public
* @static
*/
static public function getElements($contribIds, $params, $contactIds) {
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
$this->skipOnHold = $this->skipDeceased = FALSE;
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @param CRM_Contribute_Form_Task $form
*
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
/*
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields) {
return TRUE;
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preprocess();
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {}
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
$id = CRM_Utils_Request::retrieve('id', 'Positive',
/**
* Build the form object
*
- * @access public
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields) {
$seen = $errors = array();
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_mid = CRM_Utils_Request::retrieve('mid', 'Integer', $this, FALSE);
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$type = 'next';
*
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->controller->exportValues($this->_name);
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Actually build the components of the form
*
* @return void
- * @access public
*/
public function buildQuickForm() {
// define the fields
/**
* This function is called after the user submits the form
*
- * @access public
*
* @return void
*/
class CRM_Contribute_Import_Field {
/**#@+
- * @access protected
* @var string
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$session = CRM_Core_Session::singleton();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
//Setting Upload File Size
* Process the uploaded file
*
* @return void
- * @access public
*/
public function postProcess() {
$this->controller->resetPage('MapField');
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Upload Data');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_mapperFields = $this->get('fields');
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
//to save the current mappings
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields, $files, $self) {
$errors = array();
* preview the file and extract some summary statistics
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->controller->exportValues('MapField');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader');
* preview the file and extract some summary statistics
*
* @return void
- * @access public
*/
public function postProcess() {
$fileName = $this->controller->exportValue('DataSource', 'uploadFile');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
// set the error message path to display
* @param array mapped array of values
*
* @return void
- * @access public
*/
public function setActiveFields($fieldKeys) {
$this->_activeFieldCount = count($fieldKeys);
* Format the field values for input to the api
*
* @return array (reference ) associative array of name/value pairs
- * @access public
*/
public function &getActiveFieldParams() {
$params = array();
* @param int $mode
*
* @return void
- * @access public
*/
public function set($store, $mode = self::MODE_SUMMARY) {
$store->set('fileSize', $this->_fileSize);
* @param array $data
*
* @return void
- * @access public
*/
public static function exportCSV($fileName, $header, $data) {
$output = array();
* The initializer code, called before the processing
*
* @return void
- * @access public
*/
public function init() {
$fields = CRM_Contribute_BAO_Contribution::importableFields($this->_contactType, FALSE);
* @param array $values the array of values belonging to this line
*
* @return boolean
- * @access public
*/
public function mapField(&$values) {
return CRM_Import_Parser::VALID;
* @param array $values the array of values belonging to this line
*
* @return boolean the result of this processing
- * @access public
*/
public function preview(&$values) {
return $this->summary($values);
* @param array $values the array of values belonging to this line
*
* @return boolean the result of this processing
- * @access public
*/
public function summary(&$values) {
$erroneousField = NULL;
* @param array $values the array of values belonging to this line
*
* @return boolean the result of this processing
- * @access public
*/
public function import($onDuplicate, &$values) {
// first make sure this is a valid line
* Get the array of successfully imported contribution id's
*
* @return array
- * @access public
*/
public function &getImportedContributions() {
return $this->_newContributions;
* The initializer code, called before the processing
*
* @return void
- * @access public
*/
public function fini() {}
}
* class.
*
* @return array collection of required component settings
- * @access public
*
*/
/**
* @param bool $getAllUnconditionally
*
* @return array|null collection of permissions, null if none
- * @access public
*/
/**
* @param bool $getAllUnconditionally
*
* @return array|null collection of required dashboard settings,
* null if no element offered
- * @access public
*
*/
/**
*
* @return array|null collection of required dashboard settings,
* null if no element offered
- * @access public
*
*/
/**
*
* @return array|null collection of required pane settings,
* null if no element offered
- * @access public
*
*/
/**
* class.
*
* @return array|null collection of activity types
- * @access public
*
*/
/**
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
* all the fields in the page
*
* @return void
- * @access public
*/
public function copy() {
$gid = CRM_Utils_Request::retrieve('gid', 'Positive',
* @param null $action
*
* @return void
- * @access public
* @static
*/
public function browse($action = NULL) {
* View details of a recurring contribution
*
* @return void
- * @access public
*/ function view() {
$recur = new CRM_Contribute_DAO_ContributionRecur();
$recur->id = $this->_id;
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* the contact and calls the appropriate type of page to view.
*
* @return void
- * @access public
*
*/
public function preProcess() {
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
*
*
* @return void
- * @access public
* @static
*/
public function browse() {
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
/**
* @return void
- * @access public
* @static
*/
public function browse() {
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$task = CRM_Utils_Request::retrieve('task', 'String', CRM_Core_DAO::$_nullObject);
* @param string $context
*
* @return array
- * @access public
*/
public static function &recurLinks($recurID = FALSE, $context = 'contribution') {
if (!(self::$_links)) {
* This function is called when action is browse
*
* return null
- * @access public
*/
public function browse() {
// add annual contribution
* This function is called when action is view
*
* return null
- * @access public
*/
public function view() {
$controller = new CRM_Core_Controller_Simple(
* This function is called when action is update or new
*
* return null
- * @access public
*/
public function edit() {
// set https for offline cc transaction
* loads, it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* This function is called when action is browse
*
* return null
- * @access public
*/
public function listContribution() {
$controller = new CRM_Core_Controller_Simple(
* loads, it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$invoiceSettings = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME,'contribution_invoice_settings');
*
* Get all the financial types
*
- * @access public
*
* @param int $id
*
*
* Get all the financial Accounts
*
- * @access public
*
* @param int $id
* @param int $financialAccountTypeId
* Flush given pseudoconstant so it can be reread from db
* nex time it's requested.
*
- * @access public
* @static
*
* @param bool|string $name pseudoconstant to be flushed
* @param integer $id id of the contribution page
* @param boolean $all do we want all pages or only active pages
*
- * @access public
*
* @return array - array reference of all contribution pages if any
* @static
*
* Get all the payment instruments
*
- * @access public
*
* @param string $columnName
*
/**
* Get all the valid accepted credit cards
*
- * @access public
*
* @return array - array reference of all payment instruments if any
* @static
/**
* Get all premiums
*
- * @access public
*
* @param int $pageID
* @return array - array of all Premiums if any
/**
* Get all the contribution statuses
*
- * @access public
*
* @param int $id
* @param string $columnName
/**
* Get all the Personal campaign pages
*
- * @access public
*
* @param null $pageType
* @param int $id
*
* The static array pcpStatus is returned
*
- * @access public
* @static
*
* @param string $column
*
* The static array $financialTypeAccount is returned
*
- * @access public
* @static
*
* @param int $financialTypeId
/**
* Get all batches
*
- * @access public
*
* @param int $id
* @return array - array reference of all batches if any
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_single = FALSE;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_limit = NULL;
/**
* What context are we being invoked from
*
- * @access protected
* @var string
*/
protected $_context = NULL;
/**
* What component context are we being invoked from
*
- * @access protected
* @var string
*/
protected $_compContext = NULL;
* the HTML_QuickForm_Controller for that page.
*
* @var array
- * @access protected
*/
public $_queryParams;
* Represent the type of selector
*
* @var int
- * @access protected
*/
protected $_action;
* @param null $compContext
*
* @return array
- * @access public
*/
public static function &links($componentId = NULL, $componentAction = NULL, $key = NULL, $compContext = NULL) {
$extraParams = NULL;
*
* @param $action
* @param array $params
- * @access public
*/
public function getPagerParams($action, &$params) {
$params['status'] = ts('Contribution') . ' %%StatusMessage%%';
* @param
*
* @return int Total number of rows
- * @access public
*/
public function getTotalCount($action) {
return $this->_query->searchQuery(0, 0, NULL,
/**
* @return array $qill which contains an array of strings
- * @access public
*/
// the current internationalisation is bad, but should more or less work
* @param enum $output what should the result set include (web/email/csv)
*
* @return array the column headers that need to be displayed
- * @access public
*/
public function &getColumnHeaders($action = NULL, $output = NULL) {
self::$_columnHeaders = array(
* @param string $formName
*
* @return string the name of the form that will handle the task
- * @access protected
*/
public function taskName($controller, $formName = 'Search') {
// total hack, check POST vars and then session to determine stuff
* Return the form name of the task
*
* @return string
- * @access public
*/
public function getTaskFormName() {
return CRM_Utils_String::getClassName($this->_task);
*
* @return array the set of tasks for a group of contacts
* @static
- * @access public
*/
public static function &tasks() {
if (!(self::$_tasks)) {
*
* @return array the set of task titles
* @static
- * @access public
*/
public static function &taskTitles() {
self::tasks();
* @param bool $softCreditFiltering
*
* @return array set of tasks that are valid for the user
- * @access public
*/
public static function &permissionedTaskTitles($permission, $softCreditFiltering = FALSE) {
$tasks = array();
*
* @return array the set of tasks for a group of contributors
* @static
- * @access public
*/
public static function getTask($value) {
self::tasks();
*
* @var integer const
*
- * @access public
*/
const
NONE = 0,
*
* @var array $_names type of variable name to action constant
*
- * @access private
* @static
*
*/
* @param string $str the action to be resolved
*
* @return int the action mask corresponding to the input string
- * @access public
* @static
*/
public static function resolve($str) {
* @param mixed $item either a single string or an array of strings
*
* @return int the action mask corresponding to the input args
- * @access public
* @static
*
*/
* @param string $item the input action to process
*
* @return int the action mask corresponding to the input string
- * @access public
* @static
*
*/
* @param int $mask the action mask
*
* @return string the corresponding action description
- * @access public
* @static
*
*/
* @param int $objectId
*
* @return string the html string
- * @access public
* @static
*/
static function formLink($links,
* @param array $values the array of values for parameter substitution in the str
*
* @return string the substituted string
- * @access public
* @static
*/
public static function &replace(&$str, &$values) {
*
* @return int the mask for the above permission
* @static
- * @access public
*/
public static function mask($permissions) {
$mask = NULL;
* @param array $params
*
* @return actionLog array
- * @access public
*/
public static function create($params) {
$actionLog = new CRM_Core_DAO_ActionLog();
*
* @return array associated array of all the drop downs in the form
* @static
- * @access public
*/
public static function getSelection($id = NULL) {
$mapping = self::getMapping();
*
* @return array (reference) reminder list
* @static
- * @access public
*/
public static function &getList($namesOnly = FALSE, $entityValue = NULL, $id = NULL) {
$activity_type = CRM_Core_PseudoConstant::activityType(TRUE, TRUE);
* @param array $ids the array that holds all the db ids
*
* @return CRM_Core_DAO_ActionSchedule
- * @access public
* @static
*
*/
* @param array $values (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_DAO_ActionSchedule object on success, null otherwise
- * @access public
* @static
*/
public static function retrieve(&$params, &$values) {
*
* @param int $id ID of the Reminder to be deleted.
*
- * @access public
* @static
*/
public static function del($id) {
* @param null $entity
*
* @return array $blocks array of created address
- * @access public
* @static
*/
public static function create(&$params, $fixAddress = TRUE, $entity = NULL) {
* before inserting in db
*
* @return object CRM_Core_BAO_Address object on success, null otherwise
- * @access public
* @static
*/
public static function add(&$params, $fixAddress) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return void
- * @access public
* @static
*/
public static function fixAddress(&$params) {
*
* @return boolean
*
- * @access public
* @static
*/
public static function dataExists(&$params) {
* @param int|string $fieldName conditional field name
*
* @return array $addresses array with address fields
- * @access public
* @static
*/
public static function &getValues($entityBlock, $microformat = FALSE, $fieldName = 'contact_id') {
* @param bool $microformat
*
* @return void
- * @access public
*/
public function addDisplay($microformat = FALSE) {
$fields = array(
* @param bool $updateBlankLocInfo
*
* @return array the array of adrress data
- * @access public
* @static
*/
public static function allAddress($id, $updateBlankLocInfo = FALSE) {
* entity_table name
*
* @return array the array of adrress data
- * @access public
* @static
*/
public static function allEntityAddress(&$entityElements) {
* @param string Locale - to set locale used to parse address
*
* @return array $parseFields parsed fields values.
- * @access public
* @static
*/
public static function parseStreetAddress($streetAddress, $locale = NULL) {
* @param array $fields an array of importable/exportable contact fields
*
* @return array $fields an array of contact fields and only the enabled address options
- * @access public
* @static
*/
public static function validateAddressOptions($fields) {
* @param int $addressId address id
*
* @return count of contacts that use this shared address
- * @access public
* @static
*/
public static function checkContactSharedAddress($addressId) {
* @param array $fields address fields in profile
* @param int $contactId contact id
*
- * @access public
* @static
*/
public static function checkContactSharedAddressFields(&$fields, $contactId) {
* @param array $params associated array of address params
*
* @return void
- * @access public
* @static
*/
public static function processSharedAddress($addressId, $params) {
* @param array $params associated array of submitted values
*
* @return void
- * @access public
* @static
*/
public static function processSharedAddressRelationship($masterAddressId, $params) {
* @param boolean $returnStatus by default false
*
* @return string $statusMessage
- * @access public
* @static
*/
public static function setSharedAddressDeleteStatus($addressId = NULL, $contactId = NULL, $returnStatus = FALSE) {
* @param array $params input parameters to find object
*
* @return array of $block objects.
- * @access public
* @static
*/
public static function &getValues($blockName, $params) {
* @param string $blockName name of the above object
*
* @return array of $block objects.
- * @access public
* @static
*/
public static function retrieveBlock(&$block, $blockName) {
* @param array $params associated array of submitted fields
*
* @return boolean true if the block has data, otherwise false
- * @access public
* @static
*/
public static function dataExists($blockFields, &$params) {
* @param array $params associated array of submitted fields
*
* @return boolean true if the block exits, otherwise false
- * @access public
* @static
*/
public static function blockExists($blockName, &$params) {
*
* @return array $contactBlockIds formatted array of block ids
*
- * @access public
* @static
*/
public static function getBlockIds($blockName, $contactId = NULL, $entityElements = NULL, $updateBlankLocInfo = FALSE) {
* @param int $contactId
*
* @return object CRM_Core_BAO_Block object on success, null otherwise
- * @access public
* @static
*/
public static function create($blockName, &$params, $entity = NULL, $contactId = NULL) {
* @return void
*
* @static
- * @access public
*/
public static function synchronize($is_interactive = TRUE) {
//start of schronization code
* @param string $mail email id for cms user
*
* @return int contact id that has been created
- * @access public
* @static
*/
public static function create(&$params, $mail) {
*
* @return FALSE|void WTF
*
- * @access public
* @static
*/
public static function buildForm(&$form, $gid, $emailPresent, $action = CRM_Core_Action::NONE) {
*
* @return uid if user exists, false otherwise
*
- * @access public
* @static
*/
public static function userExists(&$contact) {
*
* @return object The data if present in cache, else null
* @static
- * @access public
*/
public static function &getItem($group, $path, $componentID = NULL) {
if (self::$_cache === NULL) {
*
* @return object The data if present in cache, else null
* @static
- * @access public
*/
public static function &getItems($group, $componentID = NULL) {
if (self::$_cache === NULL) {
*
* @return void
* @static
- * @access public
*/
public static function setItem(&$data, $group, $path, $componentID = NULL) {
if (self::$_cache === NULL) {
*
* @return void
* @static
- * @access public
*/
public static function deleteGroup($group = NULL, $path = NULL, $clearAll = TRUE) {
$dao = new CRM_Core_DAO_Cache();
*
* @return void
* @static
- * @access private
*/
public static function storeSessionToCache($names, $resetSession = TRUE) {
foreach ($names as $key => $sessionName) {
*
* @return void
* @static
- * @access private
*/
/**
*
* @return void
* @static
- * @access private
*/
public static function cleanup($session = false, $table = false, $prevNext = false) {
// clean up the session cache every $cacheCleanUpNumber probabilistically
* @param NULL
*
* @return array Data type => Description
- * @access public
* @static
*/
public static function &dataType() {
* @param array $params (reference) an assoc array of name/value pairs
*
* @return CRM_Core_DAO_CustomField object
- * @access public
* @static
*/
public static function create(&$params) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_DAO_CustomField object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return Object DAO object on sucess, null otherwise
*
- * @access public
* @static
*/
public static function setIsActive($id, $is_active) {
*
* @return string name
*
- * @access public
* @static
*
*/
*
* @return array $fields - an array of active custom fields.
*
- * @access public
* @static
*/
public static function &getFields($customDataType = 'Individual',
*
* @return array $fields -
*
- * @access public
* @static
*/
public static function &getFieldsForImport($contactType = 'Individual',
*
* @param bool $all
* @return int|null The id (if exists)
- * @access public
* @static
*/
public static function getKeyID($key, $all = FALSE) {
* @param boolean $search true if used for search else false
* @param string $label label for custom field
*
- * @access public
* @static
*/
public static function addQuickFormElement(&$qf,
*
* @return boolean
*
- * @access public
* @static
*
*/
* @return string the display value
*
* @static
- * @access public
*/
public static function getDisplayValue($value, $id, &$options, $contactID = NULL, $fieldID = NULL) {
$option = &$options[$id];
* just format the given value
*
* @static
- * @access public
*/
static function setProfileDefaults($customFieldId,
$elementName,
* Currently this is required in the cases where option groups are to be included
* for inactive fields : CRM-5369
*
- * @access public
*
* @return mixed $customOptionGroup@static
*/
* @param int $customFieldId custom field id
* @param int $optionGroupId option group id
*
- * @access public
* @return void
* @static
*/
* @param array $params (reference) an assoc array of name/value pairs
*
* @return CRM_Core_DAO_CustomGroup object
- * @access public
* @static
*/
public static function create(&$params) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_DAO_CustomGroup object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return Object DAO object on sucess, null otherwise
* @static
- * @access public
*/
public static function setIsActive($id, $is_active) {
// reset the cache
* The reason for the info array in unclear and it could be determined from parsing the group tree after creation
* With caching the performance impact would be small & the function would be cleaner
*
- * @access public
*
* @static
*/
*
* @return string title
*
- * @access public
* @static
*
*/
*
* @return array $groupTree - array consisting of all group and field details
*
- * @access public
*
* @static
*/
*
* @return string $tableName
*
- * @access public
* @static
*
* @see _apachesolr_civiAttachments_dereference_file_parent
*
* @return void
*
- * @access private
* @static
*/
private static function _addWhereAdd(&$customGroupDAO, $entityType, $entityID = NULL, $allSubtypes = FALSE) {
*
* @return boolean false if field exists for this group, true if group gets deleted.
*
- * @access public
* @static
*
*/
* @param string $prefix prefix for custom grouptree assigned to template
*
* @return void
- * @access public
* @static
*/
public static function buildQuickForm(&$form, &$groupTree, $inactiveNeeded = FALSE, $prefix = '') {
* @param string $type the type of custom group we are using
*
* @return array
- * @access public
* @static
*/
public static function extractGetParams(&$form, $type) {
*
* @return boolean false if it matches else true
* @static
- * @access public
*/
public static function checkCustomField($customFieldId, &$removeCustomFieldTypes) {
$query = "SELECT cg.extends as extends
* @param array $fieldIds - array of custom field ids.
*
* @return array $groupLabels - array consisting of groups and fields labels with ids.
- * @access public
*/
public static function getGroupTitles($fieldIds) {
if (!is_array($fieldIds) && empty($fieldIds)) {
* @param int $gID - custom group id.
*
* @return boolean true if empty otherwise false.
- * @access public
*/
public static function isGroupEmpty($gID) {
if (!$gID) {
* @param array $types - var which should have the list appended.
*
* @return array of types.
- * @access public
*/
public static function getExtendedObjectTypes(&$types = array()) {
static $flag = FALSE, $objTypes = array();
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_BAO_CustomOption object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return string the label to display for this custom field
* @static
- * @access public
*/
public static function getOptionLabel($fieldId, $value, $htmlType = NULL, $dataType = NULL) {
if (!$fieldId) {
* param $optionId integer option id
*
* @static
- * @access public
*/
public static function del($optionId) {
// get the customFieldID
* @param bool $contactSearch
* @param array $locationSpecificFields
*
- * @access public
*/
public function __construct($ids, $contactSearch = FALSE, $locationSpecificFields = array()) {
$this->_ids = &$ids;
* @param NULL
*
* @return void
- * @access public
*/
public function select() {
if (empty($this->_fields)) {
*
* @return void
*
- * @access public
*/
public function where() {
foreach ($this->_ids as $id => $values) {
* @param NULL
*
* @return array array of strings
- * @access public
*/
public function query() {
$this->select();
* @param string $value The data to be validated
*
* @return boolean True if the value is of the specified type
- * @access public
* @static
*/
public static function typecheck($type, $value) {
* @param string $type the civicrm type string
*
* @return the mysql data store placeholder
- * @access public
* @static
*/
public static function typeToField($type) {
* @param int $maxLength
*
* @return the mysql data store placeholder
- * @access public
* @static
*/
public static function fieldToSQLType($type, $maxLength = 255) {
* @return array $fields Array of custom values for the entity with key=>value
* pairs specified as civicrm_custom_field.id => custom value.
* Empty array if no custom values found.
- * @access public
* @static
*/
public static function &getEntityValues($entityID, $entityType = NULL, $fieldIDs = NULL, $formatMultiRecordField = FALSE) {
*
* @param array $params values
*
- * @access public
* @static
*
* @return object
* @param boolean $checkPermission all or only authorized for the current user
*
* @return array $widgets array of dashlets
- * @access public
* @static
*/
public static function getDashlets($all = TRUE, $checkPermission = TRUE) {
* passed rather than the current user.
*
* @return array $dashlets array of dashlets
- * @access public
* @static
*/
public static function getContactDashlets($flatFormat = FALSE, $contactID = NULL) {
* @param int $dashletID widget ID
*
* @return array associted array title and content
- * @access public
* @static
*/
public static function getDashletInfo($dashletID) {
*
* @throws RuntimeException
* @return void
- * @access public
* @static
*/
public static function saveDashletChanges($columns, $contactID=NULL) {
* @param array $params associated array
*
* @return object $dashlet returns dashlet object
- * @access public
* @static
*/
public static function addDashlet(&$params) {
* @param string $entityTable
*
* @return boolean
- * @access public
* @static
*/
public static function del($entityId,$entityTable) {
* @param array $params (reference) an assoc array of name/value pairs
*
* @return object CRM_Core_DAO_Discount object on success, otherwise null
- * @access public
* @static
*/
public static function add(&$params) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_DAO_Domain object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param null $reset
*
* @return null|object CRM_Core_BAO_Domain
- * @access public
* @static
*/
public static function &getDomain($reset = null) {
* @param NULL
*
* @return array Location::getValues
- * @access public
*/
public function &getLocationValues() {
if ($this->_location == NULL) {
* @param int $id
*
* @return array domain
- * @access public
*/
public static function edit(&$params, &$id) {
$domain = new CRM_Core_DAO_Domain();
* @param array $params
*
* @return array domain
- * @access public
*/
public static function create($params) {
$domain = new CRM_Core_DAO_Domain();
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return object CRM_Core_BAO_Email object on success, null otherwise
- * @access public
* @static
*/
public static function add(&$params) {
* @param array $entityBlock input parameters to find object
*
* @return boolean
- * @access public
* @static
*/
public static function &getValues($entityBlock) {
* @param bool $updateBlankLocInfo
*
* @return array the array of email id's
- * @access public
* @static
*/
public static function allEmails($id, $updateBlankLocInfo = FALSE) {
* entity_table name
*
* @return array the array of email id's
- * @access public
* @static
*/
public static function allEntityEmails(&$entityElements) {
* the domain email id
*
* @return array an array of email ids
- * @access public
* @static
*/
public static function getFromEmail() {
* @return array(
) reference $tag array of category id's the contact belongs to.
*
- * @access public
* @static
*/
public static function &getTag($entityID, $entityTable = 'civicrm_contact') {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Core_BAO_EntityTag object
- * @access public
* @static
*/
public static function add(&$params) {
* @param array $params an assoc array of name/value pairs
*
* @return boolean
- * @access public
* @static
*/
public static function dataExists($params) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Core_BAO_EntityTag object
- * @access public
* @static
*
*/
* @param string $entityTable name of entity table default:civicrm_contact
*
* @return array (total, added, notAdded) count of enities added to tag
- * @access public
* @static
*/
public static function addEntitiesToTag(&$entityIds, $tagId, $entityTable = 'civicrm_contact') {
* @param string $entityTable name of entity table default:civicrm_contact
*
* @return array (total, removed, notRemoved) count of entities removed from tags
- * @access public
* @static
*/
public static function removeEntitiesFromTag(&$entityIds, $tagId, $entityTable = 'civicrm_contact') {
* @param int $entityID
*
* @return void
- * @access public
* @static
*/
public static function create(&$params, $entityTable, $entityID) {
* @param object $tag an object of a tag.
*
* @return array $entityIds array of entity ids
- * @access public
*/
public function getEntitiesByTag($tag) {
$entityIds = array();
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_BAO_LocationType object on success, null otherwise
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return void
*
- * @access public
* @static
*/
public static function del($id) {
* Delete a file attachment from an entity table / entity ID
*
* @static
- * @access public
*/
public static function deleteAttachment() {
$params = array();
* @return array|NULL list of HTML snippets; one HTML snippet for each attachment. If none found, then NULL
*
* @static
- * @access public
*/
public static function paperIconAttachment($entityTable, $entityID) {
if (empty($entityTable) || !$entityID) {
/**
* Class constructor
*
- * @access public
* @return \CRM_Financial_DAO_FinancialTrxn
*/
/**
* @param string $trxnEntityTable entity_table
*
* @return CRM_Core_BAO_FinancialTrxn object
- * @access public
* @static
*/
public static function create(&$params, $trxnEntityTable = null ) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Contribute_BAO_ContributionType object
- * @access public
* @static
*/
public static function retrieve( &$params, &$defaults ) {
*
* @return array $tag array of category id's the contact belongs to.
*
- * @access public
* @static
*/
public static function getFinancialTrxnId($entity_id, $orderBy = 'ASC', $newTrxn = FALSE) {
*
* @return array $tag array of catagory id's the contact belongs to.
*
- * @access public
* @static
*/
public static function getFinancialTrxnTotal($entity_id) {
*
* @return array $payment array of previous payments
*
- * @access public
* @static
*/
public static function getPayments($financial_trxn_id) {
*
* @return array $tag array of catagory id's the contact belongs to.
*
- * @access public
* @static
*/
public static function getFinancialTrxnLineTotal($entity_id, $entity_table = 'civicrm_contribution') {
*
* @param int $entity_id
* @return true on success, false otherwise
- * @access public
* @static
*/
public static function deleteFinancialTrxn($entity_id) {
/**
* Create financial transaction for premium
*
- * @access public
* @static
*/
public static function createPremiumTrxn($params) {
*
* @param array $params to create trxn entries
*
- * @access public
* @static
*/
public static function recordFees($params) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return object CRM_Core_BAO_IM object on success, null otherwise
- * @access public
* @static
*/
public static function add(&$params) {
* @param array entityBlock input parameters to find object
*
* @return boolean
- * @access public
* @static
*/
public static function &getValues($entityBlock) {
* @param bool $updateBlankLocInfo
*
* @return array the array of im details
- * @access public
* @static
*/
public static function allIMs($id, $updateBlankLocInfo = FALSE) {
* entity_table name
*
* @return array the array of im details
- * @access public
* @static
*/
public static function allEntityIMs(&$entityElements) {
* @param array $params an assoc array of name/value pairs
*
* @return CRM_Financial_DAO_PaymentProcessorType
- * @access public
* @static
*/
public static function create($params) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_DAO_Job object on success, null otherwise
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return Object DAO object on sucess, null otherwise
*
- * @access public
* @static
*/
public static function setIsActive($id, $is_active) {
* @param $jobID ID of the job to be deleted.
*
* @return bool|null
- * @access public
* @static
*/
public static function del($jobID) {
* @param void
*
* @return array array of page orientations
- * @access public
* @static
*/
public static function getPageOrientations() {
* @param string $name group name
*
* @return array array of font names
- * @access public
* @static
*/
public static function getFontNames($name='label_format') {
* @param void
*
* @return array array of font sizes
- * @access public
* @static
*/
public static function getFontSizes() {
* @param void
*
* @return array array of measurement units
- * @access public
* @static
*/
public static function getUnits() {
* @param void
*
* @return array array of alignments
- * @access public
* @static
*/
public static function getTextAlignments() {
* @param void
*
* @return array array of alignments
- * @access public
* @static
*/
public static function getFontStyles() {
* @param string $name
*
* @return int Group ID (null if Group ID doesn't exist)
- * @access private
*/
private static function _getGid($name='label_format') {
if (!isset(self::$_gid[$name]) || !self::$_gid[$name]) {
*
* @return array (reference) List of Label Formats
* @static
- * @access public
*/
public static function addOrder(&$list, $returnURL) {
$filter = "option_group_id = " . self::_getGid();
*
* @return array (reference) label format list
* @static
- * @access public
*/
public static function &getList($namesOnly = FALSE, $groupName='label_format') {
static $list = array();
*
* @return array Name/value pairs containing the default Label Format values.
* @static
- * @access public
*/
public static function &getDefaultValues($groupName = 'label_format') {
$params = array('is_active' => 1, 'is_default' => 1);
* @param string $groupName
*
* @return array $values (reference) associative array of name/value pairs
- * @access public
*/
public static function &getLabelFormat($field, $val, $groupName = 'label_format') {
$params = array('is_active' => 1, $field => $val);
* @param int $name Label format name. Empty = get default label format
*
* @return array $values (reference) associative array of name/value pairs
- * @access public
*/
public static function &getByName($name) {
return self::getLabelFormat('name', $name);
* @param string $groupName group name
*
* @return array $values (reference) associative array of name/value pairs
- * @access public
*/
public static function &getById($id, $groupName = 'label_format') {
return self::getLabelFormat('id', $id, $groupName);
* @param null $default
*
* @return value
- * @access public
* @static
*/
public static function getValue($field, &$values, $default = NULL) {
* @param string $groupName
*
* @return CRM_Core_DAO_OptionValue object
- * @access public
* @static
*/
public static function retrieve(&$params, &$values, $groupName='label_format') {
* @param void
*
* @return void
- * @access public
*/
public static function customGroupName() {
return ts('Custom');
* @param string $groupName group name of the label format
*
* @return void
- * @access public
*/
public function saveLabelFormat(&$values, $id = NULL, $groupName = 'label_format') {
// get the Option Group ID for Label Formats (create one if it doesn't exist)
*
* @param int $id ID of the label format to be deleted.
* @param string $groupName group name
- * @access public
* @static
*/
public static function del($id, $groupName) {
* @param null $entity
*
* @return array $location
- * @access public
* @static
*/
public static function create(&$params, $fixAddress = TRUE, $entity = NULL) {
/**
* Takes an entity array and finds the existing location block
- * @access public
* @static
*/
public static function findExisting($entityElements) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return object CRM_Core_BAO_locBlock object on success, null otherwise
- * @access public
* @static
*/
public static function addLocBlock(&$params) {
* @param int $locBlockId id of the Location Block
*
* @return void
- * @access public
* @static
*/
public static function deleteLocBlock($locBlockId) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return boolean
- * @access public
* @static
*/
public static function dataExists(&$params) {
* @param bool $microformat
*
* @return array array of objects(CRM_Core_BAO_Location)
- * @access public
* @static
*/
public static function &getValues($entityBlock, $microformat = FALSE) {
* @param int $locationTypeId id of the location to delete
*
* @return void
- * @access public
* @static
*/
public static function deleteLocationBlocks($contactId, $locationTypeId) {
*
* @param int $contactId - contact id
*
- * @access public
* @static
*/
public static function checkPrimaryBlocks($contactId) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_BAO_LocaationType object on success, null otherwise
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return Object DAO object on sucess, null otherwise
*
- * @access public
* @static
*/
public static function setIsActive($id, $is_active) {
* @return object The default location type object on success,
* null otherwise
* @static
- * @access public
*/
public static function &getDefault() {
if (self::$_defaultLocationType == NULL) {
*
* @param array $params reference array contains the values submitted by the form
*
- * @access public
* @static
*
* @return object
*
* @param int $locationTypeId ID of the location type to be deleted.
*
- * @access public
* @static
*/
public static function del($locationTypeId) {
* @param int $contactID
*
* @return int count of log records
- * @access public
* @static
*/
public static function getContactLogCount($contactID) {
* summary, instead of normal log entries.
*
* @return int report id of Contact Logging Report (Summary) / false
- * @access public
* @static
*/
public static function useLoggingReport() {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_BAO_MailSettings object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @param array $params reference array contains the values submitted by the form
*
- * @access public
* @static
*
* @return object
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Core_BAO_MailSettings object
- * @access public
* @static
*/
public static function create(&$params) {
* @param int $id mail settings id
*
* @return mixed|null
- * @access public
* @static
*
*/
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return object CRM_Core_DAO_Mapping object on success, otherwise null
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param int $id mapping id
*
* @return boolean
- * @access public
* @static
*
*/
* @param array $params an array of name/value pairs
*
* @return object CRM_Core_DAO_Mapper object on success, otherwise null
- * @access public
* @static
*/
public static function add($params) {
* @param string $mappingTypeId mapping type id
*
* @return array $mapping array of mapping name
- * @access public
* @static
*/
public static function getMappings($mappingTypeId) {
* @param int $mappingId mapping id
*
* @return array $mappingFields array of mapping fields
- * @access public
* @static
*/
public static function getMappingFields($mappingId) {
* @param null $exportMode
*
* @return void
- * @access public
* @static
*/
public static function buildMappingForm(&$form, $mappingType = 'Export', $mappingId = NULL, $columnNo, $blockCount = 3, $exportMode = NULL) {
*
* @return null
* @static
- * @access public
*/
public static function saveMappingFields(&$params, $mappingId) {
//delete mapping fields records for exixting mapping
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_BAO_MessageTemplate object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @param array $params reference array contains the values submitted by the form
*
- * @access public
* @static
*
* @return object
/**
* Delete the Message Templates
*
- * @access public
* @static
*
* @param int $messageTemplatesID
/**
* Get the Message Templates
*
- * @access public
* @static
*
* @param bool $all
*
* @return Object DAO object on sucess, null otherwise
*
- * @access public
* @static
*/
public static function setIsActive($id, $is_active) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_BAO_Navigation object on success, null otherwise
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return string the note text or null if note not found
*
- * @access public
* @static
*/
public static function getNoteText($id) {
*
* @return string the note subject or null if note not found
*
- * @access public
* @static
*/
public static function getNoteSubject($id) {
*
* @return boolean TRUE if the note should be displayed, otherwise FALSE
*
- * @access public
* @static
*/
public static function getNotePrivacyHidden($note) {
* @param array $ids (deprecated) associated array with note id - preferably set $params['id']
*
* @return object $note CRM_Core_BAO_Note object
- * @access public
* @static
*/
public static function &add(&$params, $ids = array()) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return boolean
- * @access public
* @static
*/
public static function dataExists(&$params) {
* @param int $numNotes the maximum number of notes to return (0 if all)
*
* @return object $notes Object of CRM_Core_BAO_Note
- * @access public
* @static
*/
public static function &getValues(&$params, &$values, $numNotes = self::MAX_NOTES) {
*
* @return void
*
- * @access public
* @static
*/
public static function deleteContact($id) {
*
* @return array $viewNote array of note properties
*
- * @access public
* @static
*/
public static function &getNote($id, $entityTable = 'civicrm_relationship') {
*
* @return int $count count of log records
*
- * @access public
* @static
*/
public static function getContactNoteCount($contactID) {
* @return array Nested associative array beginning with direct children of given note.
*
* @static
- * @access public
*/
public static function getNoteTree($parentId, $maxDepth = 0, $snippet = FALSE) {
return self::buildNoteTree($parentId, $maxDepth, $snippet);
* @return int $count Number of notes having the give note as parent
*
* @static
- * @access public
*/
public static function getChildCount($id) {
$note = new CRM_Core_DAO_Note();
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return object CRM_Core_BAO_OpenID object on success, null otherwise
- * @access public
* @static
*/
public static function add(&$params) {
* @param array $entityBlock input parameters to find object
*
* @return mixed
- * @access public
* @static
*/
public static function &getValues($entityBlock) {
* @param string $identity_url the OpenID to check
*
* @return boolean
- * @access public
* @static
*/
public static function isAllowedToLogin($identity_url) {
* @param bool $updateBlankLocInfo
*
* @return array the array of openid's
- * @access public
* @static
*/
public static function allOpenIDs($id, $updateBlankLocInfo = FALSE) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_BAO_OptionGroup object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
*
- * @access public
* @static
*
* @return object
*
* @return void
*
- * @access public
* @static
*/
public static function del($optionGroupId) {
*
* @return String title
*
- * @access public
* @static
*/
public static function getTitle($optionGroupId) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_BAO_OptionValue object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
*
- * @access public
* @static
*
* @return CRM_Core_DAO_OptionValue
*
* @return boolean
*
- * @access public
* @static
*/
public static function del($optionValueId) {
*
* @return array label and description
* @static
- * @access public
*/
public static function getActivityTypeDetails($activityTypeId) {
$query = "SELECT civicrm_option_value.label, civicrm_option_value.description
*
* @return string title
*
- * @access public
* @static
*
*/
* @param array $opWeights options value , weight pair
*
* @return void
- * @access public
* @static
*/
public static function updateOptionWeights($opGroupId, $opWeights) {
* @param void
*
* @return int Group ID (null if Group ID doesn't exist)
- * @access private
*/
private static function _getGid() {
if (!self::$_gid) {
*
* @return array (reference) List of Paper Sizes
* @static
- * @access public
*/
public static function &addOrder(&$list, $returnURL) {
$filter = "option_group_id = " . self::_getGid();
*
* @return array (reference) Paper Size list
* @static
- * @access public
*/
public static function &getList($namesOnly = FALSE) {
static $list = array();
*
* @return array Name/value pairs containing the default Paper Size values.
* @static
- * @access public
*/
public static function &getDefaultValues() {
$params = array('is_active' => 1, 'is_default' => 1);
* @param int $val Field value to search for
*
* @return array $values (reference) associative array of name/value pairs
- * @access public
*/
public static function &getPaperFormat($field, $val) {
$params = array('is_active' => 1, $field => $val);
* @param int $name Paper Size name. Empty = get default Paper Size
*
* @return array $values (reference) associative array of name/value pairs
- * @access public
*/
public static function &getByName($name) {
return self::getPaperFormat('name', $name);
* @param int $id Paper Size id. 0 = get default Paper Size
*
* @return array $values (reference) associative array of name/value pairs
- * @access public
*/
public static function &getById($id) {
return self::getPaperFormat('id', $id);
* @param null $default
*
* @return value
- * @access public
* @static
*/
public static function getValue($field, &$values, $default = NULL) {
* @param array $values (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_DAO_OptionValue object
- * @access public
* @static
*/
public static function retrieve(&$params, &$values) {
* @param int $id id of the database record (null = new record)
*
* @return void
- * @access public
*/
public function savePaperSize(&$values, $id) {
// get the Option Group ID for Paper Sizes (create one if it doesn't exist)
*
* @param int $id ID of the Paper Size to be deleted.
*
- * @access public
* @static
*/
public static function del($id) {
* @param void
*
* @return array array of page orientations
- * @access public
*/
public static function getPageOrientations() {
return array(
* @param void
*
* @return array array of measurement units
- * @access public
*/
public static function getUnits() {
return array(
* @param void
*
* @return int Group ID (null if Group ID doesn't exist)
- * @access private
*/
private static function _getGid() {
if (!self::$_gid) {
*
* @return void
* @static
- * @access public
*/
public static function addOrder(&$list, $returnURL) {
$filter = "option_group_id = " . self::_getGid();
*
* @return array (reference) PDF Page Format list
* @static
- * @access public
*/
public static function &getList($namesOnly = FALSE) {
static $list = array();
*
* @return array Name/value pairs containing the default PDF Page Format values.
* @static
- * @access public
*/
public static function &getDefaultValues() {
$params = array('is_active' => 1, 'is_default' => 1);
* @param int $val Field value to search for
*
* @return array $values (reference) associative array of name/value pairs
- * @access public
*/
public static function &getPdfFormat($field, $val) {
$params = array('is_active' => 1, $field => $val);
* @param int $name PDF Page Format name. Empty = get default PDF Page Format
*
* @return array $values (reference) associative array of name/value pairs
- * @access public
*/
public static function &getByName($name) {
return self::getPdfFormat('name', $name);
* @param int $id PDF Page Format id. 0 = get default PDF Page Format
*
* @return array $values (reference) associative array of name/value pairs
- * @access public
*/
public static function &getById($id) {
return self::getPdfFormat('id', $id);
* @param null $default
*
* @return value
- * @access public
* @static
*/
public static function getValue($field, &$values, $default = NULL) {
* @param array $values (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_DAO_OptionValue object
- * @access public
* @static
*/
public static function retrieve(&$params, &$values) {
* @param int $id id of the database record (null = new record)
*
* @return void
- * @access public
*/
public function savePdfFormat(&$values, $id = NULL) {
// get the Option Group ID for PDF Page Formats (create one if it doesn't exist)
*
* @param int $id ID of the PDF Page Format to be deleted.
*
- * @access public
* @static
*/
public static function del($id) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_BAO_Persistent object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
*
- * @access public
* @static
*
* @return object
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return object CRM_Core_BAO_Phone object on success, null otherwise
- * @access public
* @static
*/
public static function add(&$params) {
* @param array entityBlock input parameters to find object
*
* @return array array of phone objects
- * @access public
* @static
*/
public static function &getValues($entityBlock) {
* @param array $filters
*
* @return array the array of phone ids which are potential numbers
- * @access public
* @static
*/
public static function allPhones($id, $updateBlankLocInfo = FALSE, $type = NULL, $filters = array()) {
* @param null $type
*
* @return array the array of phone ids which are potential numbers
- * @access public
* @static
*/
public static function allEntityPhones($entityElements, $type = NULL) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_BAO_PreferencesDate object on success, null otherwise
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return Object DAO object on sucess, null otherwise
*
- * @access public
* @static
*/
public static function setIsActive($id, $is_active) {
*
* @param int $id
*
- * @access public
* @static
*/
public static function del($id) {
*\r
* @param array $params reference array contains the values submitted by the form\r
*\r
- * @access public\r
* @static\r
*\r
* @return object\r
* @param int $entityId Child entity id\r
* @param String $entityTable Name of the entity table\r
*\r
- * @access public\r
* @static\r
*\r
* @return object\r
*\r
* @param int $mode Mode of the entity to cascade changes across parent/child relations eg 1 - only this entity, 2 - this and the following entities, 3 - All the entity\r
*\r
- * @access public\r
*\r
* @return void\r
*/\r
* @param int $mode 1. retrieve only one entity. 2. retrieve all future entities in the repeating set. 3. all entities in the repeating set.\r
* @param int $initiatorId the instance where this function is invoked from\r
*\r
- * @access public\r
* @static\r
*\r
* @return array an array of child ids\r
* @param boolean $includeParent Include parent in result set\r
* @param int $mode 1. retrieve only one entity. 2. retrieve all future entities in the repeating set. 3. all entities in the repeating set.\r
*\r
- * @access public\r
* @static\r
*\r
* @return array array of connected ids\r
* @param string $entityTable Entity table name\r
* @param boolean $includeParent Include parent in result set\r
*\r
- * @access public\r
* @static\r
*\r
* @return int unsigned $parentId Parent ID\r
* @param array $newParams array of all the fields & values to be copied besides the other fields\r
* @param boolean $createRecurringEntity if to create a record in recurring_entity table\r
*\r
- * @access public\r
* @static\r
*\r
* @return object\r
*\r
* @param object $event An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just updated\r
*\r
- * @access public\r
* @static\r
*\r
* @return void\r
*\r
* @param object $event An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just inserted\r
*\r
- * @access public\r
* @static\r
*\r
* @return void\r
*\r
* @param object $event An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just deleted\r
*\r
- * @access public\r
* @static\r
*\r
* @return void\r
* @param int $entityId Entity id\r
* @param string $entityTable Name of the entity table\r
*\r
- * @access public\r
* @static\r
*\r
* @return boolean|object Returns either boolean value or CRM_Core_DAO_RecurringEntity object\r
*\r
* @param int $scheduleReminderId primary key of civicrm_action_schedule table\r
*\r
- * @access public\r
* @static\r
*\r
* @return object\r
* @param DateTime $startDate Start Date\r
* @param DateTime $endDate End Date\r
*\r
- * @access public\r
* @static\r
*\r
* @return object DateTime object which contain time difference\r
* @param int $entityId Entity ID\r
* @param string $used_for Specifies for which entity type it's used for\r
*\r
- * @access public\r
* @static\r
*\r
* @return object\r
* @return true if successfully created, false otherwise
*
* @static
- * @access public
*/
public static function createTable(&$params) {
$sql = self::buildTableSQL($params);
* @return true if successfully deleted, false otherwise
*
* @static
- * @access public
*/
public static function dropTable($tableName) {
$sql = "DROP TABLE $tableName";
*
* @return boolean true if item is already in cache
* @static
- * @access public
*/
static function inCache(
$group,
*
* @return mixed The data if present in the setting table, else null
* @static
- * @access public
*/
static function getItem(
$group,
* @domains array an array of domains to get settings for. Default is the current domain
* @return void
* @static
- * @access public
*/
public static function getItems(&$params, $domains = NULL, $settingsToReturn) {
$originalDomain = CRM_Core_Config::domainID();
*
* @return void
* @static
- * @access public
*/
static function setItem(
$value,
* @domains array an array of domains to get settings for. Default is the current domain
* @return array
* @static
- * @access public
*/
public static function setItems(&$params, $domains = NULL) {
$originalDomain = CRM_Core_Config::domainID();
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return object CRM_Core_DAO_Tag object on success, otherwise null
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param int $id tag id
*
* @return boolean
- * @access public
* @static
*
*/
* signatures
*
* @return object CRM_Core_DAO_Tag object on success, otherwise null
- * @access public
* @static
*/
public static function add(&$params, $ids = array()) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return boolean
- * @access public
* @static
*/
public static function dataExists(&$params) {
* @param string $entityTable entity_table
*
* @return array $tagSets array of tag sets
- * @access public
* @static
*/
public static function getTagSet($entityTable) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_BAO_UFField object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return string title
*
- * @access public
* @static
*
*/
* @param boolean $is_active value we want to set the is_active field
*
* @return Object DAO object on sucess, null otherwise
- * @access public
* @static
*/
public static function setIsActive($id, $is_active) {
*
* @return boolean
*
- * @access public
* @static
*
*/
* @return mixed
* @ids array $ids array that containd ids
*
- * @access public
* @static
*/
public static function duplicateField($params, $ids) {
*
* @return CRM_Core_BAO_UFField object
*
- * @access public
* @static
*
*/
*
* @return void
* @static
- * @access public
*/
public static function setUFField($customFieldId, $is_active) {
//find the profile id given custom field
*
* @return void
* @static
- * @access public
*/
public static function copy($old_id, $new_id) {
$ufField = new CRM_Core_DAO_UFField();
* @return void
*
* @static
- * @access public
*/
public static function delUFField($customFieldId) {
//find the profile id given custom field id
*
* @return void
* @static
- * @access public
*/
public static function setUFFieldStatus($customGroupId, $is_active) {
//find the profile id given custom group id
*
* @return boolean false if custom field are disabled else true
* @static
- * @access public
*/
public static function checkUFStatus($UFFieldId) {
$fieldName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFField', $UFFieldId, 'field_name');
* @param int $ufGroupId
*
* @return true for mix profile else false
- * @access public
* @static
*/
public static function checkProfileType($ufGroupId) {
* @param bool $skipComponentType
*
* @return string profile group_type
- * @access public
* @static
*
* TODO Why is this function in this class? It seems to be about the UFGroup.
* @param bool $skipComponentType
*
* @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
- * @access public
* @static
*/
public static function checkProfileGroupType($ctype) {
* @param array $defaults (reference) an assoc array to hold the flattened values
*
* @return object CRM_Core_DAO_UFGroup object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return string title
*
- * @access public
* @static
*
*/
* @param boolean $is_active value we want to set the is_active field
*
* @return Object CRM_Core_DAO_UFGroup object on success, null otherwise
- * @access public
* @static
*/
public static function setIsActive($id, $is_active) {
*
* @return array the fields that are needed for registration
* @static
- * @access public
*/
public static function getRegistrationFields($action, $mode, $ctype = NULL) {
if ($mode & CRM_Profile_Form::MODE_REGISTER) {
* @param int $permissionType
* @return array the fields that are listings related
* @static
- * @access public
*/
static function getListingFields(
$action,
*
* @return array the fields that belong to this ufgroup(s)
* @static
- * @access public
*/
static function getFields(
$id,
* @pram boolean $register is this the registrtion form
* @return boolean true if form is valid
* @static
- * @access public
*/
public static function isValid($userID, $title, $register = FALSE, $action = NULL) {
if ($register) {
*
* @return string the html for the form on success, otherwise empty string
* @static
- * @access public
*/
static function getEditHTML($userID,
$title,
* @param string $contactType
*
* @return int|null contact_id if found, null otherwise
- * @access public
* @static
*/
public static function findContact(&$params, $id = NULL, $contactType = 'Individual') {
* @param null $additionalWhereClause
*
* @return void
- * @access public
* @static
*/
public static function getValues($cid, &$fields, &$values,
*
* @return boolean
*
- * @access public
* @static
*
*/
*
* @return boolean
*
- * @access public
* @static
*
*/
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
*
- * @access public
* @static
*
* @return object
* @param int $ufGroupId ufgroup id
*
* @return void
- * @access public
* @static
*/
public static function createUFJoin(&$params, $ufGroupId) {
*
* @return array $ufGroupJoinRecords
*
- * @access public
* @static
*/
public static function getUFJoinRecord($ufGroupId = NULL, $displayName = NULL, $status = NULL) {
* @param array $params (reference) an assoc array of name/value pairs
*
* @return CRM_Core_BAO_UFJoin object
- * @access public
* @static
*/
public static function addUFJoin(&$params) {
* @param array $params (reference) an assoc array of name/value pairs
*
* @return void
- * @access public
* @static
*/
public static function delUFJoin(&$params) {
* @param int $ufGroupId if $ufGroupId get update weight or add weight
*
* @return int weight of the UFGroup
- * @access public
* @static
*/
public static function getWeight($ufGroupId = NULL) {
* @param array|NULL $returnFields list of UFGroup fields to return; NULL for default
*
* @return array $ufGroups array of ufgroups for a module
- * @access public
* @static
*/
public static function getModuleUFGroup($moduleName = NULL, $count = 0, $skipPermission = TRUE, $op = CRM_Core_Permission::VIEW, $returnFields = NULL) {
*
* @return boolean true or false
* @static
- * @access public
*/
public static function filterUFGroups($ufGroupId, $contactID = NULL) {
if (!$contactID) {
*
* @return null
* @static
- * @access public
*/
static function buildProfile(
&$form,
*
* @return null
* @static
- * @access public
*/
static function setProfileDefaults($contactId, &$fields, &$defaults,
$singleProfile = TRUE, $componentId = NULL, $component = NULL
*
* @return array $profiles associative array of profiles
* @static
- * @access public
*/
public static function getProfiles($types, $onlyPure = FALSE) {
$profiles = array();
*
* @return array $profiles associative array of profiles
* @static
- * @access public
*/
public static function getValidProfiles($required, $optional = NULL) {
if (!is_array($required) || empty($required)) {
*
* @return array $profiles associative array of profiles
* @static
- * @access public
*/
public static function checkValidProfile($ufId, $required = NULL) {
$validProfile = FALSE;
* @param $defaults
*
* @return mixed $defaults@static
- * @access public
*/
public static function setRegisterDefaults(&$fields, &$defaults) {
$config = CRM_Core_Config::singleton();
* @param int $id the profile id to copy
*
* @return void
- * @access public
*/
public static function copy($id) {
$fieldsFix = array('prefix' => array('title' => ts('Copy of ')));
* @param array $values associative array of name/value pair
*
* @return void
- * @access public
*/
public static function commonSendMail($contactID, &$values) {
* @param bool $skipCheck
*
* @return array
- * @access public
*/
public function checkFieldsEmptyValues($gid, $cid, $params, $skipCheck = FALSE) {
if ($gid) {
* @param CRM_Core_Smarty $template
*
* @return void
- * @access public
*/
public function profileDisplay($gid, $values, $template) {
$groupTitle = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', $gid, 'title');
* @param int $contactId
*
* @return array $data assoicated formatted array
- * @access public
* @static
*/
public static function formatFields($params, $contactId = NULL) {
*
* @return boolean $mixProfile true if profile is mixed
* @static
- * @access public
*/
public static function checkForMixProfiles($profileIds) {
$mixProfile = FALSE;
*
* @return boolean true if profile should be shown else false
* @static
- * @access public
*/
public static function showOverlayProfile() {
$showOverlay = TRUE;
*
* @return Array group type values
* @static
- * @access public
*/
public static function groupTypeValues($profileId, $groupType = NULL) {
$groupTypeValue = array();
* @param array $params (reference) an assoc array of name/value pairs
*
* @return CRM_Core_DAO_UFJoin object
- * @access public
* @static
*/
public static function &create($params) {
* @param array $params (reference) an assoc array of name/value pairs
*
* @return int or null
- * @access public
* @static
*/
public static function findJoinEntryId(&$params) {
* @param array $params (reference) an assoc array of name/value pairs
*
* @return int or null
- * @access public
* @static
*/
public static function findUFGroupId(&$params) {
* @param bool $isLogin
*
* @return void
- * @access public
* @static
*/
public static function synchronize(&$user, $update, $uf, $ctype, $isLogin = FALSE) {
* @param bool $isLogin
*
* @return the ufmatch object that was found or created
- * @access public
* @static
*/
public static function &synchronizeUFMatch(&$user, $userKey, $uniqId, $uf, $status = NULL, $ctype = NULL, $isLogin = FALSE) {
* @param int $contactId id of the contact to update
*
* @return void
- * @access public
* @static
*/
public static function updateUFName($contactId) {
* @param $emailAddress email to be modified for the user
*
* @return void
- * @access public
* @static
*/
public static function updateContactEmail($contactId, $emailAddress) {
* @param int $ufID id of the user to delete
*
* @return void
- * @access public
* @static
*/
public static function deleteUser($ufID) {
* @param int $ufID Id of UF for which related contact_id is required
*
* @return int contact_id on success, null otherwise
- * @access public
* @static
*/
public static function getContactId($ufID) {
* @param int $contactID ID of the contact for which related uf_id is required
*
* @return int uf_id of the given contact_id on success, null otherwise
- * @access public
* @static
*/
public static function getUFId($contactID) {
*
*
* @return int contact_id on success, null otherwise
- * @access public
* @static
*/
public static function getContactIDs() {
* @param int $openId
*
* @return bool true if allowed to login, false otherwise
- * @access public
* @static
*/
public static function getAllowedToLogin($openId) {
*
*
* @return int next highest unused value for uf_id
- * @access public
* @static
*/
public static function getNextUfIdValue() {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return object CRM_Core_BAO_Website object on success, null otherwise
- * @access public
* @static
*/
public static function add(&$params) {
* @param $skipDelete
*
* @return void
- * @access public
* @static
*/
public static function create(&$params, $contactID, $skipDelete) {
* @param $values
*
* @return boolean
- * @access public
* @static
*/
public static function &getValues(&$params, &$values) {
* @param bool $updateBlankLocInfo
*
* @return array the array of website details
- * @access public
* @static
*/
public static function allWebsites($id, $updateBlankLocInfo = FALSE) {
/**
* Class constructor
*
- * @access public
* @return \CRM_Core_DAO_WordReplacement
*/
/**
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_DAO_WordRepalcement object
- * @access public
* @static
*/
* @param null $reset
*
* @return null|object CRM_Core_BAO_WordRepalcement
- * @access public
* @static
*/
public static function getWordReplacement($reset = NULL) {
* @param int $id
*
* @return WordReplacement array
- * @access public
*/
public static function edit(&$params, &$id) {
$wordReplacement = new CRM_Core_DAO_WordReplacement();
* @param array $params
*
* @return WordReplacement array
- * @access public
*/
public static function create($params) {
if(array_key_exists("domain_id",$params) === FALSE) {
* Creates the info block for drupal
*
* @return array
- * @access public
*/
public static function getInfo() {
* @param int $id
*
* @return void
- * @access private
*/
private static function setTemplateValues($id) {
switch ($id) {
* Create the list of options to create New objects for the application and format is as a block
*
* @return void
- * @access private
*/
private static function setTemplateShortcutValues() {
$config = CRM_Core_Config::singleton();
* Create the list of dashboard links
*
* @return void
- * @access private
*/
private static function setTemplateDashboardValues() {
static $dashboardLinks = array();
* Create the list of mail urls for the application and format is as a block
*
* @return void
- * @access private
*/
private static function setTemplateMailValues() {
static $shortCuts = NULL;
* Create the list of shortcuts for the application and format is as a block
*
* @return void
- * @access private
*/
private static function setTemplateMenuValues() {
$config = CRM_Core_Config::singleton();
* Create the event blocks for upcoming events
*
* @return void
- * @access private
*/
private static function setTemplateEventValues() {
$config = CRM_Core_Config::singleton();
* @param int $id id of the block
*
* @return array
- * @access public
*/
public static function getContent($id) {
// return if upgrade mode
* @param array $properties template variables
*
* @return array
- * @access public
*/
public static function fetch($id, $fileName, $properties) {
$template = CRM_Core_Smarty::singleton();
* @param array $tables array of tables
*
* @return null
- * @access public
* @static
*/
public static function tableNames(&$tables) {
* @param $oldMode
*
* @return array collection of component settings
- * @access public
*/
public function add($config, $oldMode) {
foreach (get_class_vars(get_class($this)) as $key => $value) {
* class.
*
* @return array collection of required component settings
- * @access public
*
*/
abstract public function getInfo();
* @param bool $getAllUnconditionally
*
* @return array|null collection of permissions, null if none
- * @access public
*/
abstract public function getPermissions($getAllUnconditionally = FALSE);
*
* @return array|null collection of required dashboard settings,
* null if no element offered
- * @access public
*
*/
abstract public function getUserDashboardElement();
*
* @return array|null collection of required dashboard settings,
* null if no element offered
- * @access public
*
*/
abstract public function registerTab();
*
* @return array|null collection of required pane settings,
* null if no element offered
- * @access public
*
*/
abstract public function registerAdvancedSearchPane();
* class.
*
* @return array|null collection of activity types
- * @access public
*
*/
abstract public function getActivityTypes();
* marked as enabled in configuration.
*
* @return boolean true if component is enabled, false if not
- * @access public
*
*/
public function isEnabled() {
* Provides component's configuration object.
*
* @return mixed component's configuration object
- * @access public
*
*/
public function getConfigObject() {
* Provides component's menu definition object.
*
* @return mixed component's menu definition object
- * @access public
*
*/
public function getMenuObject() {
* Provides component's invocation object.
*
* @return mixed component's invocation object
- * @access public
*
*/
public function getInvokeObject() {
* Provides component's BAO Query object.
*
* @return mixed component's BAO Query object
- * @access public
*
*/
public function getBAOQueryObject() {
/**
* Builds advanced search form's component specific pane.
*
- * @access public
*
*/
public function buildAdvancedSearchPaneForm(&$form) {
* Provides component's user dashboard page object.
*
* @return mixed component's User Dashboard applet object
- * @access public
*
*/
public function getUserDashboardObject() {
* Provides component's contact record tab object.
*
* @return mixed component's contact record tab object
- * @access public
*
*/
public function getTabObject() {
* Provides component's advanced search pane's template path.
*
* @return string component's advanced search pane's template path
- * @access public
*
*/
public function getAdvancedSearchPaneTemplatePath() {
* Provides information whether given component uses system wide search.
*
* @return boolean true if component needs search integration
- * @access public
*
*/
public function usesSearch() {
* Provides the xml menu files
*
* @return array array of menu files
- * @access public
*
*/
public function menuFiles() {
* FIXME: accessed from beyond component infrastructure.
*
* @return string component keyword
- * @access public
*
*/
public function getKeyword() {
* Helper for figuring out menu XML file location.
*
* @return mixed component's element as class instance
- * @access private
*
*/
private function _getMenuXMLPath() {
* @param $cl
*
* @return mixed component's element as class instance
- * @access private
*/
private function _instantiate($cl) {
$className = $this->namespace . '_' . $cl;
* Initialize the DataObject framework
*
* @return void
- * @access private
*/
private function _initDAO() {
CRM_Core_DAO::init($this->dsn);
* Returns the singleton logger for the application
*
* @param
- * @access private
*
* @return object
*/
* Initialize the config variables
*
* @return void
- * @access private
*/
private function _initVariables() {
// retrieve serialised settings
* Retrieve a mailer to send any mail from the application
*
* @param boolean $persist open a persistent smtp connection, should speed up mailings
- * @access private
* @return object
*/
public static function &getMailer($persist = FALSE) {
*
* @return boolean
* @static
- * @access public
*/
public static function check(&$config, &$required) {
foreach ($required as $name) {
/**
* Format size
*
- * @access public
* @static
*/
* this variable is set true for GUI
* mode (eg: Global setting >> Components)
*
- * @access public
* @static
*/
public static function setValues(&$defaults, $formMode = FALSE) {
* @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
*/
* @param string directory to store all the uploaded files
* @param array names for the various upload buttons (note u can have more than 1 upload)
*
- * @access private
*
* @return void
*
* Getter method for stateMachine
*
* @return CRM_Core_StateMachine
- * @access public
*/
public function getStateMachine() {
return $this->_stateMachine;
* @param CRM_Core_StateMachine $stateMachine
*
* @return void
- * @access public
*/
public function setStateMachine($stateMachine) {
$this->_stateMachine = $stateMachine;
* typicaly this will be add/view/edit
*
* @return void
- * @access public
*/
public function addPages(&$stateMachine, $action = CRM_Core_Action::NONE) {
$pages = $stateMachine->getPages();
* the other as an image, both are of type 'submit'.
*
* @return string the name of the button that has been pressed by the user
- * @access public
*/
public function getButtonName() {
$data = &$this->container();
/**
* Destroy all the session state of the controller.
*
- * @access public
*
* @return void
*/
* and can change based on the arguments
*
* @return void
- * @access public
*/
public function process() {}
* @param string|array $name name of the variable or an assoc array of name/value pairs
* @param mixed $value value of the variable if string
*
- * @access public
*
* @return void
*
*
* @param string $name : name of the variable
*
- * @access public
*
* @return mixed
* @param string $currentPageName name of the page being displayed
*
* @return array
- * @access public
*/
public function wizardHeader($currentPageName) {
$wizard = array();
* @param mixed $value value of varaible
*
* @return void
- * @access public
*/
public function assign($var, $value = NULL) {
self::$_template->assign($var, $value);
* @param mixed $value (reference) value of varaible
*
* @return void
- * @access public
*/
public function assign_by_ref($var, &$value) {
self::$_template->assign_by_ref($var, $value);
* @param boolean $embedded
*
* @return void
- * @access public
*/
public function setEmbedded($embedded) {
$this->_embedded = $embedded;
* Getter for embedded
*
* @return boolean return the embedded value
- * @access public
*/
public function getEmbedded() {
return $this->_embedded;
* @param boolean $skipRedirection
*
* @return void
- * @access public
*/
public function setSkipRedirection($skipRedirection) {
$this->_skipRedirection = $skipRedirection;
* Getter for skipRedirection
*
* @return boolean return the skipRedirection value
- * @access public
*/
public function getSkipRedirection() {
return $this->_skipRedirection;
* @param boolean $print
*
* @return void
- * @access public
*/
public function setPrint($print) {
if ($print == "xls") {
* Getter for print
*
* @return boolean return the print value
- * @access public
*/
public function getPrint() {
return $this->_print;
*
*
* @return \CRM_Core_Controller_Simple
- * @access public
*/
function __construct(
$path,
* @param string $dsn the database connection string
*
* @return void
- * @access private
* @static
*/
public static function init($dsn) {
* by resetting some of DAO's internal fields. Use this with caution
*
* @return void
- * @access public
*
*/
public function reset() {
* @param object $factory the factory application object
*
* @return void
- * @access public
* @static
*/
public static function setFactory(&$factory) {
* @param string $table
*
* @return void
- * @access public
*/
public function factory($table = '') {
if (!isset(self::$_factory)) {
* we need to set the links manually.
*
* @return void
- * @access protected
*/
public function initialize() {
$this->_connect();
/**
* Defines the default key as 'id'.
*
- * @access protected
*
* @return array
*/
* Tells DB_DataObject which keys use autoincrement.
* 'id' is autoincrementing by default.
*
- * @access protected
*
* @return array
*/
* Returns list of FK relationships
*
* @static
- * @access public
*
* @return array of CRM_Core_Reference_Interface
*/
/**
* Returns all the column names of this table
*
- * @access public
*
* @return array
*/
/**
* Get/set an associative array of table columns
*
- * @access public
* @param array key=>type array
* @return array (associative)
*/
* @param array $params (reference ) associative array of name/value pairs
*
* @return boolean did we copy all null values into the object
- * @access public
*/
public function copyValues(&$params) {
$fields = &$this->fields();
* @param array $values (reference ) associative array of name/value pairs
*
* @return void
- * @access public
* @static
*/
public static function storeValues(&$object, &$values) {
* @param array $field the field under task
*
* @return array|null the attributes for the object
- * @access public
* @static
*/
public static function makeAttribute($field) {
* you want the attributes for all DAO text fields
*
* @return array assoc array of name => attribute pairs
- * @access public
* @static
*/
public static function getAttribute($class, $fieldName = NULL) {
* @param string $fieldName the name of the field in the DAO
*
* @return boolean true if object exists
- * @access public
* @static
*/
public static function objectExists($value, $daoName, $daoID, $fieldName = 'name') {
*
* @return string|null Value of $returnColumn in the retrieved record
* @static
- * @access public
*/
public static function getFieldValue($daoName, $searchValue, $returnColumn = 'name', $searchColumn = 'id', $force = FALSE) {
if (
*
* @return boolean true if we found and updated the object, else false
* @static
- * @access public
*/
public static function setFieldValue($daoName, $searchValue, $setColumn, $setValue, $searchColumn = 'id') {
$object = new $daoName( );
* @param string $default - default sort value
*
* @return string - sortString
- * @access public
* @static
*/
public static function getSortString($sort, $default = NULL) {
* @param array $returnProperities an assoc array of fields that need to be returned, eg array( 'first_name', 'last_name')
*
* @return object an object of type referenced by daoName
- * @access public
* @static
*/
public static function commonRetrieve($daoName, &$params, &$defaults, $returnProperities = NULL) {
* @param int $contactId id of the contact to delete
*
* @return void
- * @access public
* @static
*/
public static function deleteEntityContact($daoName, $contactId) {
*
* @return CRM_Core_DAO object that holds the results of the query
* @static
- * @access public
*/
static function &executeQuery(
$query,
* @return string|null the result of the query if any
*
* @static
- * @access public
*/
static function &singleValueQuery($query,
$params = array(),
*
*
* @return (reference ) the newly created copy of the object
- * @access public
*/
static function ©Generic($daoName, $criteria, $newData = NULL, $fieldsFix = NULL, $blockCopyOfDependencies = NULL) {
$object = new $daoName( );
* @param array $returnProperities an assoc array of fields that need to be returned, eg array( 'first_name', 'last_name')
*
* @return object an object of type referenced by daoName
- * @access public
* @static
*/
public static function commonRetrieveAll($daoName, $fieldIdName = 'id', $fieldId, &$details, $returnProperities = NULL) {
* @param object PEAR_Error
*
* @return void
- * @access public
*/
public static function handle($pearError) {
*
* @return void
* @static
- * @access public
*/
public static function fatal($message = NULL, $code = NULL, $email = NULL) {
$vars = array(
*
* @return void
* @static
- * @access public
*/
public static function handleUnhandledException($exception) {
$config = CRM_Core_Config::singleton();
* subsystem is not initialized - CRM-13765
*
* @return string the generated output
- * @access public
* @static
*/
public static function debug($name, $variable = NULL, $log = TRUE, $html = TRUE, $checkPermission = TRUE) {
*
* @return string the generated output
*
- * @access public
*
* @static
*
* @param string $comp message to be output
* @return string format of the backtrace
*
- * @access public
*
* @static
*/
* @param null $redirect
* @param string $title
* @return void
- * @access public
* @static
*/
public static function statusBounce($status, $redirect = NULL, $title = NULL) {
/**
* Reset the error stack
*
- * @access public
* @static
*/
public static function reset() {
*
* @param object $obj The PEAR_ERROR object
* @return object $obj
- * @access public
* @static
*/
public static function nullHandler($obj) {
* @param string $name The name of the form if different from class name
*
* @return \CRM_Core_Form
- * @access public
*/
function __construct(
$state = NULL,
* Register all the standard rules that most forms potentially use
*
* @return void
- * @access private
*
*/
public function registerRules() {
* @param array $extra (attributes for select elements)
*
* @return HTML_QuickForm_Element could be an error object
- * @access public
*/
function &add($type, $name, $label = '',
$attributes = '', $required = FALSE, $extra = NULL
*
* This is a virtual function and should be redefined if needed
*
- * @access public
*
* @return void
*
*
* This is a virtual function and should be redefined if needed
*
- * @access public
*
* @return void
*
* buildForm associated with QuickForm_Page. This allows us to put
* preProcess in front of the actual form building routine
*
- * @access public
*
* @return void
*
* the form. Keeping it distinct from the form to keep code small
* and localized in the form building code
*
- * @access public
*
* @return void
*
/**
* Performs the server side validation
- * @access public
* @since 1.0
* @return boolean true if no error found
* @throws HTML_QuickForm_Error
*
* @return void
*
- * @access public
*
*/
public function addButtons($params) {
* Getter function for Name
*
* @return string
- * @access public
*/
public function getName() {
return $this->_name;
* Getter function for State
*
* @return object
- * @access public
*/
public function &getState() {
return $this->_state;
* Getter function for StateType
*
* @return int
- * @access public
*/
public function getStateType() {
return $this->_state->getType();
* Getter function for title. Should be over-ridden by derived class
*
* @return string
- * @access public
*/
public function getTitle() {
return $this->_title ? $this->_title : ts('ERROR: Title is not Set');
* @param string $title the title of the form
*
* @return void
- * @access public
*/
public function setTitle($title) {
$this->_title = $title;
* @param mixed
*
* @return void
- * @access public
*/
public function setOptions($options) {
$this->_options = $options;
* Getter function for link.
*
* @return string
- * @access public
*/
public function getLink() {
$config = CRM_Core_Config::singleton();
* Boolean function to determine if this is a one form page
*
* @return boolean
- * @access public
*/
public function isSimpleForm() {
return $this->_state->getType() & (CRM_Core_State::START | CRM_Core_State::FINISH);
* Getter function for Form Action
*
* @return string
- * @access public
*/
public function getFormAction() {
return $this->_attributes['action'];
* @param string
*
* @return void
- * @access public
*/
public function setFormAction($action) {
$this->_attributes['action'] = $action;
* Render form and return contents
*
* @return string
- * @access public
*/
public function toSmarty() {
$this->preProcessChainSelectFields();
* create one and initialize it
*
* @return object
- * @access public
*/
public function &getRenderer() {
if (!isset($this->_renderer)) {
* Use the form name to create the tpl file name
*
* @return string
- * @access public
*/
public function getTemplateFileName() {
$ext = CRM_Extension_System::singleton()->getMapper();
* i.e. we dont override
*
* @return string
- * @access public
*/
public function overrideExtraTemplateFileName() {
return NULL;
* @param CRM_Core_DAO $dao A data access object on which we perform a rollback if non - empty
*
* @return void
- * @access public
*/
public function error($message, $code = NULL, $dao = NULL) {
if ($dao) {
* @param string name : name of the variable
* @param mixed value : value of the variable
*
- * @access public
*
* @return void
*
*
* @param string name : name of the variable
*
- * @access public
*
* @return mixed
*
* Getter for action
*
* @return int
- * @access public
*/
public function getAction() {
return $this->_action;
* @param int $action the mode we want to set the form
*
* @return void
- * @access public
*/
public function setAction($action) {
$this->_action = $action;
* @param mixed $value value of variable
*
* @return void
- * @access public
*/
public function assign($var, $value = NULL) {
self::$_template->assign($var, $value);
* @param mixed $value value of varaible
*
* @return void
- * @access public
*/
public function assign_by_ref($var, &$value) {
self::$_template->assign_by_ref($var, $value);
* @param bool|string $submitOnce If true, add javascript to next button submit which prevents it from being clicked more than once
*
* @return void
- * @access public
*/
public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
$buttons = array();
* - class, etc. - other html properties
* @param bool $required
*
- * @access public
* @return HTML_QuickForm_Element
*/
public function addEntityRef($name, $label = '', $props = array(), $required = FALSE) {
* Function that can be defined in Form to override or
* perform specific action on cancel action
*
- * @access public
*/
public function cancelAction() {}
* @param CRM_Core_Form $form the form object that we are operating on
*
* @static
- * @access public
*/
public static function buildAllowedDateFormats(&$form) {
*
*
* @static
- * @access public
*/
static function buildDateRange(
* 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
* @return None\r
*/\r
*\r
* @return array list of errors to be posted back to the form\r
* @static\r
- * @access public\r
*/\r
public static function formRule($values) {\r
$errors = array();\r
/**\r
* Process the form submission\r
*\r
- * @access public\r
*\r
* @return None\r
*/\r
* Return a descriptive name for the page, used in wizard header\r
*\r
* @return string\r
- * @access public\r
*/\r
public function getTitle() {\r
return ts('Repeat Entity');\r
/**
* Constructor
*
- * @access public
*/ function __construct() {
$template = CRM_Core_Smarty::singleton();
parent::__construct($template);
* work, but then we add some CiviCRM specific enhancements to
* make the html compliant with our css etc
*
- * @access private
*
* @param $element HTML_QuickForm_element
* @param $required bool - Whether an element is required
* Update the attributes of this element and add a few CiviCRM
* based attributes so we can style this form element better
*
- * @access private
*
* @param $element HTML_QuickForm_element object
* @param $required bool Whether an element is required
* Are we forced to run a search
*
* @var int
- * @access protected
*/
protected $_force;
* Name of search button
*
* @var string
- * @access protected
*/
protected $_searchButtonName;
* Name of action button
*
* @var string
- * @access protected
*/
protected $_actionButtonName;
* Form values that we will be using
*
* @var array
- * @access public
*/
public $_formValues;
/**
* Have we already done this search
*
- * @access protected
* @var boolean
*/
protected $_done;
/**
* What context are we being invoked from
*
- * @access protected
* @var string
*/
protected $_context = NULL;
* @param string $tagsetElementName if you need to create tagsetlist with specific name
*
* @return void
- * @access public
* @static
*/
static function buildQuickForm(&$form, $parentNames, $entityTable, $entityId = NULL, $skipTagCreate = FALSE,
* @param CRM_Core_Form $form form object
*
* @return void
- * @access public
* @static
*/
public static function postProcess(&$params, $entityId, $entityTable = 'civicrm_contact', &$form) {
* @return string, HTML
*
* @static
- * @access public
*/
public static function invoke($args) {
try {
* @param $contact_sub_type
*
* @static
- * @access public
*/
public static function form($action, $contact_type, $contact_sub_type) {
CRM_Utils_System::setUserContext(array('civicrm/contact/search/basic', 'civicrm/contact/view'));
* Class constructor
*
* @param void
- * @access public
*
*/
/**
/*
*
* @param void
- * @access private
*
*/
/**
* Class destructor
*
* @param void
- * @access public
*
*/
public function __destruct() {}
*
* @param void
* @return array ($id => CRM_Core_ScheduledJob)
- * @access private
*
*/
/**
* and creates ScheduledJob object.
*
* @param void
- * @access private
*
*/
/**
/*
*
* @return array|null collection of permissions, null if none
- * @access public
*
*/
/**
* to the smarty instance
*
* @return void
- * @access public
* @static
*/
public static function sidebarLeft() {
*
* @return string private key for this session
* @static
- * @access private
*/
public static function privateKey() {
if (!self::$_key) {
*
* @return string valid formID
* @static
- * @access public
*/
public static function get($name, $addSequence = FALSE) {
$privateKey = self::privateKey();
*
* @return string $formKey if valid, else null
* @static
- * @access public
*/
public static function validate($key, $name, $addSequence = FALSE) {
if (!is_string($key)) {
* @param boolen $fetchFromXML fetch the menu items from xml and not from cache
*
* @static
- * @access public
*/
public static function &items($fetchFromXML = FALSE) {
return self::xmlItems($fetchFromXML);
* @return array The breadcrumb for this path
*
* @static
- * @access public
*/
public static function buildBreadcrumb(&$menu, $path) {
$crumbs = array();
*
* @return void
*
- * @access public
* @static
*/
public static function lookupValues(&$params, &$names, $flip = FALSE) {
*
* @param string $groupName the name of the option group
*
- * @access public
* @static
*
* @return string the value from the row where is_default = true
* @param int $defaultID (reference) - the option value ID of the default element (if set) is returned else 'null'
* @param null $groupTitle the optional label of the option group else set to group name
*
- * @access public
* @static
*
* @return int the option group ID
*
* @return array of option-values
*
- * @access public
* @static
*/
public static function getRows($groupParams, $links, $orderBy = 'weight') {
*
* @return CRM_Core_DAO_OptionValue
*
- * @access public
* @static
*/
public static function addOptionValue(&$params, &$groupParams, &$action, &$optionValueID) {
* @param string $fieldName the name of the field in the DAO
*
* @return boolean true if object exists
- * @access public
* @static
*/
public static function optionExists($value, $daoName, $daoID, $optionGroupID, $fieldName = 'name') {
* @param string $contactType
*
* @return boolean true if object exists
- * @access public
* @static
*/
public static function getFields($mode = '', $contactType = 'Individual') {
* @param $query
*
* @return void
- * @access public
*/
public static function select(&$query) {
if (!empty($query->_params) || !empty($query->_returnProperties)) {
*
* @return array of option-values
*
- * @access public
* @static
*/
public static function getValues($groupParams, &$values, $orderBy = 'weight', $isActive = FALSE) {
* The name of the page (auto generated from class name)
*
* @var string
- * @access protected
*/
protected $_name;
* The title associated with this page
*
* @var object
- * @access protected
*/
protected $_title;
* A page can have multiple modes. (i.e. displays
* a different set of data based on the input
* @var int
- * @access protected
*/
protected $_mode;
* parent object takes care of the display)
*
* @var boolean
- * @access protected
*/
protected $_embedded = FALSE;
* functionality to do a minimal display :)
*
* @var boolean
- * @access protected
*/
protected $_print = FALSE;
* Cache the smarty template for efficiency reasons
*
* @var CRM_Core_Smarty
- * @access protected
* @static
*/
static protected $_template;
* Cache the session for efficiency reasons
*
* @var CRM_Core_Session
- * @access protected
* @static
*/
static protected $_session;
* @param string|array $name name of the variable or an assoc array of name/value pairs
* @param mixed $value value of the variable if string
*
- * @access public
*
* @return void
*
*
* @param string name : name of the variable
*
- * @access public
*
* @return mixed
*
* @param mixed $value value of varaible
*
* @return void
- * @access public
*/
public function assign($var, $value = NULL) {
self::$_template->assign($var, $value);
* @param mixed $value (reference) value of varaible
*
* @return void
- * @access public
*/
public function assign_by_ref($var, &$value) {
self::$_template->assign_by_ref($var, $value);
/**
* Destroy all the session state of this page.
*
- * @access public
*
* @return void
*/
* Use the form name to create the tpl file name
*
* @return string
- * @access public
*/
public function getTemplateFileName() {
return str_replace('_',
* i.e. we dont override
*
* @return string
- * @access public
*/
public function overrideExtraTemplateFileName() {
return NULL;
* @param boolean $embedded
*
* @return void
- * @access public
*/
public function setEmbedded($embedded) {
$this->_embedded = $embedded;
* Getter for embedded
*
* @return boolean return the embedded value
- * @access public
*/
public function getEmbedded() {
return $this->_embedded;
* @param boolean $print
*
* @return void
- * @access public
*/
public function setPrint($print) {
$this->_print = $print;
* Getter for print
*
* @return boolean return the print value
- * @access public
*/
public function getPrint() {
return $this->_print;
* Call generic ajax forms
*
* @static
- * @access public
*/
public static function run() {
$className = CRM_Utils_Type::escape($_REQUEST['class_name'], 'String');
* Change is_quick_config priceSet to complex
*
* @static
- * @access public
*/
public static function setIsQuickConfig() {
$id = $context = NULL;
* Name of the BAO to perform various DB manipulations
*
* @return string
- * @access public
*/
abstract function getBAOName();
* An array of action links
*
* @return array (reference)
- * @access public
*/
abstract function &links();
* Name of the edit form class
*
* @return string
- * @access public
*/
abstract function editForm();
* Name of the form
*
* @return string
- * @access public
*/
abstract function editName();
* @param int $mode mode that we are in
*
* @return string
- * @access public
*/
abstract function userContext($mode = NULL);
* @param int $mode mode that we are in
*
* @return string
- * @access public
*/
public function userContextParams($mode = NULL) {
return 'reset=1&action=browse';
* @param int $name the name or title of the object
*
* @return string permission value if permission is granted, else null
- * @access public
*/
public function checkPermission($id, $name) {
return CRM_Core_Permission::EDIT;
* @param CRM_Core_Controller $controller the controller object
*
* @return void
- * @access public
*/
public function addValues($controller) {}
* Browse all entities.
*
* @return void
- * @access public
*/
public function browse() {
$n = func_num_args();
* @param bool $forceAction
*
* @return void
- * @access private
*/
public function action(&$object, $action, &$values, &$links, $permission, $forceAction = FALSE) {
$values['class'] = '';
* @param CRM_Core_Form $form
*
* @return void
- * @access protected
*/
static protected function setBillingDetailsFields(&$form) {
$bltID = $form->_bltID;
* @param $component
*
* @return void
- * @access public
*/
public function doTransferCheckout(&$params, $component) {
$component = strtolower($component);
* @param object $cart object of googel cart
*
* @return void
- * @access public
*
*/
public function submitPostParams($params, $component, $cart) {
* @param int $orderNo <order-total> send by google
*
* @return amount
- * @access public
*/
public function getAmount($orderNo) {
$contribution = new CRM_Contribute_DAO_Contribution();
* @param $component
*
* @return void
- * @access public
*/
public function doTransferCheckout(&$params, $component) {
$component = strtolower($component);
*
* @return boolean true if yes, else false
* @static
- * @access public
*/
public static function check($permissions) {
$permissions = (array) $permissions;
*
* @return boolean true if yes, else false
* @static
- * @access public
*/
public static function checkGroupRole($array) {
$config = CRM_Core_Config::singleton();
* @param array $whereTables (reference ) add the tables that are needed for the where clause
*
* @return string the group where clause for this user
- * @access public
*/
public static function getPermissionedStaticGroupClause($type, &$tables, &$whereTables) {
$config = CRM_Core_Config::singleton();
* @param string $groupType type of group(Access/Mailing)
* @param bool|\boolen $excludeHidden exclude hidden groups.
*
- * @access public
* @static
*
* @return array - array reference of all groups.
* @param array $whereTables (reference ) add the tables that are needed for the where clause
*
* @return string the group where clause for this user
- * @access public
*/
public function whereClause($type, &$tables, &$whereTables) {
return '( 1 )';
* @param array $whereTables (reference ) add the tables that are needed for the where clause
*
* @return string the group where clause for this user
- * @access public
*/
public function getPermissionedStaticGroupClause($type, &$tables, &$whereTables) {
$this->group();
* @param string $groupType type of group(Access/Mailing)
* @param bool|\boolen $excludeHidden exclude hidden groups.
*
- * @access public
*
* @return array - array reference of all groups.
*/
* @param array $whereTables (reference ) add the tables that are needed for the where clause
*
* @return string the group where clause for this user
- * @access public
*/
public function groupClause($type, &$tables, &$whereTables) {
return ' (1) ';
* @param string $str the permission to check
*
* @return boolean true if yes, else false
- * @access public
*/
public function check($str) {
* @param array $array the roles to check
*
* @return boolean true if yes, else false
- * @access public
*/
public function checkGroupRole($array) {
* @param int $contactID
*
* @return boolean true if yes, else false
- * @access public
*/
public function check($str, $contactID = NULL) {
$str = $this->translatePermission($str, 'Drupal', array(
* @param array $array the roles to check
*
* @return boolean true if yes, else false
- * @access public
*/
public function checkGroupRole($array) {
if (function_exists('user_load') && isset($array)) {
* @param int $contactID
*
* @return boolean true if yes, else false
- * @access public
*/
public function check($str, $contactID = NULL) {
$str = $this->translatePermission($str, 'Drupal6', array(
* @param array $array the roles to check
*
* @return boolean true if yes, else false
- * @access public
*/
public function checkGroupRole($array) {
* @param string $groupType type of group(Access/Mailing)
* @param bool $excludeHidden exclude hidden groups.
*
- * @access public
*
* @return array - array reference of all groups.
*/
* @param array $whereTables (reference) add the tables that are needed for the where clause
*
* @return string the clause to add to the query retrieving viewable groups
- * @access public
*/
public function groupClause($type, &$tables, &$whereTables) {
if (!isset($this->_viewPermissionedGroups)) {
* @param array $array the roles to check
*
* @return boolean true if yes, else false
- * @access public
*
*/
public function checkGroupRole($array) {
* @param string $str the permission to check
*
* @return boolean true if yes, else false
- * @access public
*/
public function check($str) {
$config = CRM_Core_Config::singleton();
*
* @return boolean true if yes, else false
* @static
- * @access public
*/
public function checkGroupRole($array) {
return FALSE;
* @param string $str the permission to check
*
* @return boolean true if yes, else false
- * @access public
*/
public function check($str) {
* @param string $str the permission to check
*
* @return boolean true if yes, else false
- * @access public
*/
public function check($str) {
if ($str == CRM_Core_Permission::ALWAYS_DENY_PERMISSION) {
* @param array $whereTables (reference ) add the tables that are needed for the where clause
*
* @return string the group where clause for this user
- * @access public
*/
public function whereClause($type, &$tables, &$whereTables) {
return '( 1 )';
* @param string $str the permission to check
*
* @return boolean true if yes, else false
- * @access public
*/
public function check($str) {
// Generic cms 'administer users' role tranlates to 'administrator' WordPress role
* @param null $force
*
* @return void
- * @access public
* @static
*/
public static function populate(
* Flush given pseudoconstant so it can be reread from db
* nex time it's requested.
*
- * @access public
* @static
*
* @param bool|string $name pseudoconstant to be flushed
*
* The static array activityType is returned
*
- * @access public
* @static
*
* @return array - array reference of all activity types.
*
* Note: any database errors will be trapped by the DAO.
*
- * @access public
* @static
*
* @param bool|int $id - Optional id to return
*
* Same as above, except gets the abbreviations instead of the names.
*
- * @access public
* @static
*
* @param bool|int $id - Optional id to return
*
* Note: any database errors will be trapped by the DAO.
*
- * @access public
* @static
*
* @param bool|int $id - Optional id to return
*
* Note: any database errors will be trapped by the DAO.
*
- * @access public
* @static
*
* @param bool $id
* @param string $groupType type of group(Access/Mailing)
* @param bool $excludeHidden exclude hidden groups.
*
- * @access public
* @static
*
* @return array - array reference of all groups.
* called for the first time
*
*
- * @access public
* @static
*
* @param bool $styledLabels
* @param string $groupType type of group(Access/Mailing)
* @param bool $excludeHidden exclude hidden groups.
*
- * @access public
* @static
*
* @return array - array reference of all groups.
*
* Note: any database errors will be trapped by the DAO.
*
- * @access public
* @static
*
* @param bool $onlyPublic
* @param string $valueColumnName db column name/label.
* @param boolean $reset reset relationship types if true
*
- * @access public
* @static
*
* @return array - array reference of all relationship types.
*
* so far, we use this for validation only, so there's no point of putting this into the database
*
- * @access public
*
* @return array - array reference of all currency codes
* @static
*
* Note: any database errors will be trapped by the DAO.
*
- * @access public
* @static
*
* @param bool|int $id - Optional id to return
*
* The static array paymentProcessor is returned
*
- * @access public
* @static
*
* @param boolean $all - get payment processors - default is to get only active ones.
*
* The static array paymentProcessorType is returned
*
- * @access public
* @static
*
* @param boolean $all - get payment processors - default is to get only active ones.
/**
* Get all the World Regions from Database
*
- * @access public
*
* @param bool $id
*
*
* The static array activityStatus is returned
*
- * @access public
* @static
*
* @param string $column
*
* The static array visibility is returned
*
- * @access public
* @static
*
* @param string $column
*
* The static array of greeting is returned
*
- * @access public
* @static
*
* @param $filter - get All Email Greetings - default is to get only active ones.
/**
* Construct array of default greeting values for contact type
*
- * @access public
* @static
*
* @return array - array reference of default greetings.
* FIXME: This is called by civix but not by any core code. We
* should provide an API call which civix can use instead.
*
- * @access public
* @static
*
* @return array - array($fullyQualifiedName => $label) list of extensions
*
* The static array option values is returned
*
- * @access public
* @static
*
* @param boolean $optionGroupName - get All Option Group values- default is to get only active ones.
* Fetch the list of active extensions of type 'module'
*
* @param $fresh bool whether to forcibly reload extensions list from canonical store
- * @access public
* @static
*
* @return array - array(array('prefix' => $, 'file' => $))
*
* The static array tax rates is returned
*
- * @access public
* @static
*
* @return array - array list of tax rates with the financial type
* Returns the user to the top of the user context stack.
*
* @return void
- * @access public
*/
public function popUserContext() {
$session = CRM_Core_Session::singleton();
* @param object $stateMachine reference to state machine object
*
* @return \CRM_Core_QuickForm_Action_Back
- * @access public
*/
public function __construct(&$stateMachine) {
parent::__construct($stateMachine);
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
- * @access public
*/
public function perform(&$page, $actionName) {
$this->_stateMachine->perform($page, $actionName, 'Back');
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
- * @access public
*/
public function perform(&$page, $actionName) {
// conditional actions if cancelAction is defined
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
- * @access public
*/
public function perform(&$page, $actionName) {
$pageName = $page->getAttribute('id');
*
*
* @return void
- * @access public
*/
public function renderForm(&$page) {
$this->_setRenderTemplates($page);
* @param CRM_Core_Form $page the CRM_Core_Form page
*
* @return void
- * @access public
*/
public function _setRenderTemplates(&$page) {
if (self::$_requiredTemplate === NULL) {
* Initialize the various templates
*
* @return void
- * @access public
*/
public function initializeTemplates() {
if (self::$_requiredTemplate !== NULL) {
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
- * @access public
*/
public function perform(&$page, $actionName) {
$page->isFormBuilt() or $page->buildForm();
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
- * @access public
*/
public function perform(&$page, $actionName) {
// check whether the page is valid before trying to go to it
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
- * @access public
*/
public function perform(&$page, $actionName) {
$this->_stateMachine->perform($page, $actionName, 'Next');
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
- * @access public
*/
public function perform(&$page, $actionName) {
if ($this->_stateMachine->shouldReset()) {
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
- * @access public
*/
public function perform(&$page, $actionName) {
// save the form values and validation status to the session
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
- * @access public
*/
public function perform(&$page, $actionName) {
// save the form values and validation status to the session
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
- * @access public
*/
public function perform(&$page, $actionName) {
$page->isFormBuilt() or $page->buildForm();
* @param string $uploadName the name of the uploaded file
*
* @return void
- * @access private
*/
public function upload(&$page, &$data, $pageName, $uploadName) {
// make sure uploadName exists in the QF array
* @param string $actionName Current action name, as one Action object can serve multiple actions
*
* @return void
- * @access public
*/
public function perform(&$page, $actionName) {
// like in Action_Next
/**
* Returns the HTML generated for the advanced mutliple select component
*
- * @access public
* @return string
* @since version 0.4.0 (2005-06-25)
*/
* @param mixed $param3 (optional) See function detail
* @param mixed $param4 (optional) See function detail
*
- * @access public
* @since version 1.5.0 (2009-02-15)
* @return PEAR_Error|NULL on error and TRUE on success
* @throws PEAR_Error
*
* @return mixed empty if output is printed, else output
*
- * @access public
* @static
*/
public static function makeCSVTable(&$header, &$rows, $titleHeader = NULL, $print = TRUE, $outputHeader = TRUE) {
*
* @param string $region
* @return CRM_Core_Resources
- * @access public
*/
public function addCoreResources($region = 'html-header') {
if (!isset($this->addedCoreResources[$region]) && !self::isAjaxMode()) {
*
* @return void
*
- * @access public
*
*/
public function getPagerParams($action, &$params);
* @param string action the action being performed
*
* @return array the elements that can be sorted along with their properties
- * @access public
*
*/
public function &getSortOrder($action);
* @param enum $type what should the result set include (web/email/csv)
*
* @return array the column headers that need to be displayed
- * @access public
*/
public function &getColumnHeaders($action = NULL, $type = NULL);
*
* @return int the total number of rows for this action
*
- * @access public
*
*/
public function getTotalCount($action);
* @param enum $type what should the result set include (web/email/csv)
*
* @return int the total number of rows for this action
- * @access public
*/
public function &getRows($action, $offset, $rowCount, $sort, $type = NULL);
* @param string $action the action being performed
*
* @return string
- * @access public
*
*/
public function getTemplateFileName($action = NULL);
*
* @return string the attribute that matches the action if any
*
- * @access public
*
*/
public function getActionAttribute($match, $attribute = 'name') {
* @param string $action the action being performed
*
* @return string template file name
- * @access public
*/
public function getTemplateFileName($action = NULL) {
return (str_replace('_', DIRECTORY_SEPARATOR, CRM_Utils_System::getClassName($this)) . ".tpl");
* @param string action the action being performed
*
* @return array the elements that can be sorted along with their properties
- * @access public
*/
public function &getSortOrder($action) {
$columnHeaders = &$this->getColumnHeaders(NULL);
* Setter for permission
*
* @var string
- * @access public
*/
public function setPermission($permission) {
$this->_permission = $permission;
* to display on the results page
*
* @return string
- * @access public
*/
public function getQill() {
return NULL;
* @param int $reset are we being reset
*
* @return boolean if the GET params are different from the session params
- * @access public
*/
public function hasChanged($reset) {
* @param CRM_Core_Form $form
*
* @return array of rows
- * @access public
*/
public function getRows($form) {
if ($form->_output == self::EXPORT || $form->_output == self::SCREEN) {
* expect the subclass to do it
*
* @return string the status message
- * @access public
*/
public function getQill() {
return $this->_object->getQill();
* Getter for pager
*
* @return CRM_Utils_Pager
- * @access public
*/
public function getPager() {
return $this->_pager;
* Getter for sort
*
* @return CRM_Utils_Sort
- * @access public
*/
public function getSort() {
return $this->_sort;
* Move the variables from the session to the template
*
* @return void
- * @access public
*/
public function moveFromSessionToTemplate() {
self::$_template->assign_by_ref("{$this->_prefix}pager", $this->_pager);
* @param boolean $embedded
*
* @return void
- * @access public
*/
public function setEmbedded($embedded) {
$this->_embedded = $embedded;
* Getter for embedded
*
* @return boolean return the embedded value
- * @access public
*/
public function getEmbedded() {
return $this->_embedded;
* @param boolean $print
*
* @return void
- * @access public
*/
public function setPrint($print) {
$this->_print = $print;
* Getter for print
*
* @return boolean return the print value
- * @access public
*/
public function getPrint() {
return $this->_print;
*
* @param boolean $isRead is this a read operation, in this case, the session will not be touched
*
- * @access private
*
* @return void
*/
/**
* Resets the session store
*
- * @access public
*
* @param int $all
*
* @param string $prefix local scope name
* @param boolean $isRead is this a read operation, in this case, the session will not be touched
*
- * @access public
*
* @return void
*/
* Resets the session local scope
*
* @param string $prefix local scope name
- * @access public
*
* @return void
*/
* to store complex objects in the session. I suspect it
* is supported but we need to verify this
*
- * @access public
*
* @param string $name name of the variable
* @param mixed $value value of the variable
* This function takes a name and retrieves the value of this
* variable from the session scope.
*
- * @access public
*
* @param string $name : name of the variable
* @param string $prefix : adds another level of scope to the session
* Gets all the variables in the current session scope
* and stuffs them in an associate array
*
- * @access public
*
* @param array $vars associative array to store name/value pairs
* @param string $prefix will be stripped from the key before putting it in the return
* Returns true-ish values if the timer is not set or expired, and false if the timer is still running
* If you want to get more nuanced, you can check the type of the return to see if it's 'not set' or actually expired at a certain time
*
- * @access public
*
* @param string $name : name of the timer
* @param int $expire : expiry time (in seconds)
*
* @return void
*
- * @access public
*
*/
public function pushUserContext($userContext, $check = TRUE) {
*
* @return void
*
- * @access public
*
*/
public function replaceUserContext($userContext) {
* Load icon vars used in hide and show links
*
* @return void
- * @access public
* @static
*/
public static function setIcons() {
* Add the values from this class to the template
*
* @return void
- * @access public
*/
public function addToTemplate() {
$hide = $show = '';
* @param string $name id to be added
*
* @return void
- * @access public
*/
public function addShow($name) {
$this->_show[$name] = 1;
* @param string $name id to be added
*
* @return void
- * @access public
*/
public function addHide($name) {
$this->_hide[$name] = 1;
* @param string $js
*
* @return string the formatted html link
- * @access public
*/
public static function linkHtml($name, $href, $text, $js) {
return '<a name="' . $name . '" id="' . $name . '" href="' . $href . '" ' . $js . ">$text</a>";
* @static
*
* @return void
- * @access public
*/
public static function links(&$form, $prefix, $showLinkText, $hideLinkText, $assign = TRUE) {
$showCode = "cj('#id_{$prefix}').show(); cj('#id_{$prefix}_show').hide();";
* @param string $hideLink the hide block string
*
* @return void
- * @access public
*/
public function linksForArray(&$form, $index, $maxIndex, $prefix, $showLinkText, $hideLinkText, $elementType = NULL, $hideLink = NULL) {
$showHidePrefix = str_replace(array("]", "["), array("", "_"), $prefix);
* Class constructor
*
* @return CRM_Core_Smarty
- * @access private
*/
private function __construct() {
parent::__construct();
* @param object $smarty reference to the smarty object
*
* @return string HTML code of a link to documentation
- * @access public
*/
function smarty_function_docURL($params, &$smarty) {
if (!isset($smarty)) {
* @param object $smarty reference to the smarty object
*
* @return string the help html to be inserted
- * @access public
*/
function smarty_function_help($params, &$smarty) {
if (!isset($params['id']) || !isset($smarty->_tpl_vars['config'])) {
* @param string $class the new class or classes to add (separate with a space)
*
* @return string the new modified html string
- * @access public
*/
function smarty_modifier_crmAddClass($string, $class) {
// Standardize white space
*
* @return string button type, one of: 'upload', 'next', 'back', 'cancel', 'refresh'
* 'submit', 'done', 'display', 'jump' 'process'
- * @access public
*/
function smarty_modifier_crmBtnType($btnName) {
// split the string into 5 or more
* @return string
*
* @see smarty_modifier_crmBtnType
- * @access public
*/
function smarty_modifier_crmBtnValidate($btnName) {
// split the string into 5 or more
* @param bool $onlyTime
*
* @return string human readable date format | invalid date message
- * @access public
*/
function smarty_modifier_crmDate($dateString, $dateFormat = NULL, $onlyTime = FALSE) {
if ($dateString) {
* @param string $attribute the attribute to modify
*
* @return string the new modified html string
- * @access public
*/
function smarty_modifier_crmDelete($string, $attribute) {
static $endOfElement = '/>';
* @param string $string the html to be tweaked with
*
* @return string
- * @access public
*/
function smarty_modifier_crmFirstWord($string) {
$string = trim($string);
* @param bool $gdata
*
* @return string formatted text
- * @access public
*/
function smarty_modifier_crmICalDate($str, $gdata = FALSE) {
return CRM_Utils_ICalendar::formatDate($str, $gdata);
* @param string $str
*
* @return string formatted text
- * @access public
*/
function smarty_modifier_crmICalText($str) {
return CRM_Utils_ICalendar::formatText($str);
* @param string $insertBefore the string before which we want this tag inserted
*
* @return string the new modified html string
- * @access public
*/
function smarty_modifier_crmInsert($string, $attribute, $value, $insertBefore = '/>') {
return str_replace($insertBefore, ' ' . $attribute . '="' . $value . '"' . $insertBefore, $string);
* @param bool $onlyNumber
*
* @return string formatted monetary amount
- * @access public
*/
function smarty_modifier_crmMoney($amount, $currency = NULL, $format = NULL, $onlyNumber = FALSE) {
return CRM_Utils_Money::format($amount, $currency, $format, $onlyNumber);
* @param string $thousands_sep thousands sep character (if other than ",")
*
* @return string the formatted string
- * @access public
*
* For alternate decimal point and thousands separator, delimit values with single quotes in the template.
* EXAMPLE: {$number|crmNumberFormat:2:',':' '} for French notation - 1234.56 becomes 1 234,56
* @param string $value the new attribute value
*
* @return string the new modified html string
- * @access public
*/
function smarty_modifier_crmReplace($string, $attribute, $value) {
// we need to search and replace the string: $attribute=XXX or $attribute="XXX"
* @param mixed $data
*
* @return string JSON
- * @access public
*/
function smarty_modifier_json($data) {
return json_encode($data);
* @param CRM_Core_StateMachine $stateMachine statemachine that this states belongs to
*
* @return CRM_Core_State
- * @access public
*/
public function __construct($name, $type, $back, $next, &$stateMachine) {
$this->_name = $name;
* @param object the CRM_Core_Form element under consideration
*
* @return mixed does a jump to the back state
- * @access public
*/
public function handleBackState(&$page) {
if ($this->_type & self::START) {
* @param object the CRM_Core_Form element under consideration
*
* @return mixed does a jump to the nextstate
- * @access public
*/
public function handleNextState(&$page) {
if ($this->_type & self::FINISH) {
* to display the navigation labels or potential path
*
* @return string
- * @access public
*/
public function getNextState() {
if ($this->_type & self::FINISH) {
* @param object the QFC data container
*
* @return void
- * @access public
*/
public function validate(&$data) {
$data['valid'][$this->_name] = TRUE;
* @param object the QFC data container
*
* @return void
- * @access public
*/
public function invalidate(&$data) {
$data['valid'][$this->_name] = NULL;
* Getter for name
*
* @return string
- * @access public
*/
public function getName() {
return $this->_name;
* @param string
*
* @return void
- * @access public
*/
public function setName($name) {
$this->_name = $name;
* Getter for type
*
* @return int
- * @access public
*/
public function getType() {
return $this->_type;
* Getter for name
*
* @return string
- * @access public
*/
public function getName() {
return $this->_name;
* @param string
*
* @return void
- * @access public
*/
public function setName($name) {
$this->_name = $name;
* @param string $type The type of transition being requested (Next or Back)
*
* @return void
- * @access public
*/
public function perform(&$page, $actionName, $type = 'Next') {
// save the form values and validation status to the session
* @param object $next the next page if any
*
* @return void
- * @access public
*/
public function addState($name, $type, $prev, $next) {
$this->_states[$name] = new CRM_Core_State($name, $type, $prev, $next, $this);
* @param string $name the state name
*
* @return object the state object
- * @access public
*/
public function find($name) {
if (array_key_exists($name, $this->_states)) {
* Return the list of state objects
*
* @return array array of states in the state machine
- * @access public
*/
public function getStates() {
return $this->_states;
* @param string $name name of page
*
* @return CRM_Core_State state object matching the name
- * @access public
*/
public function &getState($name) {
if (isset($this->_states[$name])) {
* Return the list of form objects
*
* @return array array of pages in the state machine
- * @access public
*/
public function getPages() {
return $this->_pages;
* AddSequentialStates: meta level function to create a simple
* wizard for a state machine that is completely sequential.
*
- * @access public
*
* @param array $pages (reference ) the array of page objects
*
* Reset the state machine
*
* @return void
- * @access public
*/
public function reset() {
$this->_controller->reset();
* Getter for action
*
* @return int
- * @access public
*/
public function getAction() {
return $this->_action;
* @param string $content the content generated by this state machine
*
* @return void
- * @access public
*/
public function setContent(&$content) {
$this->_controller->setContent($content);
* Getter for content
*
* @return string
- * @access public
*/
public function &getContent() {
return $this->_controller->getContent();
* The field id
*
* @var int
- * @access protected
*/
protected $_id;
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
* Process the form when submitted
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->controller->exportValues($this->_name);
* @param null
*
* @return void
- * @access public
*/
public function buildQuickForm() {
* @param null
*
* @return void
- * @access public
*/
public function postProcess() {
$field = new CRM_Core_DAO_CustomField();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
* Process the form when submitted
*
* @return void
- * @access public
*/
public function postProcess() {
$group = new CRM_Core_DAO_CustomGroup();
* The custom group id saved to the session for an update
*
* @var int
- * @access protected
*/
protected $_gid;
* The field id, used when editing the field
*
* @var int
- * @access protected
*/
protected $_id;
* The default custom data/input types, when editing the field
*
* @var array
- * @access protected
*/
protected $_defaultDataType;
* @param null
*
* @return void
- * @access public
*/
public function preProcess() {
if (!(self::$_dataTypeKeys)) {
* @param null
*
* @return array array of default values
- * @access public
*/
public function setDefaultValues() {
$defaults = $this->_values;
* @param null
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_gid) {
* @return array if errors then list of errors to be posted back to the form,
* true otherwise
* @static
- * @access public
*/
public static function formRule($fields, $files, $self) {
$default = CRM_Utils_Array::value('default_value', $fields);
* @param null
*
* @return void
- * @access public
*/
public function postProcess() {
// store the submitted values in an array
* The set id saved to the session for an update
*
* @var int
- * @access protected
*/
protected $_id;
* set is empty or not
*
* @var bool
- * @access protected
*/
protected $_isGroupEmpty = TRUE;
* Array of existing subtypes set for a custom set
*
* @var array
- * @access protected
*/
protected $_subtypes = array();
* Array of default params
*
* @var array
- * @access protected
*/
protected $_defaults = array();
* @param null
*
* @return void
- * @access public
*/
public function preProcess() {
// current set id
*
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
* @param null
*
* @return void
- * @access public
* @see valid_date
*/
public function addRules() {
* @param null
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->applyFilter('__ALL__', 'trim');
* @param null
*
* @return array array of default values
- * @access public
*/
public function setDefaultValues() {
$defaults = &$this->_defaults;
* @param null
*
* @return void
- * @access public
*/
public function postProcess() {
// get the submitted form values.
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
* Process the form when submitted
*
* @return void
- * @access public
*/
public function postProcess() {
CRM_Core_BAO_CustomField::moveField($this->_srcFID, $this->_dstGID);
* The custom field id saved to the session for an update
*
* @var int
- * @access protected
*/
protected $_fid;
* The custom group id saved to the session for an update
*
* @var int
- * @access protected
*/
protected $_gid;
* The Option id, used when editing the Option
*
* @var int
- * @access protected
*/
protected $_id;
* @param null
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_fid = CRM_Utils_Request::retrieve('fid', 'Positive', $this);
* @param null
*
* @return array array of default values
- * @access public
*/
public function setDefaultValues() {
$defaults = $fieldDefaults = array();
* @param null
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_action == CRM_Core_Action::DELETE) {
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields, $files, $form) {
$optionLabel = $fields['label'];
* @param null
*
* @return void
- * @access public
*/
public function postProcess() {
// store the submitted values in an array
* @param null
*
* @return void
- * @access public
*/
public function preProcess() {
// get the controller vars
* @param null
*
* @return array the default array reference
- * @access protected
*/
public function setDefaultValues() {
$defaults = array();
* @param null
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if (is_array($this->_groupTree[$this->_groupId])) {
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$session = CRM_Core_Session::singleton();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$multipleCustomData = CRM_Core_BAO_CustomGroup::getMultipleFieldGroup();
* Process the uploaded file
*
* @return void
- * @access public
*/
public function postProcess() {
$this->controller->resetPage('MapField');
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Upload Data');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_mapperFields = $this->get('fields');
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields) {
$errors = array();
* preview the file and extract some summary statistics
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->controller->exportValues('MapField');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader');
* preview the file and extract some summary statistics
*
* @return void
- * @access public
*/
public function postProcess() {
$fileName = $this->controller->exportValue('DataSource', 'uploadFile');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
protected $_fileName;
/**#@+
- * @access protected
* @var integer
*/
* @param array mapped array of values
*
* @return void
- * @access public
*/
public function setActiveFields($fieldKeys) {
$this->_activeFieldCount = count($fieldKeys);
* Format the field values for input to the api
*
* @return array (reference ) associative array of name/value pairs
- * @access public
*/
public function &getActiveFieldParams() {
$params = array();
* @param int $mode
*
* @return void
- * @access public
*/
public function set($store, $mode = self::MODE_SUMMARY) {
$store->set('fileSize', $this->_fileSize);
* The initializer code, called before the processing
*
* @return void
- * @access public
*/
public function init() {
$this->setFields();
* @param array $values the array of values belonging to this line
*
* @return boolean
- * @access public
*/
public function mapField(&$values) {
return CRM_Import_Parser::VALID;
* @param array $values the array of values belonging to this line
*
* @return boolean the result of this processing
- * @access public
*/
public function preview(&$values) {
return $this->summary($values);
* @param array $values the array of values belonging to this line
*
* @return boolean the result of this processing
- * @access public
*/
public function import($onDuplicate, &$values) {
$response = $this->summary($values);
* The initializer code, called before the processing
*
* @return void
- * @access public
*/
public function fini() {}
*
* @return array $importableFields
*
- * @access public
* @static
*/
public function getGroupFieldsForImport( $id ) {
* The group id of the field
*
* @var int
- * @access protected
*/
protected $_gid;
* The action links that we need to display for the browse screen
*
* @var array
- * @access private
*/
private static $_actionLinks;
* @param null
*
* @return array array of action links that we need to display for the browse screen
- * @access public
*/
public function &actionLinks() {
if (!isset(self::$_actionLinks)) {
* @param null
*
* @return void
- * @access public
*/
public function browse() {
$resourceManager = CRM_Core_Resources::singleton();
* @param string $action the action to be invoked
*
* @return void
- * @access public
*/
public function edit($action) {
// create a simple controller for editing custom dataCRM/Custom/Page/Field.php
* @param null
*
* @return void
- * @access public
*/
public function run() {
* @param int $id custom field id
*
* @return void
- * @access public
*/
public function preview($id) {
$controller = new CRM_Core_Controller_Simple('CRM_Custom_Form_Preview', ts('Preview Custom Data'), CRM_Core_Action::PREVIEW);
* @param null
*
* @return array array of action links that we need to display for the browse screen
- * @access public
*/
public function &actionLinks() {
// check if variable _actionsLinks is populated
* @param null
*
* @return void
- * @access public
*
*/
public function run() {
* @param string $action the action to be invoked
*
* @return void
- * @access public
*/
public function edit($id, $action) {
// create a simple controller for editing custom data
* @param int $id custom group id
*
* @return void
- * @access public
*/
public function preview($id) {
$controller = new CRM_Core_Controller_Simple('CRM_Custom_Form_Preview', ts('Preview Custom Data'), NULL);
* @param string $action the action to be invoked
*
* @return void
- * @access public
*/
public function browse($action = NULL) {
// get all custom groups sorted by weight
* The Group id of the option
*
* @var int
- * @access protected
*/
protected $_gid;
* The field id of the option
*
* @var int
- * @access protected
*/
protected $_fid;
* The action links that we need to display for the browse screen
*
* @var array
- * @access private
*/
private static $_actionLinks;
* @param null
*
* @return array array of action links that we need to display for the browse screen
- * @access public
*/
public function &actionLinks() {
if (!isset(self::$_actionLinks)) {
* @param null
*
* @return void
- * @access public
*/
public function browse() {
//get the default value from custom fields
* @param string $action the action to be invoked
*
* @return void
- * @access public
*/
public function edit($action) {
// create a simple controller for editing custom data
* @param null
*
* @return void
- * @access public
*/
public function run() {
*
* @return void
*
- * @access public
*/
public function run() {
$session = CRM_Core_Session::singleton();
*
* @return void
*
- * @access public
*/
public function run() {
$context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE, 'dashlet');
/**
* List blog articles as dashlet
*
- * @access public
*/
public function run() {
$context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE, 'dashlet');
*
* @return array
*
- * @access private
*/
private function _getBlog() {
// Fetch data from cache
*
* @return array|NULL array of blog items; or NULL if not available
*
- * @access public
*/
public function _getFeed($url) {
$httpClient = new CRM_Utils_HttpClient(self::CHECK_TIMEOUT);
*
* @return void
*
- * @access public
*/
public function run() {
*
* @return void
*
- * @access public
*/
public function run() {
$context = CRM_Utils_Request::retrieve('context', 'String', $this, FALSE, 'dashlet');
* @param array contains the rule group property to identify rule group
*
* @return rule fields array associated to rule group
- * @access public
*/
public static function dedupeRuleFields($params) {
$rgBao = new CRM_Dedupe_BAO_RuleGroup();
*
* @return array|bool
* @static
- * @access public
*/
public static function batchMerge($rgid, $gid = NULL, $mode = 'safe', $autoFlip = TRUE, $redirectForPerformance = FALSE) {
$contactType = CRM_Core_DAO::getFieldValue('CRM_Dedupe_DAO_RuleGroup', $rgid, 'contact_type');
*
* @return array|bool
* @static
- * @access public
*/
public static function merge($dupePairs = array(), $cacheParams = array(), $mode = 'safe',
$autoFlip = TRUE, $redirectForPerformance = FALSE
*
* @return bool
* @static
- * @access public
*/
public static function skipMerge($mainId, $otherId, &$migrationInfo, $mode = 'safe') {
$conflicts = array();
*
* @return array|bool|int
* @static
- * @access public
*/
public static function getRowsElementsAndInfo($mainId, $otherId) {
$qfZeroBug = 'e8cddb72-a257-11dc-b9cc-0016d3330ee9';
*
* @return bool
* @static
- * @access public
*/
public static function moveAllBelongings($mainId, $otherId, $migrationInfo) {
if (empty($migrationInfo)) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Event_BAO_ManageEvent object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @param array $params reference array contains the values submitted by the form
*
- * @access public
* @static
*
* @return object
* @param array $params reference array contains the values submitted by the form
*
* @return object
- * @access public
* @static
*
*/
* @param int $id event id
*
* @return mixed|null
- * @access public
* @static
*
*/
* @param $locBlockId location block id to be deleted
* @param int $eventId event with which loc block is associated
*
- * @access public
* @static
*/
public static function deleteEventLocBlock($locBlockId, $eventId = NULL) {
* @param boolean $considerRole consider role for participant count.
* @param boolean $role consider counted( is filter role) participant.
*
- * @access public
*
* @return array array with count of participants for each event based on status/role
*/
*
* @return null|string title of the event
* @static
- * @access public
*/
public static function &getMapInfo(&$id) {
*
* @return array $all array of all the events that are searched
* @static
- * @access public
*/
static function &getCompleteInfo(
$start = NULL,
* @param bool $afterCreate
*
* @return void
- * @access public
*/
public static function copy($id, $newEvent = NULL, $afterCreate = FALSE) {
* @param bool $returnMessageText
*
* @return void
- * @access public
*/
public static function sendMail($contactID, &$values, $participantId, $isTest = FALSE, $returnMessageText = FALSE) {
* @param array $participantParams
*
* @return void
- * @access public
*/
static function buildCustomDisplay($id,
$name,
* @param array $profileFields
*
* @return void
- * @access public
* @static
*/
public static function displayProfile(&$params, $gid, &$groupTitle, &$values, &$profileFields = array()) {
* @param bool $skipCancel
*
* @return array $customProfile array of Additional participant's info OR array of Ids.
- * @access public
*/
static function buildCustomProfile($participantId,
$values,
*
* @param array $values key/value event info
* @return boolean true if allow registration otherwise false
- * @access public
*/
/**
* @param $values
*
* @param array $params key/value participant info
* @return boolean $alreadyRegistered true/false
- * @access public
*/
/**
* @param array $params
* @param int $type
*
* @return string the permission that the user has (or null)
- * @access public
* @static
*/
public static function checkPermission($eventId = NULL, $type = CRM_Core_Permission::VIEW) {
* @param int $eventId the id of the event
*
* @return array an array of email ids
- * @access public
* @static
*/
public static function getFromEmailIds($eventId = NULL) {
* @param sting $extraWhereClause extra filter on participants.
*
* @return int event total seats w/ given criteria.
- * @access public
* @static
*/
public static function eventTotalSeats($eventId, $extraWhereClause = NULL) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Event_BAO_Participant object
- * @access public
* @static
*/
public static function &add(&$params) {
* @param $ids
*
* @return CRM_Event_BAO_Participant|null the found object or null
- * @access public
* @static
*/
public static function getValues(&$params, &$values, &$ids) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Event_BAO_Participant object
- * @access public
* @static
*/
public static function create(&$params) {
* @param bool $considerTestParticipant
*
* @return bool|int|null|string 1. false => If event having some empty spaces.@static
- * @access public
*/
static function eventFull(
$eventId,
*
* @return array $optionsCount an array of each option id and total count
* @static
- * @access public
*/
static function priceSetOptionsCount(
$eventId,
*
* @return int $spaces Number of Empty Seats/null.
* @static
- * @access public
*/
public static function pendingToConfirmSpaces($eventId) {
$emptySeats = 0;
* @param bool $onlyParticipant
*
* @return array array of importable Fields
- * @access public
* @static
*/
public static function &importableFields($contactType = 'Individual', $status = TRUE, $onlyParticipant = FALSE) {
* Combine all the exportable fields from the lower levels object
*
* @return array array of exportable Fields
- * @access public
* @static
*/
public static function &exportableFields() {
*
* @return array $name associated array with sort_name and event title
* @static
- * @access public
*/
public static function participantDetails($participantId) {
$query = "
* @param boolean $reverse true if we want to resolve the values in the reverse direction (value -> name)
*
* @return void
- * @access public
* @static
*/
public static function resolveDefaults(&$defaults, $reverse = FALSE) {
* @param int $id id of the participation to delete
*
* @return void
- * @access public
* @static
*/
public static function deleteParticipant($id) {
* from other function
*
* @return CRM_Contribute_BAO_Contribution object
- * @access public
* @static
*/
public static function checkDuplicate($input, &$duplicates) {
* @param bool $updatePrimaryStatus
*
* @return bool|void
- * @access public
* @static
*/
public static function updateParticipantStatus($participantID, $oldStatusID, $newStatusID = NULL, $updatePrimaryStatus = FALSE) {
*
* @return void
*
- * @access public
* @static
*/
public static function updateStatus($participantIds, $statusId, $updateRegisterDate = FALSE) {
* @param bool $skipCascadeRule
*
* @return array
- * @access public
* @static
*/
static function transitionParticipants($participantIds, $toStatusId,
* return void
*
* @return bool
- * @access public
* @static
*/
static function sendTransitionParticipantMail(
* @param int $fromStatusId
*
* @return string
- * @access public
*/
public function updateStatusMessage($participantId, $statusChangeTo, $fromStatusId) {
$statusMsg = NULL;
* @param int $participantId
*
* @return string
- * @access public
*/
public static function eventFullMessage($eventId, $participantId = NULL) {
$eventfullMsg = $dbStatusId = NULL;
* @param int $participantId
*
* @return true if participant is primary
- * @access public
*/
public static function isPrimaryParticipant($participantId) {
* @param int $newStatusId new status
*
* @return true if allowed
- * @access public
*/
public static function getValidAdditionalIds($participantId, $oldStatusId, $newStatusId) {
* @param int $contactID
*
* @return int count of participant records
- * @access public
* @static
*/
public static function getContactParticipantCount($contactID) {
* @param bool $excludeCancelled Exclude cancelled additional participant
*
* @return array $participantsId
- * @access public
* @static
*/
public static function getParticipantIds($contributionId, $excludeCancelled = FALSE) {
* @param array $participantIds an array of additional participant ids.
*
* @return array of Urls.
- * @access public
* @static
*/
public static function getAdditionalParticipantUrl($participantIds) {
*
* @param integer $contactId contact id
*
- * @access public
* @static
*/
public static function deleteContactParticipant($contactId) {
*
* @return boolean true if deleted false otherwise
* @static
- * @access public
*/
public static function deleteParticipantPayment($params) {
$participantPayment = new CRM_Event_DAO_ParticipantPayment();
* @param $query
*
* @return void
- * @access public
*/
public static function select(&$query) {
if (($query->_mode & CRM_Contact_BAO_Query::MODE_EVENT) ||
* Getter for the qill object
*
* @return string
- * @access public
*/
public function qill() {
return (isset($this->_qill)) ? $this->_qill : "";
* @param array $participants
*
* @return null
- * @access public
*/
public function run(&$participants) {
// fetch the 1st participant, and take her event to retrieve its attributes
* @param array $participants
*
* @return null
- * @access public
*/
public function createLabels(&$participants) {
* @param CRM_Core_Form $form
*
* @return void
- * @access public
*/
public static function preProcess(&$form) {
//as when call come from register.php
* This function sets the default values for the form in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @param CRM_Core_Form $form
*
/**
* This function sets the default values for price set.
*
- * @access public
*
* @param int $participantID
* @param int $eventID
* @param CRM_Core_Form $form
*
* @return void
- * @access public
*/
public static function buildQuickForm(&$form) {
if ($form->_eventId) {
* Is this the first page?
*
* @var boolean
- * @access protected
*/
protected $_first = FALSE;
* Are we in single form mode or wizard mode?
*
* @var boolean
- * @access protected
*/
protected $_single;
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$config = CRM_Core_Config::singleton();
* Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$session = CRM_Core_Session::singleton();
* Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$slots = CRM_Core_OptionGroup::values('conference_slot');
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Conference Slots');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->assign('title', $this->_title);
* Process the form when submitted
*
* @return void
- * @access public
*/
public function postProcess() {
$participant = new CRM_Event_DAO_Participant();
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
//custom data related code
* Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_cdType) {
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($values) {
$errors = array();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Event Information and Settings');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($values) {
$errors = array();
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$eventTitle = '';
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Event Fees');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields) {
// check for state/country mapping
* function to build location block
*
* @return void
- * @access public
*/
public function buildQuickForm() {
//load form for child blocks
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Event Location');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_addProfileBottom = CRM_Utils_Array::value('addProfileBottom', $_GET, FALSE);
* Set default values for the form.
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_addProfileBottom) {
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($values, $files, $form) {
if (!empty($values['is_online_registration'])) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Online Registration');
* 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
* @return None\r
*/\r
*\r
* @param array $listOfRelatedEntities list of related event ids\r
*\r
- * @access public\r
* @static\r
*\r
* @return array\r
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_showFeeBlock = CRM_Utils_Array::value('eventId', $_GET);
* This function sets the default values for the form in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$participantStatuses = CRM_Event_PseudoConstant::participantStatus();
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($values, $files, $self) {
// If $values['_qf_Participant_next'] is Delete or
/**
* Process the form submission
*
- * @access public
*/
public function postProcess() {
// get the submitted form values.
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$values = $ids = array();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_eventId = CRM_Utils_Request::retrieve('id', 'Positive', $this, TRUE);
* Assign the minimal set of variables to the template
*
* @return void
- * @access public
*/
public function assignToTemplate() {
//process only primary participant params
* @param bool $viewOnly
*
* @return void
- * @access public
*/
public function buildCustom($id, $name, $viewOnly = FALSE) {
if ($id) {
* @param null $payment
*
* @return void
- * @access public
*/
public function confirmPostProcess($contactID = NULL, $contribution = NULL, $payment = NULL) {
// add/update contact information
* @param int $contactID
*
* @return void
- * @access public
*/
public static function addParticipant(&$form, $contactID) {
if (empty($form->_params)) {
* @param array $params user params.
*
* @return $totalCount total participant count.
- * @access public
*/
/**
* @param CRM_Core_Form $form
*
*
* @return array $formatted, formatted price set params.
- * @access public
*/
/**
* @param CRM_Core_Form $form
*
*
* @return array $optionsCount, array of each option w/ count total.
- * @access public
*/
/**
* @param $form
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Set default values for the form. For edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$config = CRM_Core_Config::singleton();
*
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* @param bool $isButtonJs
*
* @return boolean ture on success.
- * @access public
*/
public function isLastParticipant($isButtonJs = FALSE) {
$participant = $isButtonJs ? $this->_params[0]['additional_participants'] : $this->_params[0]['additional_participants'] + 1;
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* no help display needed
*
* @return int
- * @access public
*/
public function getAction() {
if ($this->_action & CRM_Core_Action::PREVIEW) {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->assignToTemplate();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* @param bool $isAdditionalAmount
*
* @return void
- * @access public
*/
static function processContribution(&$form, $params, $result, $contactID,
$pending = FALSE, $isAdditionalAmount = FALSE
* @param CRM_Core_Form $form
*
* @return void
- * @access public
*/
public static function fixLocationFields(&$params, &$fields, &$form) {
if (!empty($form->_fields)) {
* @param CRM_Core_Form $form
*
* @return void
- * @access public
*/
public static function updateContactFields($contactID, $params, $fields, &$form) {
//add the contact to group, if add to group is selected for a
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_participantId = CRM_Utils_Request::retrieve('participantId', 'Positive', $this);
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$params = array('id' => $this->_eventId);
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
*- For payment processors of billing mode 'Notify' - return from setDefaults before the code for billing profile population execution .
* (done this is because for payment processors with 'Notify' mode billing profile form doesn't get rendered on UI)
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
// build profiles first so that we can determine address fields etc
* @param int $discountId discount id for the event
*
* @return void
- * @access public
* @static
*/
static public function buildAmount(&$form, $required = TRUE, $discountId = NULL) {
*
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* @param boolean $useDedupeRules force usage of dedupe rules
*
* @return void
- * @access public
*/
public static function checkRegistration($fields, &$self, $isAdditional = FALSE, $returnContactId = FALSE, $useDedupeRules = FALSE) {
// CRM-3907, skip check for preview registrations
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* no help display needed
*
* @return int
- * @access public
*/
public function getAction() {
if ($this->_action & CRM_Core_Action::PREVIEW) {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
// Assign the email address from a contact id lookup as in CRM_Event_BAO_Event->sendMail()
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Thank You Page');
* The params that are sent to the query
*
* @var array
- * @access protected
*/
protected $_queryParams;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_single = FALSE;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_limit = NULL;
* The saved search ID retrieved from the GET vars
*
* @var int
- * @access protected
*/
protected $_ssID;
* Processing needed for buildForm and later
*
* @return void
- * @access public
*/
public function preProcess() {
$this->set('searchFormName', 'Search');
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* @param
*
* @return void
- * @access public
*/
public function postProcess() {
if ($this->_done) {
* All local rules are added near the element
*
* @return void
- * @access public
* @see valid_date
*/
public function addRules() {}
/**
* Set the default form values
*
- * @access protected
*
* @return array the default array reference
*/
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Find Participants');
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* @param
*
* @return void
- * @access public
*/
public function preProcess() {
self::preProcessCommon($this);
* @param bool $submitOnce
*
* @return void
- * @access public
*/
public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
$this->addButtons(array(
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
// initialize the task and row fields
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Set the default form values
*
- * @access protected
*
* @return array the default array reference
*/
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($params) {
$errors = array();
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return None
*/
* @param
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_context = CRM_Utils_Request::retrieve('context', 'String', $this);
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
/*
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
// initialize the task and row fields
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/ function preProcess() {
CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this);
parent::preProcess();
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
// initialize the task and row fields
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields) {
return TRUE;
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preprocess();
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
$session = CRM_Core_Session::singleton();
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/ function preProcess() {
parent::preProcess();
$this->_id = NULL;
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Set default values for the form.
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
class CRM_Event_Import_Field {
/**#@+
- * @access protected
* @var string
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$session = CRM_Core_Session::singleton();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
//Setting Upload File Size
* Process the uploaded file
*
* @return void
- * @access public
*/
public function postProcess() {
$this->controller->resetPage('MapField');
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Upload Data');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_mapperFields = $this->get('fields');
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields, $files, $self) {
$errors = array();
* preview the file and extract some summary statistics
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->controller->exportValues('MapField');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader');
* preview the file and extract some summary statistics
*
* @return void
- * @access public
*/
public function postProcess() {
$fileName = $this->controller->exportValue('DataSource', 'uploadFile');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
// set the error message path to display
protected $_fileName;
/**#@+
- * @access protected
* @var integer
*/
* @param array mapped array of values
*
* @return void
- * @access public
*/
public function setActiveFields($fieldKeys) {
$this->_activeFieldCount = count($fieldKeys);
* Format the field values for input to the api
*
* @return array (reference ) associative array of name/value pairs
- * @access public
*/
public function &getActiveFieldParams() {
$params = array();
* @param int $mode
*
* @return void
- * @access public
*/
public function set($store, $mode = self::MODE_SUMMARY) {
$store->set('fileSize', $this->_fileSize);
* @param array $data
*
* @return void
- * @access public
*/
public static function exportCSV($fileName, $header, $data) {
$output = array();
* The initializer code, called before the processing
*
* @return void
- * @access public
*/
public function init() {
$fields = CRM_Event_BAO_Participant::importableFields($this->_contactType, FALSE);
* @param array $values the array of values belonging to this line
*
* @return boolean
- * @access public
*/
public function mapField(&$values) {
return CRM_Import_Parser::VALID;
* @param array $values the array of values belonging to this line
*
* @return boolean the result of this processing
- * @access public
*/
public function preview(&$values) {
return $this->summary($values);
* @param array $values the array of values belonging to this line
*
* @return boolean the result of this processing
- * @access public
*/
public function summary(&$values) {
$erroneousField = NULL;
* @param array $values the array of values belonging to this line
*
* @return boolean the result of this processing
- * @access public
*/
public function import($onDuplicate, &$values) {
* Get the array of successfully imported Participation ids
*
* @return array
- * @access public
*/
public function &getImportedParticipations() {
return $this->_newParticipants;
* The initializer code, called before the processing
*
* @return void
- * @access public
*/
public function fini() {}
}
* the contact and calls the appropriate type of page to view.
*
* @return void
- * @access public
*
*/
public function preProcess() {
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
* all the fields in the event wizard
*
* @return void
- * @access public
*/
public function copy() {
$id = CRM_Utils_Request::retrieve('id', 'Positive', $this, TRUE, 0, 'GET');
* This function is called when action is browse
*
* return null
- * @access public
*/
public function browse() {
$controller = new CRM_Core_Controller_Simple(
* This function is called when action is view
*
* return null
- * @access public
*/
public function view() {
// build associated contributions
* This function is called when action is update or new
*
* return null
- * @access public
*/
public function edit() {
// set https for offline cc transaction
* This function is the main function that is called when the page loads, it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* contribution for the participant
*
* return null
- * @access public
*/
public function associatedContribution() {
if (CRM_Core_Permission::access('CiviContribute')) {
* List participations for the UF user
*
* return null
- * @access public
*/
public function listParticipations() {
$controller = new CRM_Core_Controller_Simple(
* loads, it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
parent::preProcess();
/**
* Get all the n events
*
- * @access public
*
* @param int $id
* @param bool $all
/**
* Get all the n participant statuses
*
- * @access public
*
* @param int $id
* @param null $cond
/**
* Get all the n participant roles
*
- * @access public
*
* @param int $id
* @param null $cond
/**
* Get all the participant listings
*
- * @access public
*
* @param int $id
*
/**
* Get all event types.
*
- * @access public
*
* @param int $id
* @return array - array reference of all event types.
* Flush given pseudoconstant so it can be reread from db
* nex time it's requested.
*
- * @access public
* @static
*
* @param bool|string $name pseudoconstant to be flushed
/**
* Get all the Personal campaign pages
*
- * @access public
*
* @param int $id
* @return array - array reference of all pcp if any
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_single = FALSE;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_limit = NULL;
/**
* What context are we being invoked from
*
- * @access protected
* @var string
*/
protected $_context = NULL;
/**
* What component context are we being invoked from
*
- * @access protected
* @var string
*/
protected $_compContext = NULL;
* the HTML_QuickForm_Controller for that page.
*
* @var array
- * @access protected
*/
public $_queryParams;
* Represent the type of selector
*
* @var int
- * @access protected
*/
protected $_action;
* Can be used to alter the number of participation returned from a buildForm hook
*
* @param int $limit how many participations do we want returned
- * @access public
*
*/
public function setLimit($limit) {
* @param null $compContext
*
* @return array
- * @access public
*/
public static function &links($qfKey = NULL, $context = NULL, $compContext = NULL) {
$extraParams = NULL;
* @param $action
* @param array $params
*
- * @access public
*/
public function getPagerParams($action, &$params) {
$params['status'] = ts('Event') . ' %%StatusMessage%%';
* @param
*
* @return int Total number of rows
- * @access public
*/
public function getTotalCount($action) {
return $this->_query->searchQuery(0, 0, NULL,
* on most of "European" languages
*
* @return array $qill which contains an array of strings
- * @access public
*/
public function getQILL() {
return $this->_query->qill();
* @param enum $output what should the result set include (web/email/csv)
*
* @return array the column headers that need to be displayed
- * @access public
*/
public function &getColumnHeaders($action = NULL, $output = NULL) {
if (!isset(self::$_columnHeaders)) {
* @param string $formName
*
* @return string the name of the form that will handle the task
- * @access protected
*/
public function taskName($controller, $formName = 'Search') {
// total hack, check POST vars and then session to determine stuff
* Return the form name of the task
*
* @return string
- * @access public
*/
public function getTaskFormName() {
return CRM_Utils_String::getClassName($this->_task);
*
* @return array the set of tasks for a group of contacts
* @static
- * @access public
*/
public static function &tasks() {
if (!(self::$_tasks)) {
*
* @return array the set of task titles
* @static
- * @access public
*/
public static function &taskTitles() {
self::tasks();
*
* @return array the set of optional tasks for a group of contacts
* @static
- * @access public
*/
public static function &optionalTaskTitle() {
$tasks = array(
* @param int $permission
*
* @return array set of tasks that are valid for the user
- * @access public
*/
public static function &permissionedTaskTitles($permission) {
$tasks = array();
*
* @return array the set of tasks for a group of participants
* @static
- * @access public
*/
public static function getTask($value) {
self::tasks();
* @param string $queryOperator
*
* @static
- * @access public
*/
static function exportComponents($selectAll,
$ids,
* Mapper fields
*
* @var array
- * @access protected
*/
protected $_mapperFields;
* Number of columns in import file
*
* @var int
- * @access protected
*/
protected $_exportColumnCount;
* Loaded mapping ID
*
* @var int
- * @access protected
*/
protected $_mappingId;
* Build the form object
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_exportColumnCount = $this->get('exportColumnCount');
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields, $values, $mappingTypeId) {
$errors = array();
* Process the uploaded file
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->controller->exportValues($this->_name);
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Select Fields to Export');
* @param
*
* @return void
- * @access public
*/
public function preProcess() {
//special case for custom search, directly give option to download csv file
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
//export option
* @param $self
*
* @return mixed true or array of errors
- * @access public
* @static
*/
static public function formRule($params, $files, $self) {
* Process the uploaded file
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->controller->exportValues($this->_name);
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Export All or Selected Fields');
* Connects to public server and grabs the list of publically available
* extensions.
*
- * @access public
*
* @return Array list of extension names
*/
/**
* Given the class, provides extension's key.
*
- * @access public
*
* @param string $clazz extension class name
*
/**
* Given the class, provides extension path.
*
- * @access public
*
* @param $clazz
*
/**
* Given the string, returns true or false if it's an extension key.
*
- * @access public
*
* @param string $key a string which might be an extension key
*
/**
* Given the string, returns true or false if it's an extension class name.
*
- * @access public
*
* @param string $clazz a string which might be an extension class name
*
/**
* Given the key, provides extension's class name.
*
- * @access public
*
* @param string $key extension key
*
* Given the key, provides the path to file containing
* extension's main class.
*
- * @access public
*
* @param string $key extension key
*
* Given the key, provides the path to file containing
* extension's main class.
*
- * @access public
* @param string $key extension key
* @return string local path of the extension source tree
*/
* Given the key, provides the path to file containing
* extension's main class.
*
- * @access public
*
* @param string $key extension key
*
/**
* Given the class, provides the template path.
*
- * @access public
*
* @param string $clazz extension class name
*
* Given te class, provides the template name.
* @todo consider multiple templates, support for one template for now
*
- * @access public
*
* @param string $clazz extension class name
*
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Contribute_BAO_FinancialAccount object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
*
- * @access public
* @static
* @return object
*/
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Contribute_BAO_FinancialItem object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param object $contribution contribution object
* @param boolean $taxTrxnID
*
- * @access public
* @static
* @return void
*/
* @param array $ids financial item ids
* @param array $trxnIds financial item ids
*
- * @access public
* @static
* @return object
*/
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Core_BAO_FinancialTrxn object
- * @access public
* @static
*/
public static function createEntityTrxn($params) {
* @param bool $maxId to retrive max id
*
* @return array
- * @access public
* @static
*/
public static function retrieveEntityFinancialTrxn($params, $maxId = FALSE) {
* @param array $error error to display
*
* @return array
- * @access public
* @static
*/
public static function checkContactPresent($contactIds, &$error) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Contribute_BAO_ContributionType object
- * @access public
* @static
*/
public static function retrieve( &$params, &$defaults ) {
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
*
- * @access public
* @static
* @return object
*/
* @param array $allValues
*
* @return CRM_Contribute_BAO_ContributionType object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults, &$allValues = array()) {
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
*
- * @access public
* @static
* @return object
*/
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Financial_DAO_PaymentProcessor object on success, null otherwise
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return Object DAO object on sucess, null otherwise
*
- * @access public
* @static
*/
public static function setIsActive($id, $is_active) {
* @return object The default payment processor object on success,
* null otherwise
* @static
- * @access public
*/
public static function &getDefault() {
if (self::$_defaultPaymentProcessor == NULL) {
* @param int $paymentProcessorID
*
* @return null
- * @access public
* @static
*/
public static function del($paymentProcessorID) {
*
* @return array associated array with payment processor related fields
* @static
- * @access public
*/
public static function getPayment($paymentProcessorID, $mode) {
if (!$paymentProcessorID) {
*
* @return array associated array with payment processor related fields
* @static
- * @access public
*/
public static function buildPayment($dao, $mode) {
$fields = array(
*
* @return int / array / object based on type
* @static
- * @access public
*/
public static function getProcessorForEntity($entityID, $component = 'contribute', $type = 'id') {
$result = NULL;
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_BAO_LocaationType object on success, null otherwise
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return Object DAO object on sucess, null otherwise
*
- * @access public
* @static
*/
public static function setIsActive($id, $is_active) {
* @return object The default payment processor object on success,
* null otherwise
* @static
- * @access public
*/
public static function &getDefault() {
if (self::$_defaultPaymentProcessorType == NULL) {
*
* @throws Exception
* @return CRM_Financial_DAO_PaymentProcessorType
- * @access public
* @static
*/
public static function create(&$params) {
* @param int $paymentProcessorTypeId ID of the processor to be deleted.
*
* @return bool
- * @access public
* @static
*/
public static function del($paymentProcessorTypeId) {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_batchStatusId == 2) {
* The financial batch id, used when editing the field
*
* @var int
- * @access protected
*/
protected $_id;
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
/**
* Build the form object
*
- * @access public
* @return void
*/
public function buildQuickForm() {
/**
* Process the form after the input has been submitted and validated
*
- * @access public
* @return void
*/
public function postProcess( ) {
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm( ) {
parent::buildQuickForm( );
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule( $values, $files, $self ) {
$errorMsg = array( );
* Set default values for the form.
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
/**
* Process the form submission
*
- * @access public
* @return void
*/
public function postProcess() {
* The financial batch id, used when editing the field
*
* @var int
- * @access protected
*/
protected $_id;
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$context = CRM_Utils_Request::retrieve('context', 'String', $this);
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($values, $files, $self) {
$errors = array();
/**
* Process the form submission
*
- * @access public
* @return void
*/
public function postProcess() {
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public function checkPermissions($action, $permissions, $createdID, $userContactID, $actionName) {
if ((CRM_Core_Permission::check($permissions[0]) || CRM_Core_Permission::check($permissions[1]))) {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
/**
* Process the form submission
*
- * @access public
* @return void
*/
public function postProcess() {
* The financial type id saved to the session for an update
*
* @var int
- * @access protected
*/
protected $_aid;
* The financial type accounts id, used when editing the field
*
* @var int
- * @access protected
*/
protected $_id;
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_aid = CRM_Utils_Request::retrieve('aid', 'Positive', $this);
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($values, $files, $self) {
$errorMsg = array();
/**
* Process the form submission
*
- * @access public
* @return void
*/
public function postProcess() {
* Browse all entities.
*
* @return void
- * @access public
*/
public function browse() {
$status = CRM_Utils_Request::retrieve('status', 'Positive', CRM_Core_DAO::$_nullObject, FALSE, 1);
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
*
*
* @return void
- * @access public
* @static
*/
public function browse() {
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
*
*
* @return void
- * @access public
* @static
*/
public function browse() {
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
*
*
* @return void
- * @access public
* @static
*/
public function browse() {
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
* Browse all Financial Type Account data
*
* @return void
- * @access public
* @static
*/
public function browse() {
* @param string $action the action to be invoked
*
* @return void
- * @access public
*/
public function edit( $action ) {
// create a simple controller for editing CiviCRM Profile data
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Friend_BAO_Friend object
- * @access public
* @static
*/
public static function add(&$params) {
* @param array $values output values of the object
*
* @return array $values values
- * @access public
* @static
*/
public static function retrieve(&$params, &$values) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Contact_BAO_Contact object
- * @access public
* @static
*/
public static function create(&$params) {
* @param CRM_Core_Form $form form object
*
* @return void
- * @access public
*/
public static function buildFriendForm($form) {
$form->addElement('checkbox', 'tf_is_active', ts('Tell a Friend enabled?'), NULL, array('onclick' => "friendBlock(this)"));
* @param array $values
*
* @return void
- * @access public
*/
public static function sendMail($contactID, &$values) {
list($fromName, $email) = CRM_Contact_BAO_Contact::getContactDetails($contactID);
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Friend_BAO_Friend object
- * @access public
* @static
*/
public static function addTellAFriend(&$params) {
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
// Details of User
* @param array $fields
*
* @return mixed true or array of errors
- * @access public
* @static
*/
public static function formRule($fields) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if (isset($this->_id)) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Tell a Friend');
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if (isset($this->_id)) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Tell a Friend');
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Grant_BAO_ManageGrant object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
*
- * @access public
* @static
*
* @return object
* @param array $ids reference array contains the id
*
* @return object
- * @access public
* @static
*
*/
*
* @return bool
*
- * @access public
* @static
*/
public static function deleteContact($id) {
* @param int $id grant id
*
* @return bool|mixed
- * @access public
* @static
*
*/
* Combine all the exportable fields from the lower levels object
*
* @return array array of exportable Fields
- * @access public
* @static
*/
public static function &exportableFields() {
* @param int $contactID
*
* @return int count of grant records
- * @access public
* @static
*/
public static function getContactGrantCount($contactID) {
* @param $query
*
* @return void
- * @access public
*/
public static function select(&$query) {
if (($query->_mode & CRM_Contact_BAO_Query::MODE_GRANT) || !empty($query->_returnProperties)) {
* @param $query
*
* @return void
- * @access public
*/
public static function where(&$query) {
foreach ($query->_params as $id => $values) {
* Getter for the qill object
*
* @return string
- * @access public
*/
public function qill() {
return (isset($this->_qill)) ? $this->_qill : "";
/**
* Add all the elements shared between grant search and advanaced search
*
- * @access public
*
* @param CRM_Core_Form $form
*
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
//custom data related code
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_cdType) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_contactID = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* The params that are sent to the query
*
* @var array
- * @access protected
*/
protected $_queryParams;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_single = FALSE;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_limit = NULL;
* Processing needed for buildForm and later
*
* @return void
- * @access public
*/ function preProcess() {
/**
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* @param
*
* @return void
- * @access public
*/
public function postProcess() {
if ($this->_done) {
/**
* Set the default form values
*
- * @access protected
*
* @return array the default array reference
*/
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Find Grants');
* @param
*
* @return void
- * @access public
*/ function preProcess() {
self::preProcessCommon($this);
}
* @param string $backType
*
* @return void
- * @access public
*/
public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
$this->addButtons(array(
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/ function preProcess() {
parent::preProcess();
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preprocess();
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
$session = CRM_Core_Session::singleton();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* the contact and calls the appropriate type of page to view.
*
* @return void
- * @access public
*
*/
public function preProcess() {
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* This function is called when action is browse
*
* return null
- * @access public
*/ function browse() {
$controller = new CRM_Core_Controller_Simple('CRM_Grant_Form_Search', ts('Grants'), $this->_action);
$controller->setEmbedded(TRUE);
* This function is called when action is view
*
* return null
- * @access public
*/
public function view() {
$controller = new CRM_Core_Controller_Simple('CRM_Grant_Form_GrantView', 'View Grant', $this->_action);
* This function is called when action is update or new
*
* return null
- * @access public
*/
public function edit() {
$controller = new CRM_Core_Controller_Simple('CRM_Grant_Form_Grant', 'Create grant', $this->_action);
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
$context = CRM_Utils_Request::retrieve('context', 'String', $this);
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_single = FALSE;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_limit = NULL;
/**
* What context are we being invoked from
*
- * @access protected
* @var string
*/
protected $_context = NULL;
* the HTML_QuickForm_Controller for that page.
*
* @var array
- * @access protected
*/
public $_queryParams;
* Represent the type of selector
*
* @var int
- * @access protected
*/
protected $_action;
* @param null $key
*
* @return array
- * @access public
*/
public static function &links($key = NULL) {
$cid = CRM_Utils_Request::retrieve('cid', 'Integer', $this);
* @param $action
* @param array $params
*
- * @access public
*/
public function getPagerParams($action, &$params) {
$params['status'] = ts('Grant') . ' %%StatusMessage%%';
* @param
*
* @return int Total number of rows
- * @access public
*/
public function getTotalCount($action) {
return $this->_query->searchQuery(0, 0, NULL,
/**
* @return array $qill which contains an array of strings
- * @access public
*/
// the current internationalisation is bad, but should more or less work
* @param enum $output what should the result set include (web/email/csv)
*
* @return array the column headers that need to be displayed
- * @access public
*/
public function &getColumnHeaders($action = NULL, $output = NULL) {
if (!isset(self::$_columnHeaders)) {
* @param string $formName
*
* @return string the name of the form that will handle the task
- * @access protected
*/
public function taskName($controller, $formName = 'Search') {
// total hack, check POST vars and then session to determine stuff
* Return the form name of the task
*
* @return string
- * @access public
*/
public function getTaskFormName() {
return CRM_Utils_String::getClassName($this->_task);
*
* @return array the set of tasks for a group of contacts
* @static
- * @access public
*/
public static function &tasks() {
if (!(self::$_tasks)) {
*
* @return array the set of task titles
* @static
- * @access public
*/
public static function &taskTitles() {
self::tasks();
* @param int $permission
*
* @return array set of tasks that are valid for the user
- * @access public
*/
public static function &permissionedTaskTitles($permission) {
$tasks = array();
*
* @return array the set of tasks for a group of contacts
* @static
- * @access public
*/
public static function getTask($value) {
self::tasks();
* Set default values for the form. LocationType that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
* @return array
*/
public function setDefaultValues() {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_action == CRM_Core_Action::DELETE) {
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields, $fileParams, $options) {
$errors = array();
* Process the form when submitted
*
* @return void
- * @access public
*/
public function postProcess() {
CRM_Utils_System::flushCache('CRM_Core_DAO_Group');
*
* @return array parent groups
* @static
- * @access public
*/
public static function buildParentGroups(&$form) {
$groupNames = CRM_Core_PseudoConstant::group();
* Define action links
*
* @return array self::$_links array of action links
- * @access public
*/
public function &links() {}
* Return class name of edit form
*
* @return string
- * @access public
*/
public function editForm() {
return 'CRM_Group_Form_Edit';
* Return name of edit form
*
* @return string
- * @access public
*/
public function editName() {
return ts('Edit Group');
* Return name of delete form
*
* @return string
- * @access public
*/
public function deleteName() {
return 'Delete Group';
* @param null $mode
*
* @return string
- * @access public
*/
public function userContext($mode = NULL) {
return 'civicrm/group';
* @param null $mode
*
* @return string
- * @access public
*/
public function userContextParams($mode = NULL) {
return 'reset=1&action=browse';
* @param int $title name or title of the object
*
* @return string the permission that the user has (or null)
- * @access public
*/
public function checkPermission($id, $title) {
return CRM_Contact_BAO_Group::checkPermission($id, $title);
* @param int $action
*
* @return void
- * @access public
*/
public function browse($action = NULL) {
$groupPermission = CRM_Core_Permission::check('edit groups') ? CRM_Core_Permission::EDIT : CRM_Core_Permission::VIEW;
* Return the form name of the task. This is
*
* @return string
- * @access public
*/
public function getTaskFormName() {
return CRM_Utils_String::getClassName('CRM_Contact_Form_Task_AddToGroup');
*
* @return array collection of info about this data source
*
- * @access public
*
*/
abstract public function getInfo();
/**
* Set variables up before form is built
*
- * @access public
*/
abstract public function preProcess(&$form);
* @param CRM_Core_Form $form
*
* @return void (operates directly on form argument)
- * @access public
*/
abstract public function buildQuickForm(&$form);
/**
* Process the form submission
*
- * @access public
*/
abstract public function postProcess(&$params, &$db, &$form);
}
*
* @return array collection of info about this data source
*
- * @access public
*
*/
public function getInfo() {
/**
* Set variables up before form is built
*
- * @access public
*/
public function preProcess(&$form) {}
* @param CRM_Core_Form $form
*
* @return void (operates directly on form argument)
- * @access public
*/
public function buildQuickForm(&$form) {
$form->add('hidden', 'hidden_dataSource', 'CRM_Import_DataSource_CSV');
/**
* Process the form submission
*
- * @access public
*/
public function postProcess(&$params, &$db, &$form) {
$file = $params['uploadFile']['name'];
*
* @return array collection of info about this data source
*
- * @access public
*
*/
public function getInfo() {
/**
* Set variables up before form is built
*
- * @access public
*/
public function preProcess(&$form) {}
* @param CRM_Core_Form $form
*
* @return void (operates directly on form argument)
- * @access public
*/
public function buildQuickForm(&$form) {
$form->add('hidden', 'hidden_dataSource', 'CRM_Import_DataSource_SQL');
/**
* Process the form submission
*
- * @access public
*/
public function postProcess(&$params, &$db, &$form) {
$importJob = new CRM_Contact_Import_ImportJob(
* Cache of preview data values
*
* @var array
- * @access protected
*/
protected $_dataValues;
* Mapper fields
*
* @var array
- * @access protected
*/
protected $_mapperFields;
* Loaded mapping ID
*
* @var int
- * @access protected
*/
protected $_loadedMappingId;
* Number of columns in import file
*
* @var int
- * @access protected
*/
protected $_columnCount;
* Column headers, if we have them
*
* @var array
- * @access protected
*/
protected $_columnHeaders;
* form building already.
*
* @var array
- * @access protected
*/
protected $_fieldUsed;
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Match Fields');
* @param mapperFields
*
* @return string
- * @access public
*/
public function defaultFromHeader($header, &$patterns) {
foreach ($patterns as $key => $re) {
* @param index
*
* @return string
- * @access public
*/
public function defaultFromData(&$patterns, $index) {
$best = '';
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Preview');
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Summary');
* Format the field values for input to the api
*
* @return array (reference) associative array of name/value pairs
- * @access public
*/
public function &getActiveFieldParams() {
$params = array();
*
* @return void
* @static
- * @access public
*/
public static function encloseScrub(&$values, $enclosure = "'") {
if (empty($values)) {
* @param int $max
*
* @return void
- * @access public
*/
public function setMaxLinesToProcess($max) {
$this->_maxLinesToProcess = $max;
* Build the static pattern array
*
* @return void
- * @access public
* @static
*/
public static function buildPatterns() {
* @param string $message The message to be matched
*
* @return array Tuple (bounce_type, bounce_reason)
- * @access public
* @static
*/
public static function &match(&$message) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Core_BAO_LocaationType object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return CRM_Mailing_BAO_Component object
*
- * @access public
* @static
*/
public static function add(&$params, $ids = array()) {
*
* Returns the regex patterns that are used for preparing the text and html templates
*
- * @access private
*
**/
private function &getPatterns($onlyHrefs = FALSE) {
* for generating the emails and returns a copy of the
* prepared templates
*
- * @access private
*
**/
private function getPreparedTemplates() {
*
*
* @return array reference to an assoc array
- * @access private
*
**/
private function &getTemplates() {
* either text or html for this to have any meaningful impact
*
* @return array reference to an assoc array
- * @access public
*
**/
public function &getTokens() {
* hook in one call and standardizes it across other token workflows
*
* @return array reference to an assoc array
- * @access public
*
**/
public function &getFlattenedTokens() {
*
*
* @param str $prop name of the property that holds the text that we want to scan for tokens (html, text)
- * @access private
*
* @return void
*/
* @param array $testParams contains form values
*
* @return void
- * @access public
*/
public function getTestRecipients($testParams) {
if (array_key_exists($testParams['test_group'], CRM_Core_PseudoConstant::group())) {
* @param void
*
* @return void
- * @access private
*/
private function getHeaderFooter() {
if (!$this->header and $this->header_id) {
* @param null $replyToEmail
*
* @return Mail_mime The mail object
- * @access public
*/
public function &compose($job_id, $event_queue_id, $hash, $contactId,
$email, &$recipient, $test,
* prior-mailing targets.
*
* @return array Names of groups receiving this mailing
- * @access public
*/
public function &getGroupNames() {
if (!isset($this->id)) {
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
*
- * @access public
* @static
*
* @return object
* @param array $ids
*
* @return object $mailing The new mailing object
- * @access public
* @static
*/
public static function create(&$params, $ids = array()) {
* @param bool $isSMS
*
* @return array Associative array of reporting data
- * @access public
* @static
*/
public static function &report($id, $skipDetails = FALSE, $isSMS = FALSE) {
* @param
*
* @return int Count
- * @access public
*/
public function getCount() {
$this->selectAdd();
* @param array $additionalParams
*
* @return array The rows
- * @access public
*/
public function &getRows($offset, $rowCount, $sort, $additionalClause = NULL, $additionalParams = NULL) {
$mailing = self::getTableName();
*
* @return string
* @static
- * @access public
*/
public static function showEmailDetails($id) {
return CRM_Utils_System::url('civicrm/mailing/report', "mid=$id");
* @param int $id id of the mail to delete
*
* @return void
- * @access public
* @static
*/
public static function del($id) {
* @param int $id id of the Job to delete
*
* @return void
- * @access public
* @static
*/
public static function delJob($id) {
* @param CRM_Core_Form $form
*
* @return void
- * @access public
*/
public static function commonCompose(&$form) {
//get the tokens.
* @param CRM_Core_Form $form
*
* @return void
- * @access public
*/
public static function commonLetterCompose(&$form) {
//get the tokens.
* Get the search based mailing Ids
*
* @return array $mailingIDs, searched base mailing ids.
- * @access public
*/
public function searchMailingIDs() {
$group = CRM_Mailing_DAO_MailingGroup::getTableName();
* @param array $params associated array for params record id.
*
* @return array $contactActivities associated array of contact activities
- * @access public
*/
public static function getContactMailingSelector(&$params) {
// format the params
* @return array of mailings for a contact
*
* @static
- * @access public
*/
static public function getContactMailings(&$params) {
$params['version'] = 3;
* @return int count of mailings for a contact
*
* @static
- * @access public
*/
static public function getContactMailingsCount(&$params) {
$params['version'] = 3;
* @param array $ids
*
* @return object $mailingab The new mailingab object
- * @access public
* @static
*/
public static function create(&$params, $ids = array()) {
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
*
- * @access public
* @static
*
* @return object
* @param int $id id of the mail to delete
*
* @return void
- * @access public
* @static
*/
public static function del($id) {
* @param null $mode
*
* @return void
- * @access public
* @static
*/
public static function runJobs($testParams = NULL, $mode = NULL) {
* @param array $testParams
*
* @return void
- * @access public
*/
public function deliver(&$mailer, $testParams = NULL) {
$mailing = new CRM_Mailing_BAO_Mailing();
* @param string $status The status enum
*
* @return string The translated version
- * @access public
* @static
*/
public static function status($status) {
* to only process jobs that are approved.
*
* @return string For use in a WHERE clause
- * @access public
* @static
*/
public static function workflowClause() {
* @param $query
*
* @return void
- * @access public
*/
public static function select(&$query) {
// if Mailing mode add mailing id
/**
* Add all the elements shared between Mailing search and advnaced search
*
- * @access public
*
* @param CRM_Core_Form $form
* @return void
* @return mixed Returns true on success, or a CRM_Eore_Error
* containing a descriptive error message on
* failure.
- * @access public
*/
public function send($recipient, $headers, $body, $job_id = null) {
$headerStr = array();
* @param boolean $is_distinct Group by queue ID?
*
* @return int Number of rows in result set
- * @access public
* @static
*/
public static function getTotalCount($mailing_id, $job_id = NULL, $is_distinct = FALSE, $toDate = NULL) {
* @param array $sort sort array
*
* @return array Result set
- * @access public
* @static
*/
public static function &getRows($mailing_id, $job_id = NULL,
* @param string $hash The hash
*
* @return boolean True on success
- * @access public
* @static
*/
public static function confirm($contact_id, $subscribe_id, $hash) {
* @param array $params Associative array of delivery event values
*
* @return void
- * @access public
* @static
*/
public static function &create(&$params) {
* @param boolean $is_distinct Group by queue ID?
*
* @return int Number of rows in result set
- * @access public
* @static
*/
public static function getTotalCount($mailing_id, $job_id = NULL, $is_distinct = FALSE, $toDate = NULL) {
* @param array $sort sort array
*
* @return array Result set
- * @access public
* @static
*/
public static function &getRows($mailing_id, $job_id = NULL,
* @param boolean $is_distinct Group by queue ID?
*
* @return int Number of rows in result set
- * @access public
* @static
*/
public static function getTotalCount($mailing_id, $job_id = NULL,
* @param array $sort sort array
*
* @return array Result set
- * @access public
* @static
*/
public static function &getRows($mailing_id, $job_id = NULL,
* @param int $queue_id The Queue Event ID of the recipient
*
* @return void
- * @access public
* @static
*/
public static function open($queue_id) {
* @param boolean $is_distinct Group by queue ID?
*
* @return int Number of rows in result set
- * @access public
* @static
*/
public static function getTotalCount($mailing_id,
* @param $mailingIDs
*
* @return array Opened count per mailing ID
- * @access public
* @static
*/
public static function getMailingTotalCount($mailingIDs) {
* @param int $contactID ID of the contact
*
* @return array Count per mailing ID
- * @access public
* @static
*/
public static function getMailingContactCount($mailingIDs, $contactID) {
* @param int $contact_id
*
* @return array Result set
- * @access public
* @static
*/
public static function &getRows($mailing_id, $job_id = NULL,
* @param array $params values of the new EventQueue
*
* @return CRM_Mailing_Event_BAO_Queue The new EventQueue
- * @access public
* @static
*/
public static function create($params) {
* @param array The ids to be hashed
*
* @return int The hash
- * @access public
* @static
*/
public static function hash($params) {
* @param string $hash The hash to validate against
*
* @return object|null The queue event if verified, or null
- * @access public
* @static
*/
public static function &verify($job_id, $queue_id, $hash) {
* @param int $queue_id The queue event ID
*
* @return string The email address
- * @access public
* @static
*/
public static function getEmailAddress($queue_id) {
* @param int $job_id Optional ID of a job to limit results
*
* @return int Number of matching events
- * @access public
* @static
*/
public static function getTotalCount($mailing_id, $job_id = NULL) {
* @param array $sort sort array
*
* @return array Result set
- * @access public
* @static
*/
public static function &getRows($mailing_id, $job_id = NULL, $offset = NULL,
* @param
*
* @return object Mailing BAO
- * @access public
*/
public function &getMailing() {
$mailing = new CRM_Mailing_BAO_Mailing();
* @param null $replyto
*
* @return object|null The mailing object, or null on failure
- * @access public
* @static
*/
public static function &reply($job_id, $queue_id, $hash, $replyto = NULL) {
* @param string $fullEmail whole email to forward in one string
*
* @return void
- * @access public
* @static
*/
public static function send($queue_id, &$mailing, &$bodyTxt, $replyto, &$bodyHTML = NULL, &$fullEmail = NULL) {
* @param string $replyto Optional reply-to from the reply
*
* @return void
- * @access private
* @static
*/
private static function autoRespond(&$mailing, $queue_id, $replyto) {
* @param boolean $is_distinct Group by queue ID?
*
* @return int Number of rows in result set
- * @access public
* @static
*/
public static function getTotalCount($mailing_id, $job_id = NULL,
* @param array $sort sort array
*
* @return array Result set
- * @access public
* @static
*/
public static function &getRows($mailing_id, $job_id = NULL,
* @param string $hash The hash
*
* @return array|null $groups Array of all groups to which the contact was added, or null if the queue event could not be found.
- * @access public
* @static
*/
public static function &resub_to_mailing($job_id, $queue_id, $hash) {
* @param int $job The job ID
*
* @return void
- * @access public
* @static
*/
public static function send_resub_response($queue_id, $groups, $is_domain = FALSE, $job) {
* @param string $context
*
* @return int|null $se_id The id of the subscription event, null on failure
- * @access public
* @static
*/
public static function &subscribe($group_id, $email, $contactId = NULL, $context = NULL) {
* @param string $hash Hash to verify
*
* @return object|null The subscribe event object, or null on failure
- * @access public
* @static
*/
public static function &verify($contact_id, $subscribe_id, $hash) {
* @param string $email The email address
*
* @return void
- * @access public
*/
public function send_confirm_request($email) {
$config = CRM_Core_Config::singleton();
* @param int $subscribe_id ID of the subscribe event
*
* @return object $domain The domain owning the event
- * @access public
* @static
*/
public static function &getDomain($subscribe_id) {
* @param int $contactID contactID if we want an exact match
*
* @return array $groups array of group ids
- * @access public
*/
public static function getContactGroups($email, $contactID = NULL) {
if ($contactID) {
*
* @return void
* @static
- * @access public
*/
public static function commonSubscribe(&$groups, &$params, $contactId = NULL, $context = NULL) {
$contactGroups = CRM_Mailing_Event_BAO_Subscribe::getContactGroups($params['email'], $contactId);
* @param int $url_id The ID of the trackable URL
*
* @return string $url The redirection url, or base url on failure.
- * @access public
* @static
*/
public static function track($queue_id, $url_id) {
* @param int $url_id Optional ID of a url to filter on
*
* @return int Number of rows in result set
- * @access public
* @static
*/
public static function getTotalCount($mailing_id, $job_id = NULL,
* @param $mailingIDs
*
* @return array trackable url count per mailing ID
- * @access public
* @static
*/
public static function getMailingTotalCount($mailingIDs) {
* @param int $contactID ID of the contact
*
* @return array Count per mailing ID
- * @access public
* @static
*/
public static function getMailingContactCount($mailingIDs, $contactID) {
* @param int $contact_id optional contact ID
*
* @return array Result set
- * @access public
* @static
*/
public static function &getRows($mailing_id, $job_id = NULL,
* @param string $hash The hash
*
* @return boolean Was the contact successfully unsubscribed?
- * @access public
* @static
*/
public static function unsub_from_domain($job_id, $queue_id, $hash) {
* @param boolean $return If true return the list of groups.
*
* @return array|null $groups Array of all groups from which the contact was removed, or null if the queue event could not be found.
- * @access public
* @static
*/
public static function &unsub_from_mailing($job_id, $queue_id, $hash, $return = FALSE) {
* @param int $job The job ID
*
* @return void
- * @access public
* @static
*/
public static function send_unsub_response($queue_id, $groups, $is_domain = FALSE, $job) {
* @param null $org_unsubscribe
*
* @return int Number of rows in result set
- * @access public
* @static
*/
public static function getTotalCount($mailing_id, $job_id = NULL,
*
* @param null $org_unsubscribe
* @return array Result set
- * @access public
* @static
*/
public static function &getRows($mailing_id, $job_id = NULL,
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
if (CRM_Mailing_Info::workflowEnabled()) {
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
* @param
*
* @return void
- * @access public
*/
public function buildQuickform() {
$title = ts('Approve/Reject Mailing') . " - {$this->_mailing->name}";
* @param
*
* @return void
- * @access public
*/
public function postProcess() {
// get the submitted form values.
/**
* Display Name of the form
*
- * @access public
*
* @return string
*/
* @param
*
* @return void
- * @access public
*/
class CRM_Mailing_Form_Browse extends CRM_Core_Form {
* the contact and calls the appropriate type of page to view.
*
* @return void
- * @access public
*
*/
public function preProcess() {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
}
/**
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->applyFilter('__ALL__', 'trim');
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* @param $options
*
* @return mixed true or array of errors
- * @access public
* @static
*/
public static function dataRule($params, $files, $options) {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
for ($i = 0; $i < 5; $i++) {
/**
* Form submission of new/edit contact is processed.
*
- * @access public
*
* @return void
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
if (CRM_Core_BAO_MailSettings::defaultDomain() == "EXAMPLE.ORG") {
* Set default values for the form.
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
/**
* Display Name of the form
*
- * @access public
*
* @return string
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields) {
$errors = array();
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
if (CRM_Mailing_Info::workflowEnabled() &&
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
* @param
*
* @return void
- * @access public
*/
public function buildQuickform() {
$this->addDateTime('start_date', ts('Schedule Mailing'), FALSE, array('formatType' => 'mailing'));
* @param
*
* @return void
- * @access public
*/
public function postProcess() {
$params = array();
/**
* Display Name of the form
*
- * @access public
*
* @return string
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
//when user come from search context.
* Set default values for the form.
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
/**
* Display Name of the form
*
- * @access public
*
* @return string
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
// add the email address
}
/**
- * @access public
*
* @return void
*/
* @param
*
* @return void
- * @access public
*/
public function preProcess() {
self::preProcessCommon($this);
*
*
* @return void
- * @access public
*/
public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
$this->addButtons(array(
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preprocess();
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
//when user come from search context.
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
* @param array $self an current this object
*
* @return boolean true on successful SMTP handoff
- * @access public
*/
public static function testMail($testParams, $files, $self) {
$error = NULL;
/**
* Display Name of the form
*
- * @access public
*
* @return string
*/
* Set default values for the form.
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$session = CRM_Core_Session::singleton();
* @param $self
*
* @return mixed true or array of errors
- * @access public
* @static
*/
public static function formRule($params, $files, $self) {
/**
* Display Name of the form
*
- * @access public
*
* @return string
*/
* All the fields that are listings related
*
* @var array
- * @access protected
*/
protected $_fields;
* The mailing id of the mailing we're operating on
*
* @int
- * @access protected
*/
protected $_mailingId;
* The action that we are performing (in CRM_Core_Action terms)
*
* @int
- * @access protected
*/
protected $_action;
* Scheduled mailing
*
* @boolean
- * @access public
*/
public $_scheduled;
* the contact and calls the appropriate type of page to view.
*
* @return void
- * @access public
*
*/
public function preProcess() {
* All the fields that are listings related
*
* @var array
- * @access protected
*/
protected $_fields;
* This function is called when action is browse
*
* return null
- * @access public
*/
public function browse() {
}
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* Get all the mailing components of a particular type
*
* @param $type the type of component needed
- * @access public
*
* @return array - array reference of all mailing components
* @static
*
* @param $type the type of component needed
* @param $undefined the value to use if no default is defined
- * @access public
*
* @return integer -The ID of the default mailing component.
* @static
/**
* Get all the mailing templates
*
- * @access public
*
* @return array - array reference of all mailing templates if any
* @static
/**
* Get all the completed mailing
*
- * @access public
*
* @param null $mode
*
* Flush given pseudoconstant so it can be reread from db
* next time it's requested.
*
- * @access public
* @static
*
* @param bool|string $name pseudoconstant to be flushed
* This method returns the links that are given for each search row.
*
* @return array
- * @access public
*
*/
public static function &links() {
* @param $action
* @param array $params
*
- * @access public
*/
public function getPagerParams($action, &$params) {
$params['csvString'] = NULL;
* @param enum $output what should the result set include (web/email/csv)
*
* @return array the column headers that need to be displayed
- * @access public
*/
public function &getColumnHeaders($action = NULL, $output = NULL) {
$mailing = CRM_Mailing_BAO_Mailing::getTableName();
* @param
*
* @return int Total number of rows
- * @access public
*/
public function getTotalCount($action) {
$job = CRM_Mailing_BAO_MailingJob::getTableName();
* This method returns the links that are given for each search row.
*
* @return array
- * @access public
* @static
*/
public static function &links() {
* @param $action
* @param array $params
*
- * @access public
*/
public function getPagerParams($action, &$params) {
$params['csvString'] = NULL;
* @param enum $output what should the result set include (web/email/csv)
*
* @return array the column headers that need to be displayed
- * @access public
*/
public function &getColumnHeaders($action = NULL, $output = NULL) {
$mailing = CRM_Mailing_BAO_Mailing::getTableName();
* @param
*
* @return int Total number of rows
- * @access public
*/
public function getTotalCount($action) {
switch ($this->_event_type) {
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_single = FALSE;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_limit = NULL;
/**
* What context are we being invoked from
*
- * @access protected
* @var string
*/
protected $_context = NULL;
/**
* What component context are we being invoked from
*
- * @access protected
* @var string
*/
protected $_compContext = NULL;
* the HTML_QuickForm_Controller for that page.
*
* @var array
- * @access protected
*/
public $_queryParams;
* Represent the type of selector
*
* @var int
- * @access protected
*/
protected $_action;
* - Edit
*
* @return array
- * @access public
*
*/
public static function &links() {
* @param $action
* @param array $params
*
- * @access public
*/
public function getPagerParams($action, &$params) {
$params['status'] = ts('Mailing Recipient') . ' %%StatusMessage%%';
* @param
*
* @return int Total number of rows
- * @access public
*/
public function getTotalCount($action) {
return $this->_query->searchQuery(0, 0, NULL,
/**
* @return array $qill which contains an array of strings
- * @access public
*/
// the current internationalisation is bad, but should more or less work
* @param enum $output what should the result set include (web/email/csv)
*
* @return array the column headers that need to be displayed
- * @access public
*/
public function &getColumnHeaders($action = NULL, $output = NULL) {
if (!isset(self::$_columnHeaders)) {
*
* @return array the set of tasks for a group of contacts
* @static
- * @access public
*/
public static function &tasks() {
if (!(self::$_tasks)) {
*
* @return array the set of task titles
* @static
- * @access public
*/
public static function &taskTitles() {
return array();
* @param int $permission
*
* @return array set of tasks that are valid for the user
- * @access public
*/
public static function &permissionedTaskTitles($permission) {
$task = array();
*
* @return array the set of tasks for a group of mailing recipients
* @static
- * @access public
*/
public static function getTask($value) {
self::tasks();
/**
* Class constructor
*
- * @access public
* @return \CRM_Member_DAO_Membership
*/
/**
* @param array $ids the array that holds all the db ids
*
* @return CRM_Member_BAO_Membership object
- * @access public
* @static
*/
public static function add(&$params, $ids = array()) {
* be returned
*
* @return CRM_Member_BAO_Membership|null the found object or null
- * @access public
* @static
*/
public static function &getValues(&$params, &$values, $active = FALSE) {
* @throws CRM_Core_Exception
*
* @return CRM_Member_BAO_Membership object
- * @access public
* @static
*/
public static function create(&$params, &$ids, $skipRedirect = FALSE, $activityType = 'Membership Signup') {
* in a hierarchical manner
*
* @return CRM_Member_BAO_Membership object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param int $membershipId membership id of values to return
*
* @return array of key value pairs
- * @access public
*/
public static function getStatusANDTypeValues($membershipId) {
$values = array();
* @static
*
* @return $results no of deleted Membership on success, false otherwise
- * @access public
*/
public static function del($membershipId) {
//delete related first and then delete parent.
* @static
*
* @return $results no of deleted Membership on success, false otherwise
- * @access public
*/
public static function deleteMembership($membershipId) {
// CRM-12147, retrieve membership data before we delete it for hooks
*
* @return array $actives array of memberships based on status
* @static
- * @access public
*/
public static function activeMembers($memberships, $status = 'active') {
$actives = array();
* @param boolean $status
*
* @return array array of importable Fields
- * @access public
* @static
*/
public static function &importableFields($contactType = 'Individual', $status = TRUE) {
* @throws CRM_Core_Exception
*
* @return void
- * @access public
*/
public static function postProcessMembership($membershipParams, $contactID, &$form, $premiumParams,
$customFieldsFormatted = NULL, $includeFieldTypes = NULL, $membershipDetails, $membershipTypeIDs, $isPaidMembership, $membershipID,
*
* @return void
* @static
- * @access public
*/
static public function updateRecurMembership(CRM_Member_DAO_Membership $membership,
CRM_Contribute_BAO_Contribution $contribution) {
* @throws CRM_Core_Exception
*
* @static
- * @access public
*/
static function renewMembershipFormWrapper(
$contactID,
* @param int membershipId membership id
*
* @return int $contributionPageId contribution page id
- * @access public
* @static
*/
public static function getContributionPageId($membershipID) {
*
* @return array the list of membership fields
* @static
- * @access public
*/
public static function getMembershipFields($mode = NULL) {
$fields = CRM_Member_DAO_Membership::export();
*
* @return null|string sort name of the contact if found
* @static
- * @access public
*/
public static function sortName($id) {
$id = CRM_Utils_Type::escape($id, 'Integer');
*
* @return null|array array of memberships if created
* @static
- * @access public
*/
public static function createRelatedMemberships(&$params, &$dao, $reset = FALSE) {
static $relatedContactIds = array();
* @param int $membershipId membsership id.
*
* @return boolean true if deleted false otherwise
- * @access public
*/
public static function deleteMembershipPayment($membershipId) {
* @param boolean $activeOnly
*
* @return null|string
- * @access public
* @static
*/
public static function getContactMembershipCount($contactID, $activeOnly = FALSE) {
* @param bool $isNotCancelled
*
* @return boolean
- * @access public
* @static
*/
public static function isCancelSubscriptionSupported($mid, $isNotCancelled = TRUE) {
* @param int $mid membership id
*
* @return string $status contribution status
- * @access public
* @static
*/
public static function isSubscriptionCancelled($mid) {
/**
* Process price set and line items.
*
- * @access public
*
* @param int $membershipId
* @param $lineItem
* @param int $membershipId membership id.
*
* @return integer contribution id
- * @access public
*/
public static function getMembershipContributionId($membershipId) {
* Sending renewal reminders has been migrated from this job to the Scheduled Reminders function as of 4.3.
*
* @return array $result
- * @access public
*/
public static function updateAllMembershipStatus() {
* @param array $membershipType array with membership type and organization
* @param int $priceSetId
*
- * @access public
* @static
*/
public static function createLineItems(&$qf, $membershipType, &$priceSetId) {
*
* @return array of membership type
* @static
- * @access public
*/
public static function getContactsCancelledMembership($contactID, $isTest = FALSE) {
if (!$contactID) {
*
* @param array $params reference array contains the values submitted by the form
*
- * @access public
* @static
*
* @return object
* @param array $params reference array contains the values submitted by the form
* @param array $ids reference array contains the id
*
- * @access public
* @static
*
* @return object
*
* @param array $params reference array contains the values submitted by the form
*
- * @access public
* @static
*
* @return object
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Member_BAO_MembershipStatus object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @throws Exception
* @return CRM_Member_BAO_MembershipStatus object
- * @access public
* @static
*/
public static function create($params){
* @param array $params reference array contains the values submitted by the form
* @param array $ids array contains the id - this param is deprecated
*
- * @access public
* @static
*
* @return object
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Member_BAO_MembershipType object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param array $params reference array contains the values submitted by the form
* @param array $ids array contains the id (deprecated)
*
- * @access public
* @static
*
* @return object
* @return array arrays of organization and membership types
*
* @static
- * @access public
*/
public static function getMembershipTypeInfo() {
if (!self::$_membershipTypeInfo) {
* @param $query
*
* @return void
- * @access public
*/
public static function select(&$query) {
// if membership mode add membership id
* Set default values for the form. MobileProvider that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return array defaults
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_mode) {
* Set default values for the form. MobileProvider that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_cdType) {
*
* @throws CiviCRM_API3_Exception
* @return mixed true or array of errors
- * @access public
* @static
*/
public static function formRule($params, $files, $self) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$membershipTypes = CRM_Member_BAO_MembershipType::getMembershipTypes();
* @param int $contributionPageId
*
* @return mixed true or array of errors
- * @access public
* @static
*/
public static function formRule($params, $files, $contributionPageId = NULL) {
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
// get the submitted form values.
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Memberships');
* Set default values for the form. MobileProvider that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return array defaults
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_action & CRM_Core_Action::RENEW) {
* Set default values for the form.
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_cdType) {
* @param array $params (ref.) an assoc array of name/value pairs
*
* @return mixed true or array of errors
- * @access public
* @static
*/
public static function formRule($params) {
/**
* Process the renewal form
*
- * @access public
*
* @return void
*/
* Set default values for the form. MobileProvider that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Set default values for the form. MobileProvider that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* @param array $params (ref.) an assoc array of name/value pairs
*
* @return mixed true or array of errors
- * @access public
* @static
*/
public static function formRule($params) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* The params that are sent to the query
*
* @var array
- * @access protected
*/
protected $_queryParams;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_single = FALSE;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_limit = NULL;
* Processing needed for buildForm and later
*
* @return void
- * @access public
*/
public function preProcess() {
$this->set('searchFormName', 'Search');
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* @param
*
* @return void
- * @access public
*/
public function postProcess() {
if ($this->_done) {
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Find Memberships');
* @param
*
* @return void
- * @access public
*/
public function preProcess() {
self::preProcessCommon($this);
* @param bool $submitOnce
*
* @return void
- * @access public
*/
public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
$this->addButtons(array(
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
/*
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
//check for delete
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
CRM_Contact_Form_Task_EmailCommon::preProcessFromAddress($this);
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* @param null
*
* @return array array of default values
- * @access public
*/
public function setDefaultValues() {
$defaults = array();
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
$this->skipOnHold = $this->skipDeceased = FALSE;
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Process the form after the input has been submitted and validated
* @todo this is horrible copy & paste code because there is so much risk of breakage
* in fixing the existing pdfLetter classes to be suitably generic
- * @access public
*
* @param CRM_Core_Form $form
* @param $membershipIDs
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
// initialize the task and row fields
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Add local and global form rules
*
- * @access protected
*
* @return void
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields) {
return TRUE;
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preprocess();
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {}
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
class CRM_Member_Import_Field {
/**#@+
- * @access protected
* @var string
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$session = CRM_Core_Session::singleton();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
//Setting Upload File Size
* Process the uploaded file
*
* @return void
- * @access public
*/
public function postProcess() {
$this->controller->resetPage('MapField');
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Upload Data');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_mapperFields = $this->get('fields');
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
//to save the current mappings
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields, $files, $self) {
$errors = array();
* preview the file and extract some summary statistics
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->controller->exportValues('MapField');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$skipColumnHeader = $this->controller->exportValue('DataSource', 'skipColumnHeader');
* preview the file and extract some summary statistics
*
* @return void
- * @access public
*/
public function postProcess() {
$fileName = $this->controller->exportValue('DataSource', 'uploadFile');
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
protected $_fileName;
/**#@+
- * @access protected
* @var integer
*/
* @param array mapped array of values
*
* @return void
- * @access public
*/
public function setActiveFields($fieldKeys) {
$this->_activeFieldCount = count($fieldKeys);
* Format the field values for input to the api
*
* @return array (reference ) associative array of name/value pairs
- * @access public
*/
public function &getActiveFieldParams() {
$params = array();
* @param int $mode
*
* @return void
- * @access public
*/
public function set($store, $mode = self::MODE_SUMMARY) {
$store->set('fileSize', $this->_fileSize);
* @param array $data
*
* @return void
- * @access public
*/
public static function exportCSV($fileName, $header, $data) {
$output = array();
* The initializer code, called before the processing
*
* @return void
- * @access public
*/
public function init() {
$fields = CRM_Member_BAO_Membership::importableFields($this->_contactType, FALSE);
* @param array $values the array of values belonging to this line
*
* @return boolean
- * @access public
*/
public function mapField(&$values) {
return CRM_Import_Parser::VALID;
* @param array $values the array of values belonging to this line
*
* @return boolean the result of this processing
- * @access public
*/
public function preview(&$values) {
return $this->summary($values);
* @param array $values the array of values belonging to this line
*
* @return boolean the result of this processing
- * @access public
*/
public function summary(&$values) {
$erroneousField = NULL;
* @param array $values the array of values belonging to this line
*
* @return boolean the result of this processing
- * @access public
*/
public function import($onDuplicate, &$values) {
try{
* Get the array of successfully imported membership id's
*
* @return array
- * @access public
*/
public function &getImportedMemberships() {
return $this->_newMemberships;
* The initializer code, called before the processing
*
* @return void
- * @access public
*/
public function fini() {}
*
* @return Array formatted containing date values
*
- * @access public
*/
public function formattedDates($calcDates, &$formatted) {
$dates = array(
*
* @throws Exception
* @return array|error
- * @access public
*/
public function membership_format_params($params, &$values, $create = FALSE) {
require_once 'api/v3/utils.php';
* class.
*
* @return array collection of required component settings
- * @access public
*
*/
/**
* @param bool $getAllUnconditionally
*
* @return array|null collection of permissions, null if none
- * @access public
*/
/**
* @param bool $getAllUnconditionally
*
* @return array|null collection of required dashboard settings,
* null if no element offered
- * @access public
*
*/
/**
*
* @return array|null collection of required dashboard settings,
* null if no element offered
- * @access public
*
*/
/**
*
* @return array|null collection of required pane settings,
* null if no element offered
- * @access public
*
*/
/**
* class.
*
* @return array|null collection of activity types
- * @access public
*
*/
/**
* the contact and calls the appropriate type of page to view.
*
* @return void
- * @access public
*
*/
public function preProcess() {
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
*
*
* @return void
- * @access public
* @static
*/
public function browse() {
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
*
*
* @return void
- * @access public
* @static
*/
public function browse() {
* This function is called when action is browse
*
* return null
- * @access public
*/
public function browse() {
$links = self::links('all', $this->_isPaymentProcessor, $this->_accessContribution);
* This function is called when action is view
*
* return null
- * @access public
*/
public function view() {
$controller = new CRM_Core_Controller_Simple(
* This function is called when action is update or new
*
* return null
- * @access public
*/
public function edit() {
// set https for offline cc transaction
* This function is the main function that is called when the page loads, it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* Define action links for membership types of related organization
*
* @return array self::$_membershipTypesLinks array of action links
- * @access public
*/
public static function &membershipTypesLinks() {
if (!self::$_membershipTypesLinks) {
* contribution for the membership
* @form array $form (ref.) an assoc array of name/value pairs
* return null
- * @access public
*/
public static function associatedContribution($contactId = NULL, $membershipId = NULL) {
$controller = new CRM_Core_Controller_Simple(
* List memberships for the UF user
*
* return null
- * @access public
*/
public function listMemberships() {
$membership = array();
* loads, it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
parent::preProcess();
/**
* Get all the membership types
*
- * @access public
*
* @param int $id
* @param bool $force
/**
* Get all the membership statuss
*
- * @access public
*
* @param int $id
* @param null $cond
* Flush given pseudoconstant so it can be reread from db
* next time it's requested.
*
- * @access public
* @static
*
* @param bool|string $name pseudoconstant to be flushed
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_single = FALSE;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_limit = NULL;
/**
* What context are we being invoked from
*
- * @access protected
* @var string
*/
protected $_context = NULL;
* the HTML_QuickForm_Controller for that page.
*
* @var array
- * @access protected
*/
public $_queryParams;
* Represent the type of selector
*
* @var int
- * @access protected
*/
protected $_action;
* @param bool $isCancelSupported
*
* @return array
- * @access public
*/
static
function &links($status = 'all',
*
* @param $action
* @param array $params
- * @access public
*/
public function getPagerParams($action, &$params) {
$params['status'] = ts('Member') . ' %%StatusMessage%%';
* @param
*
* @return int Total number of rows
- * @access public
*/
public function getTotalCount($action) {
return $this->_query->searchQuery(0, 0, NULL,
/**
* @return array $qill which contains an array of strings
- * @access public
*/
// the current internationalisation is bad, but should more or less work
* @param enum $output what should the result set include (web/email/csv)
*
* @return array the column headers that need to be displayed
- * @access public
*/
public function &getColumnHeaders($action = NULL, $output = NULL) {
if (!isset(self::$_columnHeaders)) {
* @param string $formName
*
* @return string the name of the form that will handle the task
- * @access protected
*/
public function taskName($controller, $formName = 'Search') {
// total hack, check POST vars and then session to determine stuff
* Return the form name of the task
*
* @return string
- * @access public
*/
public function getTaskFormName() {
return CRM_Utils_String::getClassName($this->_task);
*
* @return array the set of tasks for a group of contacts
* @static
- * @access public
*/
public static function &tasks() {
if (!(self::$_tasks)) {
*
* @return array the set of task titles
* @static
- * @access public
*/
public static function &taskTitles() {
self::tasks();
* @param int $permission
*
* @return array set of tasks that are valid for the user
- * @access public
*/
public static function &permissionedTaskTitles($permission) {
$tasks = array();
*
* @return array the set of tasks for a group of members
* @static
- * @access public
*/
public static function getTask($value) {
self::tasks();
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_action & CRM_Core_Action::DELETE) {
}
/**
- * @access public
*
* @return void
*/
* @param array $params reference array contains the values submitted by the form
* @param bool $pcpBlock if true, create or update PCPBlock, else PCP
*
- * @access public
* @static
*
* @return object
*
* @return null|string Dispaly name of the contact if found
* @static
- * @access public
*/
public static function displayName($id) {
$id = CRM_Utils_Type::escape($id, 'Integer');
* @param int $contactId
*
* @return array array of Pcp if found
- * @access public
* @static
*/
public static function getPcpDashboardInfo($contactId) {
*
* @param array $pcpId contains the pcp ID
*
- * @access public
* @static
*
* @return total amount
*
* @param array $pcpId contains the pcp ID
*
- * @access public
* @static
*
* @return array $honor
* @param int $id campaign page id
*
* @return null
- * @access public
* @static
*
*/
* @param CRM_Core_Form $form form object
*
* @return void
- * @access public
*/
public static function buildPCPForm($form) {
$form->addElement('checkbox', 'pcp_active', ts('Enable Personal Campaign Pages?'), NULL, array('onclick' => "return showHideByValue('pcp_active',true,'pcpFields','block','radio',false);"));
* @param $is_active
*
* @return null
- * @access public
* @static
*/
public static function setIsActive($id, $is_active) {
*
* @throws Exception
* @return null
- * @access public
* @static
*/
public static function sendStatusUpdate($pcpId, $newStatus, $isInitial = FALSE, $component = 'contribute') {
*
* @param $is_active
* @return null
- * @access public
* @static
*/
public static function setDisable($id, $is_active) {
* @param $component
*
* @return int
- * @access public
* @static
*/
public static function getStatus($pcpId, $component) {
* @param $component
*
* @return string
- * @access public
* @static
*/
public static function getPcpBlockStatus($pageId, $component) {
* @param int $id pcp block id
*
* @return Boolean
- * @access public
* @static
*
*/
* @param int $profileId supporter's profile id
*
* @return boolean
- * @access public
* @static
*/
public static function checkEmailProfile($profileId) {
* @param $component
*
* @return int
- * @access public
* @static
*/
public static function getPcpPageTitle($pcpId, $component) {
* @param $component
*
* @return String
- * @access public
* @static
*/
public static function getPcpBlockEntityId($pcpId, $component) {
* @param $component
*
* @return String
- * @access public
* @static
*/
public static function getPcpEntityTable($component) {
* @param string $component
*
* @return int
- * @access public
* @static
*/
public static function getSupporterProfileId($component_id, $component = 'contribute') {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->add('text', 'pcp_title', ts('Title'), NULL, TRUE);
*
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
CRM_PCP_BAO_PCP::buildPCPForm($this);
* @param $self
*
* @return mixed true or array of errors
- * @access public
* @static
*/
public static function formRule($params, $files, $self) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Enable Personal Campaign Pages');
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
CRM_PCP_BAO_PCP::buildPCPForm($this);
* @param $self
*
* @return mixed true or array of errors
- * @access public
* @static
*/
public static function formRule($params, $files, $self) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Enable Personal Campaign Pages');
* @param null
*
* @return void
- * @access public
*/
public function preProcess() {
if ($this->_action & CRM_Core_Action::DELETE) {
* @param null
*
* @return array array of default values
- * @access public
*/
public function setDefaultValues() {
$defaults = array();
* @param null
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_action & CRM_Core_Action::DELETE) {
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields, $files, $form) {}
* @param null
*
* @return void
- * @access public
*/
public function postProcess() {
if ($this->_action & CRM_Core_Action::DELETE) {
* Are we in single form mode or wizard mode?
*
* @var boolean
- * @access protected
*/
public $_single;
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$id = CRM_PCP_BAO_PCP::getSupporterProfileId($this->_pageId, $this->_component);
*
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* @param
*
* @return void
- * @access public
*/
public function run() {
// get the requested action
* @param null $action
*
* @return void
- * @access public
* @static
*/
public function browse($action = NULL) {
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Pledge_BAO_Pledge object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @param array $params reference array contains the values submitted by the form
*
- * @access public
* @static
*
* @return object
* @param array $returnProperties if you want to return specific fields
*
* @return array associated array of field values
- * @access public
* @static
*/
public static function &getValues(&$params, &$values, $returnProperties = NULL) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Pledge_BAO_Pledge object
- * @access public
* @static
*/
public static function &create(&$params) {
* @param int $id pledge id
*
* @return mixed
- * @access public
* @static
*
*/
*
* @return array return the list of pledge fields
*
- * @access public
* @static
*/
public static function getHonorContacts($honorId) {
*
* @param CRM_Core_Form $form form object.
* @param array $params an assoc array of name/value pairs.
- * @access public
*
* @return void.
*/
* Combine all the exportable fields from the lower levels object
*
* @return array array of exportable Fields
- * @access public
* @static
*/
public static function &exportableFields() {
* @param int $contactID
*
* @return int count of pledge records
- * @access public
* @static
*/
public static function getContactPledgeCount($contactID) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Pledge_BAO_PledgeBlock object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Pledge_BAO_PledgeBlock object
- * @access public
* @static
*/
public static function &create(&$params) {
*
* @param array $params reference array contains the values submitted by the form
*
- * @access public
* @static
*
* @return object
* @param int $id pledgeBlock id
*
* @return mixed|null
- * @access public
* @static
*/
public static function deletePledgeBlock($id) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Pledge_BAO_PledgePayment object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* @param int $id pledge id
*
* @return bool
- * @access public
* @static
*
*/
* @param int $contributionID contribution id
*
* @return bool
- * @access public
* @static
*/
public static function resetPledgePayment($contributionID) {
* @param $query
*
* @return void
- * @access public
*/
public static function select(&$query) {
if (($query->_mode & CRM_Contact_BAO_Query::MODE_PLEDGE) || !empty($query->_returnProperties['pledge_id'])) {
* Getter for the qill object
*
* @return string
- * @access public
*/
public function qill() {
return (isset($this->_qill)) ? $this->_qill : "";
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
// check for edit permission
* Set default values for the form.
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
//add various dates
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_contactID = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
* Set default values for the form.
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_action & CRM_Core_Action::DELETE) {
*
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* The params that are sent to the query
*
* @var array
- * @access protected
*/
protected $_queryParams;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_single = FALSE;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_limit = NULL;
* Processing needed for buildForm and later
*
* @return void
- * @access public
*/
public function preProcess() {
/**
* Build the form object
*
- * @access public
*
* @return void
*/
* @param
*
* @return void
- * @access public
*/
public function postProcess() {
if ($this->_done) {
* All local rules are added near the element
*
* @return void
- * @access public
* @see valid_date
*/
public function addRules() {
*
* @return void
* @static
- * @access public
*/
public static function formRule($fields) {
$errors = array();
/**
* Set the default form values
*
- * @access protected
*
* @return array the default array reference
*/
* Return a descriptive name for the page, used in wizard header
*
* @return string
- * @access public
*/
public function getTitle() {
return ts('Find Pledges');
* @param
*
* @return void
- * @access public
*/
public function preProcess() {
self::preProcessCommon($this);
*
*
* @return void
- * @access public
*/
public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
$this->addButtons(array(
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/ function preProcess() {
//check for delete
if (!CRM_Core_Permission::checkActionPermission('CiviPledge', CRM_Core_Action::DELETE)) {
/**
* Build the form object
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preprocess();
* - displaying the QILL (query in local language)
* - displaying elements for saving the search
*
- * @access public
*
* @return void
*/
/**
* Process the form after the input has been submitted and validated
*
- * @access public
*
* @return void
*/
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {}
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* Build all the data structures needed to build the form
*
* @return void
- * @access public
*/
public function preProcess() {
parent::preProcess();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* class.
*
* @return array collection of required component settings
- * @access public
*/
public function getInfo() {
return array(
* @param bool $getAllUnconditionally
*
* @return array|null collection of permissions, null if none
- * @access public
*/
/**
* @param bool $getAllUnconditionally
*
* @return array|null collection of required dashboard settings,
* null if no element offered
- * @access public
*
*/
/**
*
* @return array|null collection of required dashboard settings,
* null if no element offered
- * @access public
*
*/
/**
*
* @return array|null collection of required pane settings,
* null if no element offered
- * @access public
*
*/
/**
* class.
*
* @return array|null collection of activity types
- * @access public
*
*/
/**
* the contact and calls the appropriate type of page to view.
*
* @return void
- * @access public
*
*/
public function preProcess() {
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* This function is the main function that is called when the page loads, it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
* This function is called when action is update or new
*
* return null
- * @access public
*/
public function edit() {
$controller = new CRM_Core_Controller_Simple('CRM_Pledge_Form_Payment',
* This function is called when action is browse
*
* return null
- * @access public
*/
public function browse() {
$controller = new CRM_Core_Controller_Simple('CRM_Pledge_Form_Search', ts('Pledges'), $this->_action);
* This function is called when action is view
*
* return null
- * @access public
*/
public function view() {
$controller = new CRM_Core_Controller_Simple('CRM_Pledge_Form_PledgeView',
* This function is called when action is update or new
*
* return null
- * @access public
*/
public function edit() {
$controller = new CRM_Core_Controller_Simple('CRM_Pledge_Form_Pledge',
* This function is the main function that is called when the page loads, it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
$this->preProcess();
* This function is called when action is browse
*
* return null
- * @access public
*/
public function listPledges() {
$controller = new CRM_Core_Controller_Simple(
* loads, it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
public function run() {
parent::preProcess();
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_single = FALSE;
/**
* Are we restricting ourselves to a single contact
*
- * @access protected
* @var boolean
*/
protected $_limit = NULL;
/**
* What context are we being invoked from
*
- * @access protected
* @var string
*/
protected $_context = NULL;
* the HTML_QuickForm_Controller for that page.
*
* @var array
- * @access protected
*/
public $_queryParams;
* Represent the type of selector
*
* @var int
- * @access protected
*/
protected $_action;
* - Edit
*
* @return array
- * @access public
*
*/
public static function &links() {
* @param $action
* @param array $params
*
- * @access public
*/
public function getPagerParams($action, &$params) {
$params['status'] = ts('Pledge') . ' %%StatusMessage%%';
* @param
*
* @return int Total number of rows
- * @access public
*/
public function getTotalCount($action) {
return $this->_query->searchQuery(0, 0, NULL,
/**
* @return array $qill which contains an array of strings
- * @access public
*/
// the current internationalisation is bad, but should more or less work
* @param enum $output what should the result set include (web/email/csv)
*
* @return array the column headers that need to be displayed
- * @access public
*/
public function &getColumnHeaders($action = NULL, $output = NULL) {
if (!isset(self::$_columnHeaders)) {
* @param string $formName
*
* @return string the name of the form that will handle the task
- * @access protected
*/
public function taskName($controller, $formName = 'Search') {
// total hack, check POST vars and then session to determine stuff
* Return the form name of the task
*
* @return string
- * @access public
*/
public function getTaskFormName() {
return CRM_Utils_String::getClassName($this->_task);
*
* @return array the set of tasks for a group of contacts
* @static
- * @access public
*/
public static function &tasks() {
if (!self::$_tasks) {
*
* @return array the set of task titles
* @static
- * @access public
*/
public static function &taskTitles() {
self::tasks();
*
* @return array the set of optional tasks for a group of contacts
* @static
- * @access public
*/
public static function &optionalTaskTitle() {
$tasks = array();
* @param int $permission
*
* @return array set of tasks that are valid for the user
- * @access public
*/
public static function &permissionedTaskTitles($permission) {
$tasks = array();
*
* @return array the set of tasks for a group of pledge holders
* @static
- * @access public
*/
public static function getTask($value) {
self::tasks();
* @param array $params (reference) an assoc array of name/value pairs
*
* @return CRM_Price_DAO_LineItem object
- * @access public
* @static
*/
public static function create(&$params) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Price_BAO_LineItem object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* lineItem array)
*
* @return void
- * @access static
*/
public static function format($fid, &$params, &$fields, &$values) {
if (empty($params["price_{$fid}"])) {
* @param int $entityTable
*
* @return bool
- * @access public
* @static
*/
public static function deleteLineItems($entityId, $entityTable) {
*
* @param bool $update
*
- * @access public
* @return void
* @static
*/
*
* @param string $entityTable entity Table
*
- * @access public
* @return void
* @static
*/
*
* @return tax rate
*
- * @access public
* @static
*/
public static function calculateTaxRate($lineItemId) {
* @param array $params (reference) an assoc array of name/value pairs
*
* @return CRM_Price_BAO_PriceField object
- * @access public
* @static
*/
public static function add(&$params) {
* @param array $params (reference) an assoc array of name/value pairs
*
* @return CRM_Price_DAO_PriceField object
- * @access public
* @static
*/
public static function create(&$params) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Price_DAO_PriceField object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return Object DAO object on sucess, null otherwise
*
- * @access public
* @static
*/
public static function setIsActive($id, $is_active) {
*
* @return string name
*
- * @access public
* @static
*
*/
*
* @return null
* @internal param bool $search true if used for search else false
- * @access public
* @static
*/
public static function addQuickFormElement(&$qf,
*
* @return boolean
*
- * @access public
* @static
*
*/
* @param $error
* @param bool $allowNoneSelection
*
- * @access public
* @static
*/
*
* @return string $label tax label for custom field
*
- * @access public
* @static
*
*/
* @param $ids
*
* @return CRM_Price_DAO_PriceFieldValue object
- * @access public
* @static
*/
public static function add(&$params, $ids = array()) {
* @param $ids
*
* @return CRM_Price_DAO_PriceFieldValue object
- * @access public
* @static
*/
public static function create(&$params, $ids = array()) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Price_DAO_PriceFieldValue object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return array $values
*
- * @access public
* @static
*/
public static function getValues($fieldId, &$values, $orderBy = 'weight', $isActive = FALSE) {
*
* @return string name
*
- * @access public
* @static
*
*/
*
* @return Object DAO object on sucess, null otherwise
*
- * @access public
* @static
*/
public static function setIsActive($id, $is_active) {
* @param int $fieldId Price field id
*
*
- * @access public
* @static
*/
public static function deleteValues($fieldId) {
*
* @return boolean
*
- * @access public
* @static
*/
public static function del($id) {
* @param String $entityTable entity table
* @param String $financialTypeID financial type id
*
- * @access public
* @static
*/
public static function updateFinancialType($entityId, $entityTable, $financialTypeID) {
* @param array $params (reference) an assoc array of name/value pairs
*
* @return CRM_Price_DAO_PriceSet object
- * @access public
* @static
*/
public static function create(&$params) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Price_DAO_PriceSet object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return Object DAO object on sucess, null otherwise
* @static
- * @access public
*/
public static function setIsActive($id, $isActive) {
return CRM_Core_DAO::setFieldValue('CRM_Price_DAO_PriceSet', $id, 'is_active', $isActive);
*
* @return array $defaultPriceSet default price set
*
- * @access public
* @static
*
*/
*
* @return string title
*
- * @access public
* @static
*
*/
* @return boolean false if fields exist for this set, true if the
* set could be deleted
*
- * @access public
* @static
*/
public static function deleteSet($id) {
*
* @return integer|NULL price set id on success, null otherwise
* @static
- * @access public
*/
public static function getSetId(&$params) {
$fid = NULL;
* @param CRM_Core_Form $form
*
* @return void
- * @access public
*/
public static function buildPriceSet(&$form) {
$priceSetId = $form->get('priceSetId');
* @param $defaults
*
* @return array $defaults
- * @access public
*/
public static function setDefaultPriceSet(&$form, &$defaults) {
if (!isset($form->_priceSet) || empty($form->_priceSet['fields'])) {
*
* @return array of the field ids
*
- * @access public
* @static
*/
public static function getFieldIds($id) {
* @param int $id the price set id to copy
*
* @return the copy object
- * @access public
* @static
*/
public static function copy($id) {
* @param bool $onlyActive
*
* @return int|null|string
- * @access public
* @static
*/
public static function getPricesetCount($sid, $onlyActive = TRUE) {
*
* @return array associate array of frequency interval and unit
* @static
- * @access public
*/
public static function getRecurDetails($priceSetId) {
$query = 'SELECT mt.duration_interval, mt.duration_unit
*
* @return Object DAO object on sucess, null otherwise
* @static
- * @access public
*/
public static function setIsQuickConfig($id, $isQuickConfig) {
return CRM_Core_DAO::setFieldValue('CRM_Price_DAO_PriceSet', $id, 'is_quick_config', $isQuickConfig);
* Check if price set id provides option for
* user to select both auto-renew and non-auto-renew memberships
*
- * @access public
* @static
*
*/
* @param null
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
* @param null
*
* @return void
- * @access public
*/
public function postProcess() {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->assign('title', $this->_title);
* Process the form when submitted
*
* @return void
- * @access public
*/
public function postProcess() {
if (CRM_Price_BAO_PriceSet::deleteSet($this->_sid)) {
* The custom set id saved to the session for an update
*
* @var int
- * @access protected
*/
protected $_sid;
* The field id, used when editing the field
*
* @var int
- * @access protected
*/
protected $_fid;
* The extended component Id
*
* @var array
- * @access protected
*/
protected $_extendComponentId;
/**
* Variable is set if price set is used for membership
- * @access protected
*/
protected $_useForMember;
* @param null
*
* @return void
- * @access public
*/
public function preProcess() {
* @param null
*
* @return array array of default values
- * @access public
*/
public function setDefaultValues() {
$defaults = array();
* @param null
*
* @return void
- * @access public
*/
public function buildQuickForm() {
// lets trim all the whitespace
* @return array if errors then list of errors to be posted back to the form,
* true otherwise
* @static
- * @access public
*/
public static function formRule($fields, $files, $form) {
* @param null
*
* @return void
- * @access public
*/
public function postProcess() {
// store the submitted values in an array
* The price field id saved to the session for an update
*
* @var int
- * @access protected
*/
protected $_fid;
* Option value id, used when editing the Option
*
* @var int
- * @access protected
*/
protected $_oid;
* @param null
*
* @return void
- * @access public
*/
public function preProcess() {
$this->setPageTitle(ts('Price Option'));
* @param null
*
* @return array array of default values
- * @access public
*/
public function setDefaultValues() {
if ($this->_action == CRM_Core_Action::DELETE) {
* @param null
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_action == CRM_Core_Action::DELETE) {
* @return array if errors then list of errors to be posted back to the form,
* true otherwise
* @static
- * @access public
*/
public static function formRule($fields, $files, $form) {
$errors = array();
* @param null
*
* @return void
- * @access public
*/
public function postProcess() {
if ($this->_action == CRM_Core_Action::DELETE) {
* @param null
*
* @return void
- * @access public
*/ function preProcess() {
// get the controller vars
$groupId = $this->get('groupId');
* @param null
*
* @return array the default array reference
- * @access protected
*/
public function setDefaultValues() {
$defaults = array();
* @param null
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->assign('groupTree', $this->_groupTree);
* The set id saved to the session for an update
*
* @var int
- * @access protected
*/
protected $_sid;
* @param null
*
* @return void
- * @access public
*/
public function preProcess() {
// current set id
* @param array $options additional user data
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $options) {
* @param null
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->applyFilter('__ALL__', 'trim');
* @param null
*
* @return array array of default values
- * @access public
*/
public function setDefaultValues() {
$defaults = array('is_active' => TRUE);
* @param null
*
* @return void
- * @access public
*/
public function postProcess() {
// get the submitted form values.
* The price set group id of the field
*
* @var int
- * @access protected
*/
protected $_sid;
* The action links that we need to display for the browse screen
*
* @var array
- * @access private
*/
private static $_actionLinks;
* The price set is reserved or not
*
* @var boolean
- * @access protected
*/
protected $_isSetReserved = false;
* @param null
*
* @return array array of action links that we need to display for the browse screen
- * @access public
*/ function &actionLinks() {
if (!isset(self::$_actionLinks)) {
self::$_actionLinks = array(
* @param null
*
* @return void
- * @access public
*/
public function browse() {
$resourceManager = CRM_Core_Resources::singleton();
*
* @return void
- * @access public
*/
public function edit($action) {
// create a simple controller for editing price data
* @param null
*
* @return void
- * @access public
*/
public function run() {
* @internal param int $id price field id
*
* @return void
- * @access public
*/
public function preview($fid) {
$controller = new CRM_Core_Controller_Simple('CRM_Price_Form_Preview', ts('Preview Form Field'), CRM_Core_Action::PREVIEW);
* The field id of the option
*
* @var int
- * @access protected
*/
protected $_fid;
* The field id of the option
*
* @var int
- * @access protected
*/
protected $_sid;
* The price set is reserved or not
*
* @var boolean
- * @access protected
*/
protected $_isSetReserved = false;
* The action links that we need to display for the browse screen
*
* @var array
- * @access private
*/
private static $_actionLinks;
* @param null
*
* @return array array of action links that we need to display for the browse screen
- * @access public
*/ function &actionLinks() {
if (!isset(self::$_actionLinks)) {
self::$_actionLinks = array(
* @param null
*
* @return void
- * @access public
*/
public function browse() {
$customOption = array();
* @param string $action the action to be invoked
*
* @return void
- * @access public
*/
public function edit($action) {
$oid = CRM_Utils_Request::retrieve('oid', 'Positive',
* @param null
*
* @return void
- * @access public
*/
public function run() {
* @param null
*
* @return array array of action links that we need to display for the browse screen
- * @access public
*/ function &actionLinks() {
// check if variable _actionsLinks is populated
if (!isset(self::$_actionLinks)) {
* @param null
*
* @return void
- * @access public
*
*/
public function run() {
* @param string $action the action to be invoked
*
* @return void
- * @access public
*/
public function edit($sid, $action) {
// create a simple controller for editing price sets
* @param int $sid price set id
*
* @return void
- * @access public
*/
public function preview($sid) {
$controller = new CRM_Core_Controller_Simple('CRM_Price_Form_Preview', ts('Preview Price Set'), NULL);
* @param string $action the action to be invoked
*
* @return void
- * @access public
*/
public function browse($action = NULL) {
// get all price sets
* all the fields in the page
*
* @return void
- * @access public
*/
public function copy() {
$id = CRM_Utils_Request::retrieve('sid', 'Positive',
*
* @return void
*
- * @access public
*/
public function preProcess() {
$this->_id = $this->get('id');
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->add('hidden', 'gid', $this->_gid);
* @param CRM_Core_Form $form the form object
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $form) {
/**
* Process the user submitted custom data values.
*
- * @access public
*
* @return void
*/
* Use the form name to create the tpl file name
*
* @return string
- * @access public
*/
/**
* @return string
* i.e. we dont override
*
* @return string
- * @access public
*/
/**
* @return string
*
* @return void
*
- * @access public
*
*/
public function preProcess() {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$this->addButtons(array(
*
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $form) {
/**
* Process the user submitted custom data values.
*
- * @access public
*
* @return void
*/
*
* @return void
*
- * @access public
*
*/
public function preProcess() {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if (empty($this->_ufGroup['id'])) {
/**
* Process the user submitted custom data values.
*
- * @access public
*
* @return void
*/
*
* This is a first version and will be tweaked over a period of time
*
- * @access public
*
* @return boolean true if no error found
*/
*
* @return void
*
- * @access public
*
*/
public function preProcess() {
/**
* Set the default form values
*
- * @access protected
*
* @return array the default array reference
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
// Is proximity search enabled for this profile?
/**
*
*
- * @access public
*
* @return void
*/
* The contact id of the person we are viewing
*
* @var int
- * @access protected
*/
protected $_id;
* The profile group are are interested in
*
* @var int
- * @access protected
*/
protected $_gid;
* The profile types we restrict this page to display
*
* @var string
- * @access protected
*/
protected $_restrict;
* Should we bypass permissions
*
* @var boolean
- * @access protected
*/
protected $_skipPermission;
* @param null $profileIds
*
* @return \CRM_Profile_Page_Dynamic
- * @access public
*/
public function __construct($id, $gid, $restrict, $skipPermission = FALSE, $profileIds = NULL) {
parent::__construct();
* type of action and executes that action.
*
* @return void
- * @access public
*
*/
public function run() {
* Use the form name to create the tpl file name
*
* @return string
- * @access public
*/
/**
* @return string
* i.e. we dont override
*
* @return string
- * @access public
*/
/**
* @return string
* All the fields that are listings related
*
* @var array
- * @access protected
*/
protected $_fields;
* The custom fields for this domain
*
* @var array
- * @access protected
*/
protected $_customFields;
* The input params from the request
*
* @var array
- * @access protected
*/
protected $_params;
* the selector object to do a query
*
* @return void
- * @access public
*
*/
public function preProcess() {
* @param int $gid
*
* @return array
- * @access public
*/
public function getProfileContact($gid) {
$session = CRM_Core_Session::singleton();
* Use the form name to create the tpl file name
*
* @return string
- * @access public
*/
/**
* @return string
* i.e. we dont override
*
* @return string
- * @access public
*/
/**
* @return string
* method.
*
* @return void
- * @access public
*
*/
public function run() {
* Browse the listing
*
* @return void
- * @access public
*/
public function browse() {
$dateFields = NULL;
*
* @return string|void
* @static
- * @access public
*/
public function run($args = NULL) {
if ($args[1] !== 'profile') {
* the contact and calls the appropriate type of page to view.
*
* @return void
- * @access public
*
*/
public function preProcess() {
* Build the outcome basing on the CRM_Profile_Page_Dynamic's HTML
*
* @return void
- * @access public
*
*/
public function run() {
* Use the form name to create the tpl file name
*
* @return string
- * @access public
*/
/**
* @return string
* i.e. we dont override
*
* @return string
- * @access public
*/
/**
* @return string
* The sql params we use to get the list of contacts
*
* @var string
- * @access protected
*/
protected $_params;
* The public visible fields to be shown to the user
*
* @var array
- * @access protected
*/
protected $_fields;
* The custom fields for this domain
*
* @var array
- * @access protected
*/
protected $_customFields;
* Cache the query object
*
* @var object
- * @access protected
*/
protected $_query;
* Cache the expanded options list if any
*
* @var object
- * @access protected
*/
protected $_options;
* @param null $gids
*
* @return array
- * @access public
*/
public static function &links($map = FALSE, $editLink = FALSE, $ufLink = FALSE, $gids = NULL) {
if (!self::$_links) {
* @param $action
* @param array $params
*
- * @access public
*/
public function getPagerParams($action, &$params) {
$status =
* @param enum $output what should the result set include (web/email/csv)
*
* @return array the column headers that need to be displayed
- * @access public
*/
public function &getColumnHeaders($action = NULL, $output = NULL) {
static $skipFields = array('group', 'tag');
* @param
*
* @return int Total number of rows
- * @access public
*/
public function getTotalCount($action) {
$additionalWhereClause = 'contact_a.is_deleted = 0';
* Return the qill for this selector
*
* @return string
- * @access public
*/
public function getQill() {
return $this->_query->qill();
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Report_DAO_ReportInstance object
- * @access public
* @static
*/
public static function add(&$params) {
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Report_BAO_ReportInstance object
- * @access public
* @static
*/
public static function &create(&$params) {
* Use the form name to create the tpl file name
*
* @return string
- * @access public
*/
/**
* @return string
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* class.
*
* @return array collection of required component settings
- * @access public
*
*/
/**
* @param bool $getAllUnconditionally
*
* @return array|null collection of permissions, null if none
- * @access public
*/
/**
* @param bool $getAllUnconditionally
*
* @return array|null collection of required dashboard settings,
* null if no element offered
- * @access public
*
*/
/**
* Provides component's user dashboard page object.
*
* @return mixed component's User Dashboard applet object
- * @access public
*
*/
/**
*
* @return array|null collection of required dashboard settings,
* null if no element offered
- * @access public
*
*/
/**
*
* @return array|null collection of required pane settings,
* null if no element offered
- * @access public
*
*/
/**
* class.
*
* @return array|null collection of activity types
- * @access public
*
*/
/**
* or by component ($compID)
*
* @return array $rows
- * @access public
* @static
*/
public function &info() {
* Obtains the group name from url and sets the title.
*
* @return void
- * @access public
*
*/
public function preProcess() {
*
*
* @return void
- * @access public
* @static
*/
public function browse() {
* @param int $mode mode that we are in
*
* @return string
- * @access public
*/
public function userContextParams($mode = NULL) {
return 'reset=1&action=browse';
*
* @return boolean true if yes, else false
* @static
- * @access public
*/
public static function isInstanceGroupRoleAllowed($instanceId) {
if (!$instanceId) {
/**
* Class constructor
*
- * @access public
* @return \CRM_SMS_DAO_Provider
*/
/**
/*
* Retrieves the list of providers from the database
*
- * @access public
* $selectArr array of coloumns to fetch
* $getActive boolean to get active providers
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
if (!CRM_SMS_BAO_Provider::activeProviderCount()) {
* Set default values for the form.
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
/**
* Display Name of the form
*
- * @access public
*
* @return string
*/
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields) {
$errors = array();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
/**
* Process the form submission
*
- * @access public
*
* @return void
*/
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
/**
* Set default values for the form.
*
- * @access public
*
* @return void
*/
* @param
*
* @return void
- * @access public
*/
public function buildQuickform() {
$this->addDateTime('start_date', ts('Schedule SMS'), FALSE, array('formatType' => 'mailing'));
* @param
*
* @return void
- * @access public
*/
public function postProcess() {
$params = array();
/**
* Display Name of the form
*
- * @access public
*
* @return string
*/
* Set default values for the form.
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
$session = CRM_Core_Session::singleton();
* @param $self
*
* @return mixed true or array of errors
- * @access public
* @static
*/
public static function formRule($params, $files, $self) {
/**
* Display Name of the form
*
- * @access public
*
* @return string
*/
* Finally it calls the parent's run method.
*
* @return void
- * @access public
*
*/
public function run() {
* @param null $action
*
* @return void
- * @access public
* @static
*/
public function browse($action = NULL) {
/**
* Send an SMS Message via the API Server
*
- * @access public
*/
abstract function send($recipients, $header, $message, $dncID = NULL);
/**
* Return message text. Child class could override this function to have better control over the message being sent.
*
- * @access public
*/
public function getMessage($message, $contactID, $contactDetails) {
$html = $message->getHTMLBody();
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
CRM_Core_Resources::singleton()
}
/**
- * @access public
*
* @return void
*/
/**
* Set the default form values
*
- * @access protected
*
* @return array the default array reference
*/
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
foreach ($this->_fields as $name => $field) {
* Use the form name to create the tpl file name
*
* @return string
- * @access public
*/
/**
* @return string
/**
* Build the form object for Advance Settings.
*
- * @access public
*
* @param CRM_Core_Form $form
*
* The uf group id saved to the session for an update
*
* @var int
- * @access protected
*/
protected $_gid;
* The field id, used when editing the field
*
* @var int
- * @access protected
*/
protected $_id;
* The set of fields that we can view/edit in the user field framework
*
* @var array
- * @access protected
*/
protected $_fields;
* The title for field
*
* @var int
- * @access protected
*/
protected $_title;
* The set of fields sent to the select element
*
* @var array
- * @access protected
*/
protected $_selectFields;
* To store fields with if locationtype exits status
*
* @var array
- * @access protected
*/
protected $_hasLocationTypes;
* or is any field having in selector true.
*
* @var boolean.
- * @access protected
*/
protected $_hasSearchableORInSelector;
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_gid = CRM_Utils_Request::retrieve('gid', 'Positive', $this);
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_action & CRM_Core_Action::DELETE) {
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
$ids = array('uf_group' => $this->_gid);
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRuleSubType($fieldType, $groupType, $errors) {
if (in_array($fieldType, array(
*
* @return Array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRuleCustomDataExtentColumnValue($customField, $gid, $fieldType, &$errors) {
// fix me : check object $customField
* @param Array $errors Collect errors
*
* @static
- * @access public
*/
public static function formRulePrimaryCheck($fields, $profileFieldName, $groupFields, &$errors) {
//FIXME: This may need to also apply to website fields if they are refactored to allow more than one per profile
*
* @return array list of errors to be posted back to the form
* @static
- * @access public
*/
public static function formRule($fields, $files, $self) {
$is_required = CRM_Utils_Array::value('is_required', $fields, FALSE);
* The form id saved to the session for an update
*
* @var int
- * @access protected
*/
protected $_id;
* The title for group
*
* @var int
- * @access protected
*/
protected $_title;
protected $_groupElement;
* Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
// current form id
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
if ($this->_action & (CRM_Core_Action::DISABLE | CRM_Core_Action::DELETE)) {
* Set default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
- * @access public
*
* @return void
*/
* @param array $self current form object.
*
* @return true if no errors, else array of errors
- * @access public
* @static
*/
public static function formRule($fields, $files, $self) {
* Process the form
*
* @return void
- * @access public
*/
public function postProcess() {
if ($this->_action & CRM_Core_Action::DELETE) {
*
* @return void
*
- * @access public
*
*/
public function preProcess() {
*
* @return void
*
- * @access public
*
*/
public function preProcess() {
*
* @return void
*
- * @access public
*
*/
public function preProcess() {
* Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
parent::buildQuickForm();
* The group id of the field
*
* @var int
- * @access protected
*/
protected $_gid;
* The action links that we need to display for the browse screen
*
* @var array
- * @access private
*/
private static $_actionLinks;
* Browse all CiviCRM Profile group fields.
*
* @return void
- * @access public
* @static
*/
public function browse() {
* @param string $action the action to be invoked
*
* @return void
- * @access public
*/
public function edit($action) {
// create a simple controller for editing CiviCRM Profile data
* type of action and executes that action.
*
* @return void
- * @access public
*
*/
public function run() {
* @param int $groupId
*
* @return void
- * @access public
*/
public function preview($fieldId, $groupId) {
$controller = new CRM_Core_Controller_Simple('CRM_UF_Form_Preview', ts('Preview Custom Data'), CRM_Core_Action::PREVIEW);
* @param
*
* @return void
- * @access public
*/
public function run() {
// get the requested action
* all the fields in the profile
*
* @return void
- * @access public
*/
public function copy() {
$gid = CRM_Utils_Request::retrieve('gid', 'Positive',
* This function is for profile mode (standalone html form ) for uf group
*
* @return void
- * @access public
*/
public function profile() {
$config = CRM_Core_Config::singleton();
* @param string $action the action to be invoked
*
* @return void
- * @access public
*/
public function edit($id, $action) {
// create a simple controller for editing uf data
* @param
*
* @return void
- * @access public
* @static
*/
public function browse($action = NULL) {
* @param $action
*
* @return void
- * @access public
*/
public function preview($id, $action) {
$controller = new CRM_Core_Controller_Simple('CRM_UF_Form_Preview', ts('CiviCRM Profile Group Preview'), NULL);
* Getter function for title. Should be over-ridden by derived class
*
* @return string
- * @access public
*/
/**
* @return string
* Use the form name to create the tpl file name
*
* @return string
- * @access public
*/
/**
* @return string
* @param array $params (reference ) an assoc array of name/value pairs
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_BAO_Field object
- * @access public
* @static
*/
public static function &add(&$params) {
* @param array $params (reference) an assoc array of name/value pairs
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field object
- * @access public
* @static
*/
public static function create(&$params) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return Object DAO object on sucess, null otherwise
*
- * @access public
* @static
*/
public static function setIsActive($id, $is_active) {
*
* @return string name
*
- * @access public
* @static
*
*/
* @param array $freezeOptions
*
* @return null
- * @access public
* @static
*/
public static function addQuickFormElement(&$qf,
*
* @return boolean
*
- * @access public
* @static
*
*/
* @param $fields
* @param $error
*
- * @access public
* @static
*/
* @param $ids
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue object
- * @access public
* @static
*/
public static function &add(&$params, $ids) {
* @param $ids
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue object
- * @access public
* @static
*/
public static function create(&$params, $ids) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return array $values
*
- * @access public
* @static
*/
public static function getValues($fieldId, &$values, $orderBy = 'weight', $isActive = FALSE) {
*
* @return string name
*
- * @access public
* @static
*
*/
*
* @return Object DAO object on sucess, null otherwise
*
- * @access public
* @static
*/
public static function setIsActive($id, $is_active) {
*
* @return boolean
*
- * @access public
* @static
*/
public static function deleteValues($fieldId) {
*
* @return boolean
*
- * @access public
* @static
*/
public static function del($id) {
* @param array $params (reference) an assoc array of name/value pairs
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_LineItem object
- * @access public
* @static
*/
public static function create(&$params) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_BAO_LineItem object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
* lineItem array)
*
* @return void
- * @access static
*/
public static function format($fid, &$params, &$fields, &$values) {
if (empty($params["price_{$fid}"])) {
* @param int $entityTable
*
* @return bool
- * @access public
* @static
*/
public static function deleteLineItems($entityId, $entityTable) {
* @param array $params (reference) an assoc array of name/value pairs
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set object
- * @access public
* @static
*/
public static function create(&$params) {
* @param array $defaults (reference ) an assoc array to hold the flattened values
*
* @return CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set object
- * @access public
* @static
*/
public static function retrieve(&$params, &$defaults) {
*
* @return Object DAO object on sucess, null otherwise
* @static
- * @access public
*/
public static function setIsActive($id, $isActive) {
return CRM_Core_DAO::setFieldValue('CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set', $id, 'is_active', $isActive);
*
* @return id $priceSetID
*
- * @access public
* @static
*
*/
*
* @return string title
*
- * @access public
* @static
*
*/
* @return boolean false if fields exist for this set, true if the
* set could be deleted
*
- * @access public
* @static
*/
public static function deleteSet($id) {
*
* @return price set id on success, null otherwise
* @static
- * @access public
*/
public static function getSetId(&$params) {
$fid = NULL;
* @param CRM_Core_Form $form
*
* @return void
- * @access public
*/
static function buildPriceSet(&$form) {
$priceSetId = $form->get('priceSetId');
* @param $defaults
*
* @return array $defaults
- * @access public
*/
static function setDefaultPriceSet(&$form, &$defaults) {
if (!isset($form->_priceSet) || empty($form->_priceSet['fields'])) {
*
* @return array of the field ids
*
- * @access public
* @static
*/
public static function getFieldIds($id) {
* @param int $id the price set id to copy
*
* @return the copy object
- * @access public
* @static
*/
static function copy($id) {
* @param bool $onlyActive
*
* @return int|null|string
- * @access public
* @static
*/
public static function getPricesetCount($sid, $onlyActive = TRUE) {
*
* @return array associate array of frequency interval and unit
* @static
- * @access public
*/
public static function getRecurDetails($priceSetId) {
$query = 'SELECT mt.duration_interval, mt.duration_unit
*
* @return Object DAO object on sucess, null otherwise
* @static
- * @access public
*/
public static function setIsQuickConfig($id, $isQuickConfig) {
return CRM_Core_DAO::setFieldValue('CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set', $id, 'is_quick_config', $isQuickConfig);
/**
* Class constructor
*
- * @access public
* @return \CRM_Upgrade_Snapshot_V4p2_Price_DAO_Field
*/
public function __construct()
/**
* return foreign links
*
- * @access public
* @return array
*/
public function links()
/**
* returns all the column names of this table
*
- * @access public
* @return array
*/
static function &fields()
/**
* returns the names of this table
*
- * @access public
* @static
* @return string
*/
/**
* returns if this table needs to be logged
*
- * @access public
* @return boolean
*/
public function getLog()
/**
* returns the list of fields that can be imported
*
- * @access public
* return array
* @static
*/
/**
* returns the list of fields that can be exported
*
- * @access public
* return array
* @static
*/
/**
* Class constructor
*
- * @access public
* @return \CRM_Upgrade_Snapshot_V4p2_Price_DAO_FieldValue
*/
public function __construct()
/**
* return foreign links
*
- * @access public
* @return array
*/
public function links()
/**
* returns all the column names of this table
*
- * @access public
* @return array
*/
static function &fields()
/**
* returns the names of this table
*
- * @access public
* @static
* @return string
*/
/**
* returns if this table needs to be logged
*
- * @access public
* @return boolean
*/
public function getLog()
/**
* returns the list of fields that can be imported
*
- * @access public
* return array
* @static
*/
/**
* returns the list of fields that can be exported
*
- * @access public
* return array
* @static
*/
/**
* Class constructor
*
- * @access public
* @return \CRM_Upgrade_Snapshot_V4p2_Price_DAO_LineItem
*/
public function __construct()
/**
* return foreign links
*
- * @access public
* @return array
*/
public function links()
/**
* returns all the column names of this table
*
- * @access public
* @return array
*/
static function &fields()
/**
* returns the names of this table
*
- * @access public
* @static
* @return string
*/
/**
* returns if this table needs to be logged
*
- * @access public
* @return boolean
*/
public function getLog()
/**
* returns the list of fields that can be imported
*
- * @access public
* return array
* @static
*/
/**
* returns the list of fields that can be exported
*
- * @access public
* return array
* @static
*/
/**
* Class constructor
*
- * @access public
* @return \CRM_Upgrade_Snapshot_V4p2_Price_DAO_Set
*/
public function __construct()
/**
* return foreign links
*
- * @access public
* @return array
*/
public function links()
/**
* returns all the column names of this table
*
- * @access public
* @return array
*/
static function &fields()
/**
* returns the names of this table
*
- * @access public
* @static
* @return string
*/
/**
* returns if this table needs to be logged
*
- * @access public
* @return boolean
*/
public function getLog()
/**
* returns the list of fields that can be imported
*
- * @access public
* return array
* @static
*/
/**
* returns the list of fields that can be exported
*
- * @access public
* return array
* @static
*/
/**
* Class constructor
*
- * @access public
* @return \CRM_Upgrade_Snapshot_V4p2_Price_DAO_SetEntity
*/
public function __construct()
/**
* return foreign links
*
- * @access public
* @return array
*/
public function links()
/**
* returns all the column names of this table
*
- * @access public
* @return array
*/
static function &fields()
/**
* returns the names of this table
*
- * @access public
* @static
* @return string
*/
/**
* returns if this table needs to be logged
*
- * @access public
* @return boolean
*/
public function getLog()
/**
* returns the list of fields that can be imported
*
- * @access public
* return array
* @static
*/
/**
* returns the list of fields that can be exported
*
- * @access public
* return array
* @static
*/
* If $list is not actually an array at all, then the default value is
* returned.
*
- * @access public
*
* @param string $key
* Key value to look up in the array.
*
* @return mixed
* The value of the key, or null if the key is not found.
- * @access public
*/
public static function retrieveValueRecursive(&$params, $key) {
if (!is_array($params)) {
* version 4.2.0, which was to return NULL on failure. This function also
* checks that $list is an array before attempting to search it.
*
- * @access public
*
* @param mixed $value
* The value to search for.
* @param string $seperator
* (optional) String to be appended after open/close tags.
*
- * @access public
*
* @return string
* XML fragment representing $list.
* @param string $seperator
* (optional) String that separates the concatenated keys.
*
- * @access public
*/
public static function flatten(&$list, &$flat, $prefix = '', $seperator = ".") {
foreach ($list as $name => $value) {
* @return array
* Array-encoded tree
*
- * @access public
*/
public function unflatten($delim, &$arr) {
$result = array();
*
* @return array
* The merged array.
- * @access public
*/
public static function crmArrayMerge($a1, $a2) {
if (empty($a1)) {
*
* @return bool
* True if $list contains at least one sub-array, false otherwise.
- * @access public
*/
public static function isHierarchical(&$list) {
foreach ($list as $n => $v) {
* @return bool
* True if $value was found, false otherwise.
*
- * @access public
*/
public static function crmInArray($value, $params, $caseInsensitive = TRUE) {
foreach ($params as $item) {
*
* @return boolean
* True if the array is empty.
- * @access public
*/
public static function crmIsEmptyArray($array = array()) {
if (!is_array($array)) {
* @param date $birthDate Birth Date
*
* @return int array $results contains years or months
- * @access public
* @static
*/
static public function calculateAge($birthDate) {
* @param bool $dontCareTime
*
* @return array $result contains new date with added interval
- * @access public
*/
public static function intervalAdd($unit, $interval, $date, $dontCareTime = FALSE) {
if (is_array($date)) {
* @param int $fyMonth Fiscal Start Month
*
* @return int $fy Current Fiscl Year
- * @access public
* @static
*/
public static function calculateFiscalYear($fyDate, $fyMonth) {
* be used for CRM_vent_BAO_Participant:create()
*
* @return array|CRM_Error
- * @access public
*/
function _civicrm_api3_deprecated_participant_formatted_param($params, &$values, $create = FALSE) {
$fields = CRM_Event_DAO_Participant::fields();
* @param null $onDuplicate
*
* @return array|CRM_Error
- * @access public
*/
function _civicrm_api3_deprecated_formatted_param($params, &$values, $create = FALSE, $onDuplicate = Null) {
// copy all the contribution fields as is
* be used for CRM_Activity_BAO_Activity::create()
*
* @return array|CRM_Error
- * @access public
*/
function _civicrm_api3_deprecated_activity_formatted_param(&$params, &$values, $create = FALSE) {
// copy all the activity fields as is
* @param array $params The structured parameter list
*
* @return bool|CRM_Utils_Error
- * @access public
*/
function _civicrm_api3_deprecated_add_formatted_param(&$values, &$params) {
/* Crawl through the possible classes:
* @param array $params The structured parameter list
*
* @return bool
- * @access public
*/
function _civicrm_api3_deprecated_add_formatted_location_blocks(&$values, &$params) {
static $fields = NULL;
* @param array $params Structured parameter list (as in crm_format_params)
*
* @return bool|CRM_Core_Error
- * @access public
*/
function _civicrm_api3_deprecated_validate_formatted_contact(&$params) {
/* Look for offending email addresses */
* @param string $csType contact subtype if exists/passed.
*
* @return null on success, error message otherwise
- * @access public
*/
function _civicrm_api3_deprecated_contact_check_custom_params($params, $csType = NULL) {
empty($csType) ? $onlyParent = TRUE : $onlyParent = FALSE;
* @param string $name name of file
*
* @return boolean true if file is ascii
- * @access public
*/
public static function isAscii($name) {
$fd = fopen($name, "r");
* @param string $name name of file
*
* @return boolean true if file is html
- * @access public
*/
public static function isHtml($name) {
$fd = fopen($name, "r");
* @param boolean $abort should we abort or just return an invalid code
*
* @return void
- * @access public
* @static
*/
public static function createDir($path, $abort = TRUE) {
*
* @throws Exception
* @return void
- * @access public
* @static
*/
public static function cleanDir($target, $rmdir = TRUE, $verbose = TRUE) {
* @param string $name name of file
*
* @return boolean whether the file was recoded properly
- * @access public
*/
public static function toUtf8($name) {
static $config = NULL;
* @param string $slash
*
* @return string
- * @access public
* @static
*/
public static function addTrailingSlash($path, $slash = NULL) {
*
* @return mixed based on op. pre-hooks return a boolean or
* an error message which aborts the operation
- * @access public
*/
public static function post($op, $objectName, $objectId, &$objectRef) {
$event = new \Civi\Core\Event\PostEvent($op, $objectName, $objectId, $objectRef);
* @param array $entities List of pending entities
*
* @return null the return value is ignored
- * @access public
*/
public static function managed(&$entities) {
return self::singleton()->invoke(1, $entities,
* relative to the activity list
*
* @return string the html snippet to include in the dashboard
- * @access public
*/
public static function dashboard($contactID, &$contentPlacement = self::DASHBOARD_BELOW) {
$retval = self::singleton()->invoke(2, $contactID, $contentPlacement,
* @param array $recentArray - an array of recently viewed or processed items, for in place modification
*
* @return array
- * @access public
*/
public static function recent(&$recentArray) {
return self::singleton()->invoke(1, $recentArray,
* @param array $amount - the amount structure to be displayed
*
* @return null
- * @access public
*/
public static function buildAmount($pageType, &$form, &$amount) {
return self::singleton()->invoke(3, $pageType, $form, $amount, self::$_nullObject,
* @param array $tokens - the list of tokens that can be used for the contact
*
* @return null
- * @access public
*/
public static function tokens(&$tokens) {
return self::singleton()->invoke(1, $tokens,
* @param string $className - the top level className from where the hook is invoked
*
* @return null
- * @access public
*/
static function tokenValues(&$details,
$contactIDs,
* @param object $page - the page that will be rendered
*
* @return null
- * @access public
*/
public static function pageRun(&$page) {
return self::singleton()->invoke(1, $page,
* @param object $object - reference to the copy
*
* @return null
- * @access public
*/
public static function copy($objectName, &$object) {
return self::singleton()->invoke(2, $objectName, $object,
*
* @return array of data to be displayed, where the key is a unique id to be used for styling (div id's)
* and the value is an array with keys 'label' and 'value' specifying label/value pairs
- * @access public
*/
public static function caseSummary($caseID) {
return self::singleton()->invoke(1, $caseID,
* @param array $query set of queries
*
* @return mixed
- * @access public
*/
public static function dupeQuery($obj, $type, &$query) {
return self::singleton()->invoke(3, $obj, $type, $query,
* @param string $action (optional ) the requested action to be performed if the types was 'mailing'
*
* @return mixed
- * @access public
*/
public static function emailProcessor($type, &$params, $mail, &$result, $action = NULL) {
return self::singleton()->invoke(5, $type, $params, $mail, $result, $action, self::$_nullObject, 'civicrm_emailProcessor');
* fields - import fields
*
* @return void
- * @access public
*/
public static function import($object, $usage, &$objectRef, &$params) {
return self::singleton()->invoke(4, $object, $usage, $objectRef, $params,
* @param array $ufGroups array of ufgroups for a module.
*
* @return null
- * @access public
*/
public static function buildUFGroupsForModule($moduleName, &$ufGroups) {
return self::singleton()->invoke(2, $moduleName, $ufGroups,
* CRM_Utils_Mail_Incoming::EMAILPROCESSOR_IGNORE - skip this email address
*
* @return null
- * @access public
*/
public static function emailProcessorContact($email, $contactID, &$result) {
return self::singleton()->invoke(3, $email, $contactID, $result,
* @param $object a reference to the page or form object
*
* @return mixed
- * @access public
*/
public static function alterContent(&$content, $context, $tplName, &$object) {
return self::singleton()->invoke(4, $content, $context, $tplName, $object,
* @param $tplName reference the file name of the tpl
*
* @return mixed
- * @access public
*/
public static function alterTemplateFile($formName, &$form, $context, &$tplName) {
return self::singleton()->invoke(4, $formName, $form, $context, $tplName,
*
* @param array $angularModules list of modules
* @return null the return value is ignored
- * @access public
*
* @code
* function mymod_civicrm_angularModules(&$angularModules) {
* - 'text/plain' : used for iCal formatted feed
* - 'text/xml' : used for gData or rss formatted feeds
*
- * @access public
*
* @param string $calendar The calendar data to be published.
* @param string $content_type
*
* @param array $params (by reference)
*
- * @access public
*
* @return boolean true if a mail was sent, else false
*/
* Get the Active outBound email
*
* @return boolean true if valid outBound email configuration found, false otherwise
- * @access public
* @static
*/
public static function validOutBoundMail() {
* or an array of Label Format values.
* @param string|\Unit $unit Unit of measure for the PDF document
*
- * @access public
*/
public function __construct($format, $unit = 'mm') {
if (is_array($format)) {
* @param array $params the set of options needed to initialize the parent
* constructor
*
- * @access public
*
* @return void
*
* @param array $params
*
* @return int new pageId to display to the user
- * @access public
*/
public function getPageID($defaultPageId = 1, &$params) {
// POST has higher priority than GET vars
* @param int $defaultPageRowCount the default value if not set
*
* @return int the rowCount value to use
- * @access public
*
*/
public function getPageRowCount($defaultPageRowCount = self::ROWCOUNT) {
*
* @return array: an array of the pageID and offset
*
- * @access public
*
*/
public function getOffsetAndRowCount() {
* @param bool $isDAO
*
* @return string The html formatted string
- * @access public
* @static
*/
public static function getAToZBar(&$query, $sortByCharacter, $isDAO = FALSE) {
* Return the all the static characters
*
* @return array $staticAlphabets is a array of static characters
- * @access private
* @static
*/
public static function getStaticCharacters() {
* @param $isDAO
*
* @return array $dynamicAlphabets is a array of dynamic characters
- * @access private
* @static
*/
public static function getDynamicCharacters(&$query, $isDAO) {
* @param $isDAO
*
* @return array with links
- * @access private
* @static
*/
public static function createLinks(&$query, $sortByCharacter, $isDAO) {
* doesn't need to know which class the Pseudoconstant is on
* (some are on the Contribute_Pseudoconsant Class etc
*
- * @access public
* @static
*
* @param $constant
* doesn't need to know which class the Pseudoconstant is on
* (some are on the Contribute_Pseudoconsant Class etc
*
- * @access public
* @static
*
* @param $constant
* @param string $var The string to be echoed
*
* @return string $var
- * @access public
*/
public static function ping($var = NULL) {
$session = CRM_Core_Session::singleton();
* Initialize this class and set the static variables
*
* @return void
- * @access public
* @static
*/
public static function initialize() {
* Return the recently viewed array
*
* @return array the recently viewed array
- * @access public
* @static
*/
public static function &get() {
* @param array $others
*
* @return void
- * @access public
* @static
*/
static function add($title,
* @param array $recentItem array of the recent Item to be removed
*
* @return void
- * @access public
* @static
*/
public static function del($recentItem) {
* @param string $id contact id that had to be removed
*
* @return void
- * @access public
* @static
*/
public static function delContact($id) {
* pattern and cache the instance in this variable
*
* @var object
- * @access private
* @static
*/
static private $_singleton = NULL;
* @param string $method where should we look for the variable
*
* @return mixed the value of the variable
- * @access public
* @static
*/
public static function retrieve($name, $type, &$store = NULL, $abort = FALSE, $default = NULL, $method = 'REQUEST') {
*
* @return bool true if valid date
* @static
- * @access public
*/
public static function currentDate($date, $monthRequired = TRUE) {
$config = CRM_Core_Config::singleton();
*
* @return bool true if valid date
* @static
- * @access public
*/
public static function mysqlDate($date) {
// allow date to be null
* Checks to make sure the uploaded file is ascii
*
* @param array Uploaded file info (from $_FILES)
- * @access private
*
* @return bool true if file has been uploaded, false otherwise
*/
* Checks to make sure the uploaded file is in UTF-8, recodes if it's not
*
* @param array Uploaded file info (from $_FILES)
- * @access private
*
* @return bool whether file has been uploaded properly and is now in UTF-8
*/
* Checks to make sure the uploaded file is html
*
* @param array Uploaded file info (from $_FILES)
- * @access private
*
* @return bool true if file has been uploaded, false otherwise
*/
* @param array $options the daoName and fieldName (optional )
*
* @return boolean true if object exists
- * @access public
* @static
*/
public static function objectExists($value, $options) {
*
* @return bool true if valid date
* @static
- * @access public
*/
public static function qfDate($date) {
$config = CRM_Core_Config::singleton();
* @param string $var The string to be echoed
*
* @return string $var
- * @access public
*/
public function ping($var) {
$session = CRM_Core_Session::singleton();
*
* @throws SoapFault
* @return void
- * @access public
*/
public function verify($key) {
$session = CRM_Core_Session::singleton();
*
* @throws SoapFault
* @return string The SOAP Client key
- * @access public
* @static
*/
public function authenticate($name, $pass, $loadCMSBootstrap = FALSE) {
* Function returns the string for the order by clause
*
* @return string the order by clause
- * @access public
*/
public function orderBy() {
if (empty($this->_vars[$this->_currentSortID])) {
*
* @return string the string to append to the url
* @static
- * @access public
*/
public static function sortIDValue($index, $dir) {
return ($dir == self::DESCENDING) ? $index . '_d' : $index . '_u';
* @param string $defaultSortOrder the sort order to use by default
*
* @return returns null if $url- (sort url) is not found
- * @access public
*/
public function initSortID($defaultSortOrder) {
$url = CRM_Utils_Array::value(self::SORT_ID, $_GET, $defaultSortOrder);
* @param string $defaultSortOrder the sort order to use by default
*
* @return void
- * @access public
*/
public function initialize($defaultSortOrder) {
$this->initSortID($defaultSortOrder);
* @param $b
*
* @return int (-1 or 1)
- * @access public
*/
public static function cmpFunc($a, $b) {
$cmp_order = array('weight', 'id', 'title', 'name');
*
* @return string An equivalent variable name
*
- * @access public
*
* @return string (or null)
* @static
* @param string $char the character to use for non-valid chars
* @param int $len length of valid variables
*
- * @access public
*
* @return string returns the manipulated string
* @static
* @param int $len length of valid variables
*
* @return string Randomized Variable Name
- * @access public
* @static
*/
public static function rename($name, $len = 4) {
* @param string $string the input string
* @param \char|string $char $char the character used to demarcate the componets
*
- * @access public
*
* @return string the last component
* @static
* @param mixed $name the string (or array of strings) to append
*
* @return void
- * @access public
* @static
*/
public static function append(&$str, $delim, $name) {
* @param boolean $utf8 attempt utf8 match on failure (default yes)
*
* @return boolean true if string is ascii
- * @access public
* @static
*/
public static function isAscii($str, $utf8 = TRUE) {
* @param array $regexRules regular expression to be matched w/ replacements
*
* @return array $match array of strings w/ corresponding redacted outputs
- * @access public
* @static
*/
public static function regex($str, $regexRules) {
* Determine if a string is composed only of utf8 characters
*
* @param string $str input string
- * @access public
* @static
*
* @return boolean
* @param string $url2 the second url to be matched against
*
* @return boolean true if the urls match, else false
- * @access public
* @static
*/
public static function match($url1, $url2) {
* @param mix $query this is basically url
*
* @return mix $v returns civicrm url (eg: civicrm/contact/search/...)
- * @access public
* @static
*/
public static function extractURLVarValue($query) {
* @param string $str the string to be translated
*
* @return boolean
- * @access public
* @static
*/
public static function strtobool($str) {
* @param string $str the string to be translated
*
* @return boolean
- * @access public
* @static
*/
public static function strtoboolstr($str) {
* @param string $html the string to be converted
*
* @return string the converted string
- * @access public
* @static
*/
public static function htmlToText($html) {
* @param string $string input string to be cleaned
*
* @return string the cleaned string
- * @access public
* @static
*/
public static function stripSpaces($string) {
* @param string $replace the character to replace it with
*
* @return string the sanitized string
- * @access public
* @static
*/
static function stripPathChars($string,
*
* @return string
* The URL fragment.
- * @access public
*/
public static function makeURL($urlVar, $includeReset = FALSE, $includeForce = TRUE, $path = NULL, $absolute = FALSE) {
if (empty($path)) {
* (optional)
*
* @return string
- * @access public
*/
public static function getLinksUrl($urlVar, $includeReset = FALSE, $includeForce = TRUE, $skipUFVar = TRUE) {
// Sort out query string to prevent messy urls
*
* @return string
*
- * @access public
*/
static function theme(
&$content,
* @param bool $forceBackend
* @return string
* An HTML string containing a link to the given path.
- * @access public
*/
static function url(
$path = NULL,
* What menu path are we currently on. Called for the primary tpl
*
* @return string the current menu path
- * @access public
*/
public static function currentPath() {
$config = CRM_Core_Config::singleton();
* List of parameters.
*
* @return string url
- * @access public
*/
public static function crmURL($params) {
$p = CRM_Utils_Array::value('p', $params);
* @param string $title
* @param string $pageTitle
*
- * @access public
*/
public static function setTitle($title, $pageTitle = NULL) {
self::$title = $title;
* @param string $default
* (optional) The default userContext if no match found.
*
- * @access public
*/
public static function setUserContext($names, $default = NULL) {
$url = $default;
* @return string
* The class name of the object.
*
- * @access public
*/
public static function getClassName($object) {
return get_class($object);
* @param string $url
* The URL to provide to the browser via the Location header.
*
- * @access public
*/
public static function redirect($url = NULL) {
if (!$url) {
* @param string $message
* (optional) The message to provide in the body of the redirect page.
*
- * @access public
*/
static function jsRedirect(
$url = NULL,
*
* @param $breadCrumbs
*
- * @access public
*/
public static function appendBreadCrumb($breadCrumbs) {
$config = CRM_Core_Config::singleton();
/**
* Reset an additional breadcrumb tag to the existing breadcrumb.
*
- * @access public
*/
public static function resetBreadCrumb() {
$config = CRM_Core_Config::singleton();
*
* @param string $bc
*
- * @access public
*/
public static function addHTMLHead($bc) {
$config = CRM_Core_Config::singleton();
*
* @return string
* The URL to post the form.
- * @access public
*/
public static function postURL($action) {
$config = CRM_Core_Config::singleton();
/**
* Rewrite various system URLs to https.
*
- * @access public
*/
public static function mapConfigToSSL() {
$config = CRM_Core_Config::singleton();
* Get the base URL of the system.
*
* @return string
- * @access public
*/
public static function baseURL() {
$config = CRM_Core_Config::singleton();
* @param $realPath
*
* @return false|array
- * @access public
*/
public static function authenticate($name, $password, $loadCMSBootstrap = FALSE, $realPath = NULL) {
$config = CRM_Core_Config::singleton();
* @param string $message
* The message to set.
*
- * @access public
*/
public static function setUFMessage($message) {
$config = CRM_Core_Config::singleton();
*
* @return string
* civicrm version
- * @access public
*/
public static function version() {
static $version;
*
* @return string
* The previous page URL
- * @access public
*/
public static function refererPath() {
return CRM_Utils_Array::value('HTTP_REFERER', $_SERVER);
*
* @return string
* Base URL of the CRM documentation.
- * @access public
*/
public static function getDocBaseURL() {
// FIXME: move this to configuration at some stage
* Returns wiki (alternate) documentation URL base.
*
* @return string documentation url
- * @access public
*/
public static function getWikiBaseURL() {
// FIXME: move this to configuration at some stage
*
* @return string
* URL or link to documentation page, based on provided parameters.
- * @access public
*/
public static function docURL2($page, $URLonly = FALSE, $text = NULL, $title = NULL, $style = NULL, $resource = NULL) {
// if ts function doesn't exist, it means that CiviCRM hasn't been fully initialised yet -
*
* @return string
* URL or link to documentation page, based on provided parameters.
- * @access public
*/
public static function docURL($params) {
* An array of files that exist in one or more of the directories that are
* referenced by the relative path when appended to each element of the PHP
* include path.
- * @access public
*/
public static function listIncludeFiles($relpath) {
$file_list = array();
* @return array
* List of plugins, where the plugin name is both the key and the value of
* each element.
- * @access public
*/
public static function getPluginList($relpath, $fext = '.php', $skipList = array()) {
$fext_len = strlen($fext);
* @param boolean $maintenance for maintenance mode
*
* @return void prints content on stdout
- * @access public
*/
public function theme(&$content, $print = FALSE, $maintenance = FALSE) {
$ret = FALSE;
*
* @param array $data array with user specific data
*
- * @access public
*/
public function setUserSession($data) {
list($userID, $ufID) = $data;
*
* @return uid if user exists, false otherwise
*
- * @access public
*
*/
public function createUser(&$params, $mail) {
* @paqram string $pageTitle
*
* @return void
- * @access public
*/
public function setTitle($title, $pageTitle = NULL) {
if (arg(0) == 'civicrm') {
* @internal param string $url
*
* @return void
- * @access public
*/
public function appendBreadCrumb($breadCrumbs) {
$breadCrumb = drupal_get_breadcrumb();
* Reset an additional breadcrumb tag to the existing breadcrumb
*
* @return void
- * @access public
*/
public function resetBreadCrumb() {
$bc = array();
* @param string $header the new string to be appended
*
* @return void
- * @access public
*/
public function addHTMLHead($header) {
static $count = 0;
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addScriptUrl($url, $region) {
$params = array('group' => JS_LIBRARY, 'weight' => 10);
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addScript($code, $region) {
$params = array('type' => 'inline', 'group' => JS_LIBRARY, 'weight' => 10);
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addStyleUrl($url, $region) {
if ($region != 'html-header') {
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addStyle($code, $region) {
if ($region != 'html-header') {
* @param null
*
* @return void
- * @access public
*/
public function mapConfigToSSL() {
global $base_url;
* @param mix $action the default action if one is pre-specified
*
* @return string the url to post the form
- * @access public
*/
public function postURL($action) {
if (!empty($action)) {
* @return mixed false if no auth
* array(
* contactID, ufID, unique string ) if success
- * @access public
*/
public static function authenticate($name, $password, $loadCMSBootstrap = FALSE, $realPath = NULL) {
require_once 'DB.php';
*
* @param string $message the message to set
*
- * @access public
*/
public function setMessage($message) {
drupal_set_message($message);
* @param boolean $maintenance for maintenance mode
*
* @return void prints content on stdout
- * @access public
*/
public function theme(&$content, $print = FALSE, $maintenance = FALSE) {
// TODO: Simplify; this was copied verbatim from CiviCRM 3.4's multi-UF theming function, but that's more complex than necessary
*
* @return uid if user exists, false otherwise
*
- * @access public
*/
public function createUser(&$params, $mail) {
$form_state = array();
* @paqram string $pageTitle
*
* @return void
- * @access public
*/
public function setTitle($title, $pageTitle = NULL) {
if (!$pageTitle) {
* @internal param string $url
*
* @return void
- * @access public
*/
public function appendBreadCrumb($breadCrumbs) {
$breadCrumb = drupal_get_breadcrumb();
* Reset an additional breadcrumb tag to the existing breadcrumb
*
* @return void
- * @access public
*/
public function resetBreadCrumb() {
$bc = array();
* @param string $head the new string to be appended
*
* @return void
- * @access public
*/
public function addHTMLHead($head) {
drupal_set_html_head($head);
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addScriptUrl($url, $region) {
// CRM-15450 - D6 doesn't order internal/external links correctly so we can't use drupal_add_js
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addScript($code, $region) {
// CRM-15450 - ensure scripts are in correct order
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addStyleUrl($url, $region) {
if ($region != 'html-header' || !$this->formatResourceUrl($url)) {
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addStyle($code, $region) {
return FALSE;
* @param null
*
* @return void
- * @access public
*/
public function mapConfigToSSL() {
global $base_url;
* @param mix $action the default action if one is pre-specified
*
* @return string the url to post the form
- * @access public
*/
public function postURL($action) {
if (!empty($action)) {
* @return mixed false if no auth
* array(
* contactID, ufID, unique string ) if success
- * @access public
*/
public function authenticate($name, $password, $loadCMSBootstrap = FALSE, $realPath = NULL) {
//@todo this 'PEAR-y' stuff is only required when bookstrap is not being loaded which is rare
*
* @param string $message the message to set
*
- * @access public
*/
public function setMessage($message) {
drupal_set_message($message);
*
* @return uid if user exists, false otherwise
*
- * @access public
*
*/
public function createUser(&$params, $mail) {
* @param string $pageTitle
*
* @return void
- * @access public
*/
public function setTitle($title, $pageTitle = NULL) {
if (!$pageTitle) {
* @internal param string $url
*
* @return void
- * @access public
*/
public function appendBreadCrumb($breadcrumbs) {
$civicrmPageState = \Drupal::service('civicrm.page_state');
* Reset an additional breadcrumb tag to the existing breadcrumb
*
* @return void
- * @access public
*/
public function resetBreadCrumb() {
\Drupal::service('civicrm.page_state')->resetBreadcrumbs();
* @param string $header the new string to be appended
*
* @return void
- * @access public
*/
public function addHTMLHead($header) {
\Drupal::service('civicrm.page_state')->addHtmlHeader($header);
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addScriptUrl($url, $region) {
$options = array('group' => JS_LIBRARY, 'weight' => 10);
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addScript($code, $region) {
$options = array('type' => 'inline', 'group' => JS_LIBRARY, 'weight' => 10);
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addStyleUrl($url, $region) {
if ($region != 'html-header') {
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addStyle($code, $region) {
if ($region != 'html-header') {
* @param null
*
* @return void
- * @access public
*/
public function mapConfigToSSL() {
}
* @return mixed false if no auth
* array(
* contactID, ufID, unique string ) if success
- * @access public
*
* This always bootstraps Drupal
*/
*
* @param string $message the message to set
*
- * @access public
*/
public function setMessage($message) {
drupal_set_message($message);
* @param $forceBackend boolean a gross joomla hack
*
* @return string an HTML string containing a link to the given path.
- * @access public
*
*/
function url($path = NULL, $query = NULL, $absolute = FALSE,
* @param mix $action the default action if one is pre-specified
*
* @return string the url to post the form
- * @access public
*/
public function postURL($action) {
if (!empty($action)) {
*
* @return uid if user exists, false otherwise
*
- * @access public
*/
public function createUser(&$params, $mail) {
$baseDir = JPATH_SITE;
* @param string $pageTitle
*
* @return void
- * @access public
*/
public function setTitle($title, $pageTitle = NULL) {
if (!$pageTitle) {
* @internal param string $url
*
* @return void
- * @access public
*/
public function appendBreadCrumb($breadCrumbs) {
$template = CRM_Core_Smarty::singleton();
* @internal param string $bc the new breadcrumb to be appended
*
* @return void
- * @access public
*/
public function resetBreadCrumb() {
return;
* @internal param string $head the new string to be appended
*
* @return void
- * @access public
*/
public static function addHTMLHead($string = NULL) {
if ($string) {
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addScriptUrl($url, $region) {
return FALSE;
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addScript($code, $region) {
return FALSE;
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addStyleUrl($url, $region) {
if ($region == 'html-header') {
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addStyle($code, $region) {
if ($region == 'html-header') {
* @param bool $forceBackend
*
* @return string an HTML string containing a link to the given path.
- * @access public
*/
function url($path = NULL, $query = NULL, $absolute = TRUE,
$fragment = NULL, $htmlize = TRUE,
* @param $action the default action if one is pre-specified
*
* @return string the url to post the form
- * @access public
*/
public function postURL($action) {
if (!empty($action)) {
* @param object $user handle to the user object
*
* @return void
- * @access public
*/
public function setEmail(&$user) {
global $database;
* @return mixed false if no auth
* array(
contactID, ufID, unique string ) if success
- * @access public
*/
public function authenticate($name, $password, $loadCMSBootstrap = FALSE) {
require_once 'DB.php';
*
* @param array $data array with user specific data
*
- * @access public
*/
public function setUserSession($data) {
list($userID, $ufID) = $data;
*
* @param string $message the message to set
*
- * @access public
*/
public function setMessage($message) {
return;
* @paqram string $pageTitle
*
* @return void
- * @access public
*/
public function setTitle($title, $pageTitle) {
return;
*
* @return boolean true if yes, else false
* @static
- * @access public
*/
public function checkPermission($str) {
return TRUE;
* @param string $url
*
* @return void
- * @access public
*/
public function appendBreadCrumb($title, $url) {
return;
* @param string $head the new string to be appended
*
* @return void
- * @access public
*/
public function addHTMLHead($head) {
return;
* @param $fragment string A fragment identifier (named anchor) to append to the link.
*
* @return string an HTML string containing a link to the given path.
- * @access public
*
*/
public function url($path = NULL, $query = NULL, $absolute = TRUE, $fragment = NULL) {
* @param the default action if one is pre-specified
*
* @return string the url to post the form
- * @access public
*/
public function postURL($action) {
return NULL;
* @param object $user handle to the user object
*
* @return void
- * @access public
*/
public function setEmail(&$user) {}
* @param string $pass Login password
*
* @return array Result array
- * @access public
*/
public function &authenticate($name, $pass) {
if (isset(self::$ufClass)) {
/**
* Swap the current UF for soap
*
- * @access public
*/
public function swapUF() {
$config = CRM_Core_Config::singleton();
* @paqram string $pageTitle
*
* @return void
- * @access public
*/
/**
* @param string $title
* @return mixed false if no auth
* array(
* contactID, ufID, unique string ) if success
- * @access public
*/
/**
* @param string $name
* @internal param string $url
*
* @return void
- * @access public
*/
/**
* @param $breadCrumbs
* @param string $header the new string to be appended
*
* @return void
- * @access public
*/
/**
* @param string $head
* @param mix $action the default action if one is pre-specified
*
* @return string the url to post the form
- * @access public
*/
/**
* @param mix $action
* @param $forceBackend boolean a gross joomla hack
*
* @return string an HTML string containing a link to the given path.
- * @access public
*
*/
/**
*
* @param string $message the message to set
*
- * @access public
*/
/**
* @param string $message
* @param null $pageTitle
*
* @return void
- * @access public
*/
public function setTitle($title, $pageTitle = NULL) {
if (!$pageTitle) {
* @internal param string $url
*
* @return void
- * @access public
* @static
*/
public function appendBreadCrumb($breadCrumbs) {
* Reset an additional breadcrumb tag to the existing breadcrumb
*
* @return void
- * @access public
* @static
*/
public function resetBreadCrumb() {
* @param string $head the new string to be appended
*
* @return void
- * @access public
* @static
*/
public function addHTMLHead($head) {
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addScriptUrl($url, $region) {
return FALSE;
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addScript($code, $region) {
return FALSE;
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addStyleUrl($url, $region) {
return FALSE;
* @see CRM_Core_Region::render()
*
* @return bool TRUE if we support this operation in this CMS, FALSE otherwise
- * @access public
*/
public function addStyle($code, $region) {
return FALSE;
* @param null
*
* @return void
- * @access public
* @static
*/
public function mapConfigToSSL() {
* @param mix $action the default action if one is pre-specified
*
* @return string the url to post the form
- * @access public
* @static
*/
public function postURL($action) {
* @param bool $forceBackend
*
* @return string an HTML string containing a link to the given path.
- * @access public
*/
function url(
$path = NULL,
* @return mixed false if no auth
* array(
* contactID, ufID, unique string ) if success
- * @access public
* @static
*/
public function authenticate($name, $password, $loadCMSBootstrap = FALSE, $realPath = NULL) {
*
* @param string $message the message to set
*
- * @access public
* @static
*/
public function setMessage($message) {
*
* @return true|array true if all required tokens are found,
* else an array of the missing tokens
- * @access public
* @static
*/
public static function requiredTokens(&$str) {
* @param string $str The string to search
*
* @return boolean Was there a match
- * @access public
* @static
*/
public static function token_match($type, $var, &$str) {
* @param bool $escapeSmarty
*
* @return string The processed string
- * @access public
* @static
*/
public static function &token_replace($type, $var, $value, &$str, $escapeSmarty = FALSE) {
* @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
* @static
*/
private static function tokenRegex($token_type) {
* @param string $string a string that needs to be escaped from smarty parsing
*
* @return string the escaped string
- * @access private
* @static
*/
private static function tokenEscapeSmarty($string) {
* @param bool $escapeSmarty
*
* @return string The processed string
- * @access public
* @static
*/
public static function &replaceDomainTokens(
* @param bool $escapeSmarty
*
* @return string The processed string
- * @access public
* @static
*/
public static function &replaceOrgTokens($str, &$org, $html = FALSE, $escapeSmarty = FALSE) {
* @param bool $escapeSmarty
*
* @return string The processed sstring
- * @access public
* @static
*/
public static function &replaceMailingTokens(
* @param bool $escapeSmarty
*
* @return string The processed string
- * @access public
* @static
*/
public static function &replaceActionTokens(
* @param bool $escapeSmarty
*
* @return string The processed string
- * @access public
* @static
*/
public static function &replaceContactTokens(
* @param bool $escapeSmarty
*
* @return string The processed string
- * @access public
* @static
*/
public static function &replaceHookTokens(
* @param string hash The security hash of the unsub event
*
* @return string The processed string
- * @access public
* @static
*/
public static function &replaceUnsubscribeTokens(
* @param string hash The security hash of the resub event
*
* @return string The processed string
- * @access public
* @static
*/
public static function &replaceResubscribeTokens($str, &$domain, &$groups, $html,
* @param boolean $html Replace tokens with html or plain text
*
* @return string The processed string
- * @access public
* @static
*/
public static function &replaceSubscribeTokens($str, $group, $url, $html) {
* @param string $str The string with tokens to be replaced
*
* @return string The processed string
- * @access public
* @static
*/
public static function &replaceSubscribeInviteTokens($str) {
* @param boolean $html Replace tokens with html or plain text
*
* @return string The processed string
- * @access public
* @static
*/
public static function &replaceWelcomeTokens($str, $group, $html) {
* @param string $str The string to search
*
* @return array Array of tokens that weren't replaced
- * @access public
* @static
*/
public static function &unmatchedTokens(&$str) {
* @param bool $returnEmptyToken
*
* @return string The processed string
- * @access public
* @static
*/
public static function &replaceComponentTokens(&$str, $contact, $components, $escapeSmarty = FALSE, $returnEmptyToken = TRUE) {
* @param int $jobID the mailing list jobID - this is a legacy param
*
* @return array
- * @access public
* @static
*/
static function getTokenDetails($contactIDs,
* @param string $className
*
* @return array
- * @access public
* @static
*/
static function getContributionTokenDetails($contributionIDs,
/**
* Replace greeting tokens exists in message/subject
*
- * @access public
*/
public static function replaceGreetingTokens(&$tokenString, $contactDetails = NULL, $contactId = NULL, $className = NULL, $escapeSmarty = FALSE) {
* @param bool $escapeSmarty
*
* @return string The processed string
- * @access public
* @static
*/
public static function &replaceUserTokens($str, $knownTokens = NULL, $escapeSmarty = FALSE) {
* @internal param string $rootNode
*
* @return CRM_Utils_Tree
- * @access public
*/
public function __construct($nodeName) {
// create the root node
* @return array(
ref) | false node if found else false
*
- * @access public
*/
//public function &findNode(&$parentNode, $name)
public function &findNode($name, &$parentNode) {
*
* @return boolean
*
- * @access public
*/
public function isLeafNode(&$node) {
return (count($node['children']) ? TRUE : FALSE);
*
* @return array (ref)
*
- * @access public
*/
public function &createNode($name) {
$node['name'] = $name;
*
* @return void
*
- * @access public
*/
public function addNode($parentName, &$node) {
$temp = '';
*
* @return void
*
- * @access public
*/
public function addData($parentName, $childName, $data) {
$temp = '';
*
* @return tree
*
- * @access public
*/
public function getTree() {
return $this->tree;
*
* @return void
*
- * @access public
*/
public function display() {
print_r($this->tree);
* @param boolean $abort Should we abort if invalid
*
* @return mixed The data, escaped if necessary
- * @access public
* @static
*/
public static function escape($data, $type, $abort = TRUE) {
* @name string $name The name of the attribute
*
* @return mixed The data, escaped if necessary
- * @access public
* @static
*/
public static function validate($data, $type, $abort = TRUE, $name = 'One of parameters ') {
* @param string $recipient The address of the recipient
*
* @return string The VERP encoded address
- * @access public
* @static
*/
public static function encode($sender, $recipient) {
* @param string $address The address to be decoded
*
* @return array The tuple ($sender, $recipient)
- * @access public
* @static
*/
public static function &verpdecode($address) {
/**
* Class constructor
*
- * @access private
*/
public function __construct() {
global $civicrm_root;
*
* The controller which will handle the display and processing of this page.
*
- * @access protected
*/
protected $_controller;
* @param boolean ignoreKey should we not set a qfKey for this controller (for standalone forms)
*
* @return void.
- * @access public
*/
public function run($formName, $formLabel = NULL, $arguments = NULL) {
if (is_array($arguments)) {
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
parent::setUp();
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
protected function tearDown() {}
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
parent::setUp();
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
protected function tearDown() {}
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
$this->_testObjects = array();
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
protected function tearDown() {
parent::tearDown();
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
parent::setUp();
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
protected function tearDown() {}
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
parent::setUp();
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
protected function tearDown() {
$this->quickCleanup(array('civicrm_mapping_field', 'civicrm_mapping', 'civicrm_group', 'civicrm_saved_search'));
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
public function tearDown() {
parent::tearDown();
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function _setUp() {
$this->_testObjects = array();
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
protected function _tearDown() {
parent::tearDown();
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
public function tearDown() {
$tablesToTruncate = array(
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
parent::setUp();
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
protected function tearDown() {}
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
parent::setUp();
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
protected function tearDown() {}
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
parent::setUp();
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
protected function tearDown() {}
}
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
parent::setUp();
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
protected function tearDown() {}
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
parent::setUp();
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
protected function tearDown() {}
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
parent::setUp();
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
protected function tearDown() {}
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
public function tearDown() {
$this->quickCleanup($this->tablesToTruncate, TRUE);
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
parent::setUp();
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
protected function tearDown() {
parent::tearDown();
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
public function tearDown() {
$tablesToTruncate = array(
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
parent::setUp();
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
parent::setUp();
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
$this->_apiversion = 3;
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*
- * @access protected
*/
protected function tearDown() {
// Truncate the tables
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
$this->_apiversion = 3;
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
parent::setUp();
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
- * @access protected
*/
protected function setUp() {
parent::setUp();