* @param bool $test
*/
public function updatePaymentProcessor(&$values, $domainID, $test) {
+ // @todo remove this function (some or all) in favour or CRM_Financial_BAO_PaymentProcessor::create.
$dao = new CRM_Financial_DAO_PaymentProcessor();
$dao->id = $test ? $this->_testID : $this->_id;
}
/**
- * Get a list of managed activity-types by searching CiviCase XML files
+ * Get a list of managed activity-types by searching CiviCase XML files.
+ *
+ * @param \CRM_Case_XMLRepository $xmlRepo
+ * @param \CRM_Core_ManagedEntities $me
*
* @return array
* @see CRM_Utils_Hook::managed
- * @throws CRM_Core_Exception
*/
public static function createManagedActivityTypes(CRM_Case_XMLRepository $xmlRepo, CRM_Core_ManagedEntities $me) {
$result = array();
* depends on the operator and who's calling the query builder.
* @param int $grouping
* the index where to place the where clause.
- * @param $selectValues
- * The key value pairs for this element. This allows us to use this function for things besides option-value pairs.
+ * @param string $daoName
+ * DAO Name.
* @param array $field
* an array that contains various properties of the field identified by $name.
* @param string $label
public function buildTaskList(CRM_Core_Form_Search $form);
/**
- * Builds the quickform for this search
+ * Builds the quickform for this search.
+ *
+ * @param CRM_Core_Form $form
*/
public function buildForm(&$form);
}
/**
- * Validate & convert settings input
+ * Validate & convert settings input.
*
- * @value mixed value of the setting to be set
- * @fieldSpec array Metadata for given field (drawn from the xml)
+ * @param mixed $value
+ * value of the setting to be set
+ * @param array $fieldSpec
+ * Metadata for given field (drawn from the xml)
+ *
+ * @return bool
+ * @throws \api_Exception
*/
public static function validateSetting(&$value, $fieldSpec) {
if ($fieldSpec['type'] == 'String' && is_array($value)) {
}
/**
- * Core function that builds the form. We redefine this function
- * here and expect all CRM forms to build their form in the function
+ * Core function that builds the form.
+ *
+ * We redefine this function here and expect all CRM forms to build their form in the function
* buildQuickForm.
*/
public function buildForm() {
}
/**
- * Add default Next / Back buttons
+ * Add default Next / Back buttons.
*
* @param array $params
* Array of associative arrays in the order in which the buttons should be
}
/**
- * Getter function for title. Should be over-ridden by derived class
+ * Getter function for title.
+ *
+ * Should be over-ridden by derived class.
*
* @return string
*/
}
/**
- * Getter function for renderer. If renderer is not set
- * create one and initialize it
+ * Getter function for renderer.
+ *
+ * If renderer is not set create one and initialize it.
*
* @return object
*/
}
/**
- * A wrapper for getTemplateFileName that includes calling the hook to
- * prevent us from having to copy & paste the logic of calling the hook
+ * A wrapper for getTemplateFileName.
+ *
+ * This includes calling the hook to prevent us from having to copy & paste the logic of calling the hook.
*/
public function getHookedTemplateFileName() {
$pageTemplateFile = $this->getTemplateFileName();
}
/**
- * Default extra tpl file basically just replaces .tpl with .extra.tpl
- * i.e. we dont override
+ * Default extra tpl file basically just replaces .tpl with .extra.tpl.
+ *
+ * i.e. we do not override.
*
* @return string
*/
/**
* Add a currency and money element to the form.
+ *
+ * @param string $name
+ * @param string $label
+ * @param bool $required
+ * @param null $attributes
+ * @param bool $addCurrency
+ * @param string $currencyName
+ * @param null $defaultCurrency
+ * @param bool $freezeCurrency
+ *
+ * @return \HTML_QuickForm_Element
*/
public function addMoney(
$name,
/**
* Helper function to verify that required fields have been filled.
+ *
* Typically called within the scope of a FormRule function
+ *
+ * @param array $fields
+ * @param array $values
+ * @param array $errors
*/
public static function validateMandatoryFields($fields, $values, &$errors) {
foreach ($fields as $name => $fld) {
return is_numeric($userID) ? $userID : NULL;
}
+ /**
+ * Get the contact id that the form is being submitted for.
+ *
+ * @return int|NULL
+ */
public function getContactID() {
return $this->setContactID();
}
/**
* Get a list of all known modules.
+ *
+ * @param bool $fresh
+ * Force new results?
+ *
+ * @return array
*/
public static function getAll($fresh = FALSE) {
static $result;
* list display, pagination, sorting and export in multiple formats (CSV is
* supported right now, XML support will be added as and when needed
*
- *
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
interface CRM_Core_Selector_API {
/**
+ * Get pager parameters.
+ *
* Based on the action, the GET variables and the session state
* it adds various key => value pairs to the params array including
*
* The action being performed.
* @param array $params
* The array that the pagerParams will be inserted into.
- *
- * @return void
*/
public function getPagerParams($action, &$params);
public function &getSortOrder($action);
/**
- * Returns the column headers as an array of tuples:
+ * Returns the column headers as an array of tuples.
+ *
* (name, sortName (key to the sort array))
*
* @param string $action
public function &getRows($action, $offset, $rowCount, $sort, $type = NULL);
/**
- * Return the template (.tpl) filename
+ * Return the template (.tpl) filename.
*
* @param string $action
* The action being performed.
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Event_BAO_Event extends CRM_Event_DAO_Event {
}
/**
- * Delete the location block associated with an event,
- * if not being used by any other event.
+ * Delete the location block associated with an event.
+ *
+ * Function checks that it is not being used by any other event.
*
- * @param $locBlockId
+ * @param int $locBlockId
* Location block id to be deleted.
* @param int $eventId
* Event with which loc block is associated.
}
/**
- * Get current/future Events
+ * Get current/future Events.
*
* @param int $all
* 0 returns current and future events.
/**
* Get events Summary.
*
- *
* @return array
* Array of event summary values
*/
}
/**
- * make a copy of a Event, including
- * all the fields in the event Wizard
+ * Make a copy of a Event.
+ *
+ * Include all the fields in the event Wizard.
*
* @param int $id
* The event id to copy.
}
/**
- * This is sometimes called in a loop (during event search)
- * hence we cache the values to prevent repeated calls to the db
+ * This is sometimes called in a loop (during event search).
+ *
+ * We cache the values to prevent repeated calls to the db.
*/
public static function isMonetary($id) {
static $isMonetary = array();
}
/**
- * This is sometimes called in a loop (during event search)
- * hence we cache the values to prevent repeated calls to the db
+ * This is sometimes called in a loop (during event search).
+ *
+ * We cache the values to prevent repeated calls to the db.
*/
public static function usesPriceSet($id) {
static $usesPriceSet = array();
}
/**
- * Process that send e-mails
+ * Send e-mails.
*
* @param int $contactID
- * @param $values
+ * @param array $values
* @param int $participantId
* @param bool $isTest
* @param bool $returnMessageText
- *
- * @return void
*/
public static function sendMail($contactID, &$values, $participantId, $isTest = FALSE, $returnMessageText = FALSE) {
* @param $isTest
* @param bool $isCustomProfile
* @param array $participantParams
- *
- * @return void
*/
public static function buildCustomDisplay(
$id,
* Formatted array of key value.
*
* @param array $profileFields
- *
- * @return void
*/
public static function displayProfile(&$params, $gid, &$groupTitle, &$values, &$profileFields = array()) {
if ($gid) {
*/
/**
- *
- *
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Event_BAO_Participant extends CRM_Event_DAO_Participant {
* (reference) the default values, some of which need to be resolved.
* @param bool $reverse
* True if we want to resolve the values in the reverse direction (value -> name).
- *
- * @return void
*/
public static function resolveDefaults(&$defaults, $reverse = FALSE) {
self::lookupValue($defaults, 'event', CRM_Event_PseudoConstant::event(), $reverse);
}
/**
- * convert associative array names to values
- * and vice-versa.
+ * Convert associative array names to values and vice-versa.
*
* This function is used by both the web form layer and the api. Note that
* the api needs the name => value conversion, also the view layer typically
}
/**
- * Delete the record that are associated with this participation.
+ * Delete the records that are associated with this participation.
*
* @param int $id
* Id of the participation to delete.
*
- * @return void
+ * @return \CRM_Event_DAO_Participant
*/
public static function deleteParticipant($id) {
CRM_Utils_Hook::pre('delete', 'Participant', $id, CRM_Core_DAO::$_nullArray);
* separated string before using fee_level in view mode.
*
* @param string $eventLevel
- * Event_leval string from db.
- *
- *
- * @return void
+ * Event_level string from db.
*/
public static function fixEventLevel(&$eventLevel) {
if ((substr($eventLevel, 0, 1) == CRM_Core_DAO::VALUE_SEPARATOR) &&
* @param int $statusId
* Status id for participant.
* @param bool $updateRegisterDate
- *
- * @return void
- *
*/
public static function updateStatus($participantIds, $statusId, $updateRegisterDate = FALSE) {
if (!is_array($participantIds) || empty($participantIds) || !$statusId) {
* Build select for CiviEvent.
*
* @param $query
- *
- * @return void
*/
public static function select(&$query) {
if (($query->_mode & CRM_Contact_BAO_Query::MODE_EVENT) ||
/**
* Class constructor.
+ *
+ * @param string $title
+ * @param bool|int $action
+ * @param bool $modal
*/
public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) {
* Set variables up before form is built.
*
* @param CRM_Core_Form $form
- *
- * @return void
*/
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
*
- *
* @param CRM_Core_Form $form
- *
- * @return void
*/
public static function setDefaultValues(&$form) {
$defaults = array();
* @param int $eventID
* @param bool $includeQtyZero
*
- * @return void
+ * @return array
*/
public static function setDefaultPriceSet($participantID, $eventID = NULL, $includeQtyZero = TRUE) {
$defaults = array();
* Build the form object.
*
* @param CRM_Core_Form $form
- *
- * @return void
*/
public static function buildQuickForm(&$form) {
if ($form->_eventId) {
*/
/**
- *
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class generates form components for processing Event
- *
+ * This class generates form components for processing Event.
*/
class CRM_Event_Form_ManageEvent extends CRM_Core_Form {
/**
- * The id of the event we are proceessing.
+ * The id of the event we are processing.
*
* @var int
*/
/**
* Set variables up before form is built.
- *
- * @return void
*/
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
- *
+ * Set default values for the form.
*
- * @return void
+ * For edit/view mode the default values are retrieved from the database.
*/
public function setDefaultValues() {
$defaults = array();
/**
* Build the form object.
- *
- * @return void
*/
public function buildQuickForm() {
$session = CRM_Core_Session::singleton();
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class generates form components for Conference Slots
- *
+ * This class generates form components for Conference Slots.
*/
class CRM_Event_Form_ManageEvent_Conference extends CRM_Event_Form_ManageEvent {
public $_action;
/**
- *
- * @return void
+ * Build quick form.
*/
public function buildQuickForm() {
$slots = CRM_Core_OptionGroup::values('conference_slot');
parent::buildQuickForm();
}
+ /**
+ * Post process form.
+ */
public function postProcess() {
$params = $this->exportValues();
}
/**
- * Return a descriptive name for the page, used in wizard header
+ * Return a descriptive name for the page, used in wizard header.
*
* @return string
*/
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class is to build the form for Deleting Group
+ * This class is to build the form for Deleting Group.
*/
class CRM_Event_Form_ManageEvent_Delete extends CRM_Event_Form_ManageEvent {
/**
* Set variables up before form is built.
- *
- * @return void
*/
public function preProcess() {
parent::preProcess();
/**
* Build the form object.
- *
- * @return void
*/
public function buildQuickForm() {
$this->assign('title', $this->_title);
/**
* Process the form when submitted.
- *
- * @return void
*/
public function postProcess() {
$participant = new CRM_Event_DAO_Participant();
*/
/**
- *
- *
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class generates form components for processing Event
- *
+ * This class generates form components for processing Event.
*/
class CRM_Event_Form_ManageEvent_EventInfo extends CRM_Event_Form_ManageEvent {
/**
* Set variables up before form is built.
- *
- * @return void
*/
public function preProcess() {
parent::preProcess();
}
/**
- * Set default values for the form. For edit/view mode
- * the default values are retrieved from the database
- *
+ * Set default values for the form.
*
- * @return void
+ * For edit/view mode he default values are retrieved from the database.
*/
public function setDefaultValues() {
$defaults = parent::setDefaultValues();
/**
* Build the form object.
- *
- * @return void
*/
public function buildQuickForm() {
//need to assign custom data type and subtype to the template
/**
* Process the form submission.
- *
- *
- * @return void
*/
public function postProcess() {
$params = $this->controller->exportValues($this->_name);
}
/**
- * Return a descriptive name for the page, used in wizard header
+ * Return a descriptive name for the page, used in wizard header.
*
* @return string
*/
}
/**
- * Retrieve event template custom data values.
- * and set as default values for current new event.
+ * Retrieve event template custom data values and set as default values for current new event.
*
* @param int $templateId
* Event template id.
*/
/**
- *
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class generates form components for Event Fees
- *
+ * This class generates form components for Event Fees.
*/
class CRM_Event_Form_ManageEvent_Fee extends CRM_Event_Form_ManageEvent {
/**
* Set variables up before form is built.
- *
- * @return void
*/
public function preProcess() {
parent::preProcess();
}
/**
- * Set default values for the form. For edit/view mode
- * the default values are retrieved from the database
- *
+ * Set default values for the form.
*
- * @return void
+ * For edit/view mode the default values are retrieved from the database.
*/
public function setDefaultValues() {
$parentDefaults = parent::setDefaultValues();
/**
* Build the form object.
- *
- * @return void
*/
public function buildQuickForm() {
/**
* Add local and global form rules.
- *
- *
- * @return void
*/
public function addRules() {
$this->addFormRule(array('CRM_Event_Form_ManageEvent_Fee', 'formRule'));
/**
* Process the form.
- *
- * @return void
*/
public function postProcess() {
$eventTitle = '';
/**
* Set variables up before form is built.
- *
- * @return void
*/
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
- *
+ * Set default values for the form.
*
- * @return void
+ * Note that in edit/view mode the default values are retrieved from the database.
*/
public function setDefaultValues() {
$defaults = $this->_values;
/**
* Add local and global form rules.
- *
- *
- * @return void
*/
public function addRules() {
$this->addFormRule(array('CRM_Event_Form_ManageEvent_Location', 'formRule'));
}
/**
- * function to build location block.
- *
- * @return void
+ * Function to build location block.
*/
public function buildQuickForm() {
//load form for child blocks
/**
* Process the form submission.
- *
- *
- * @return void
*/
public function postProcess() {
$params = $this->exportValues();
*/
/**
- *
- *
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class generates form components for processing Event
- *
+ * This class generates form components for processing Event.
*/
class CRM_Event_Form_ManageEvent_Registration extends CRM_Event_Form_ManageEvent {
/**
* Set variables up before form is built.
- *
- * @return void
*/
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
*
- *
- * @return void
+ * The default values are retrieved from the database.
*/
public function setDefaultValues() {
if ($this->_addProfileBottom || $this->_addProfileBottomAdd) {
*/
/**
- *
- *
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class generates form components for processing Event
- *
+ * This class generates form components for processing Event.
*/
class CRM_Event_Form_Registration extends CRM_Core_Form {
/**
* Assign the minimal set of variables to the template.
- *
- * @return void
*/
public function assignToTemplate() {
//process only primary participant params
* @param int $id
* @param string $name
* @param bool $viewOnly
- *
- * @return void
*/
public function buildCustom($id, $name, $viewOnly = FALSE) {
if ($id) {
}
/**
+ * Initiate event fee.
+ *
* @param CRM_Core_Form $form
* @param int $eventID
*
* @param int $contactID
* @param null $contribution
* @param null $payment
- *
- * @return void
*/
public function confirmPostProcess($contactID = NULL, $contribution = NULL, $payment = NULL) {
// add/update contact information
*
* @param CRM_Core_Form $form
* @param int $contactID
+ *
* @return \CRM_Event_BAO_Participant
*/
public static function addParticipant(&$form, $contactID) {
return $participant;
}
- /* Calculate the total participant count as per params.
- *
- * @param array $params
- * User params.
- *
- * @return $totalCount total participant count.
- */
/**
+ * Calculate the total participant count as per params.
+ *
* @param CRM_Core_Form $form
* @param array $params
+ * User params.
* @param bool $skipCurrent
*
- * @return int|string
+ * @return int
*/
public static function getParticipantCount(&$form, $params, $skipCurrent = FALSE) {
$totalCount = 0;
return $totalCount;
}
- /* Format user submitted price set params.
+ /**
+ * Format user submitted price set params.
+ *
* Convert price set each param as an array.
*
+ * @param CRM_Core_Form $form
* @param array $params
* An array of user submitted params.
*
- *
* @return array
- * , formatted price set params.
- */
- /**
- * @param CRM_Core_Form $form
- * @param array $params
- *
- * @return mixed
+ * Formatted price set params.
*/
public static function formatPriceSetParams(&$form, $params) {
if (!is_array($params) || empty($params)) {
return $params;
}
- /* Calculate total count for each price set options.
- * those are currently selected by user.
- *
- * @param $form
- * Form object.
+ /**
+ * Calculate total count for each price set options.
*
+ * - currently selected by user.
*
- * @return array
- * , array of each option w/ count total.
- */
- /**
- * @param $form
+ * @param CRM_Core_Form $form
+ * Form object.
*
* @return array
+ * array of each option w/ count total.
*/
public static function getPriceSetOptionCount(&$form) {
$params = $form->get('params');
}
/**
+ * Check if template file exists.
+ *
* @param string $suffix
*
* @return null|string
}
/**
+ * Get template file name.
+ *
* @return null|string
*/
public function getTemplateFileName() {
}
/**
+ * Override extra template name.
+ *
* @return null|string
*/
public function overrideExtraTemplateFileName() {
* Reset values for all options those are full.
*
* @param array $optionFullIds
- * @param $form
+ * @param CRM_Core_Form $form
*/
public static function resetElementValue($optionFullIds = array(), &$form) {
if (!is_array($optionFullIds) ||
}
/**
+ * Reset submitted value.
+ *
* @param string $elementName
* @param array $optionIds
* @param CRM_Core_form $form
}
/**
- * Validate price set submitted params for price option limit,
- * as well as user should select at least one price field option.
+ * Validate price set submitted params for price option limit.
+ *
+ * User should select at least one price field option.
*
* @param CRM_Core_Form $form
* @param array $params
}
/**
- * set the first participant ID if not set, CRM-10032
+ * Set the first participant ID if not set.
+ *
+ * CRM-10032.
*
* @param int $participantID
*/
}
/**
+ * Check if event is valid.
+ *
* @todo - combine this with CRM_Event_BAO_Event::validRegistrationRequest
* (probably extract relevant values here & call that with them & handle bounces & redirects here -as
* those belong in the form layer)
*/
/**
- *
- *
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class generates form components for processing Event
- *
+ * This class generates form components for processing Event.
*/
class CRM_Event_Form_Registration_Confirm extends CRM_Event_Form_Registration {
* Set variables up before form is built.
*/
public function preProcess() {
-
parent::preProcess();
// lineItem isn't set until Register postProcess
}
/**
- * Overwrite action, since we are only showing elements in frozen mode
- * no help display needed
+ * Overwrite action, since we are only showing elements in frozen mode no help display needed.
*
* @return int
*/
}
/**
- * @param $fields
- * @param $files
- * @param $self
+ * Apply form rule.
+ *
+ * @param array $fields
+ * @param array $files
+ * @param CRM_Core_Form $self
*
* @return array|bool
*/
$participantNum = NULL;
$participantNum = $participantID;
if ($participantID == $registerByID) {
- $participantNum = 0; // is primary particpant
+ // This is the is primary participant.
+ $participantNum = 0;
}
else {
if ($participantNum = array_search('participant', $copyParticipantCountLines)) {
*
* @param CRM_Core_Form $form
* @param array $params
- * @param $result
+ * @param array $result
* @param int $contactID
* @param bool $pending
* @param bool $isAdditionalAmount
*
- * @return void
+ * @return \CRM_Contribute_BAO_Contribution
*/
public static function processContribution(
&$form, $params, $result, $contactID,
* Fix the Location Fields.
*
* @param array $params
- * @param $fields
+ * @param array $fields
* @param CRM_Core_Form $form
- *
- * @return void
*/
public static function fixLocationFields(&$params, &$fields, &$form) {
if (!empty($form->_fields)) {
*
* @param int $contactID
* @param array $params
- * @param $fields
+ * @param array $fields
* @param CRM_Core_Form $form
*
- * @return void
+ * @return int
*/
public static function updateContactFields($contactID, $params, $fields, &$form) {
//add the contact to group, if add to group is selected for a
}
/**
- * @param $form
+ * Assign Profiles.
+ *
+ * @param CRM_Core_Form $form
*/
public static function assignProfiles(&$form) {
$participantParams = $form->_params;
*/
/**
- *
- *
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
*/
/**
- * This class generates form components for processing Event
+ * This class generates form components for processing Event.
*/
class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
protected $_waitlistMsg = NULL;
protected $_requireApprovalMsg = NULL;
+ /**
+ * Deprecated parameter that we hope to remove.
+ *
+ * @var bool
+ */
public $_quickConfig = NULL;
/**
- * Allow developer to use hook_civicrm_buildForm()
- * to override the registration dupe check
+ * Skip duplicate check.
+ *
+ * This can be set using hook_civicrm_buildForm() to override the registration dupe check.
* CRM-7604
*/
public $_skipDupeRegistrationCheck = FALSE;
public $_paymentProcessorID;
/**
+ * Show fee block or not.
+ *
* @var boolean determines if fee block should be shown or hidden
*/
public $_noFees;
/**
- * Array of payment related fields to potentially display on this form (generally credit card or debit card fields). This is rendered via billingBlock.tpl
+ * Array of payment related fields to potentially display on this form (generally credit card or debit card fields).
+ *
+ * This is rendered via billingBlock.tpl.
+ *
* @var array
*/
public $_paymentFields = array();
/**
* Build the form object.
+ *
+ * @return void
*/
public function buildQuickForm() {
// build profiles first so that we can determine address fields etc
/**
* Set variables up before form is built.
+ *
+ * @param CRM_Core_Form $form
*/
public function preProcess(&$form) {
}
/**
* Class constructor.
+ *
+ * @param string $title
+ * @param bool|int $action
+ * @param bool $modal
*/
public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) {
}
/**
- * @param $rows
+ * Initialise basic row.
+ *
+ * @param array $rows
+ *
+ * @param bool $entryFound
+ * @param array $row
+ * @param int $rowId
+ * @param int $rowNum
+ * @param array $types
*
* @return bool
*/
abstract public 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.
+ * Return message text.
+ *
+ * Child class could override this function to have better control over the message being sent.
+ *
+ * @param string $message
+ * @param int $contactID
+ * @param array $contactDetails
+ *
+ * @return string
*/
public function getMessage($message, $contactID, $contactDetails) {
$html = $message->getHTMLBody();
}
/**
- * @param $fields
- * @param $additionalDetails
+ * Get recipient details.
+ *
+ * @param array $fields
+ * @param array $additionalDetails
*
* @return mixed
*/
* @param int $id
* Uf group id.
*
- * @param $action
- *
- * @return void
+ * @param int $action
*/
public function preview($id, $action) {
$controller = new CRM_Core_Controller_Simple('CRM_UF_Form_Preview', ts('CiviCRM Profile Group Preview'), NULL);
* alterable.
* @param string $rev
* an intermediate version; note that setPostUpgradeMessage is called repeatedly with different $revs.
- * @return void
*/
public function setPostUpgradeMessage(&$postUpgradeMessage, $rev) {
}
* alterable.
* @param string $rev
* an intermediate version; note that setPostUpgradeMessage is called repeatedly with different $revs.
- * @return void
*/
public function setPostUpgradeMessage(&$postUpgradeMessage, $rev) {
if ($rev == '4.5.alpha1') {
* @param $preUpgradeMessage
* @param string $rev
* a version number, e.g. '4.4.alpha1', '4.4.beta3', '4.4.0'.
- * @param null $currentVer
- *
- * @return void
+ * @param string $currentVer
*/
public function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL) {
if ($rev == '4.4.beta1') {
* alterable.
* @param string $rev
* an intermediate version; note that setPostUpgradeMessage is called repeatedly with different $revs.
- * @return void
*/
public function setPostUpgradeMessage(&$postUpgradeMessage, $rev) {
if ($rev == '4.4.1') {
}
/**
- * @param $rev
- * @param $originalVer
- * @param $latestVer
+ * Upgrade script for 4.4.7.
*
- * @return void
+ * @param string $rev
+ * @param string $originalVer
+ * @param string $latestVer
*/
public function upgrade_4_4_7($rev, $originalVer, $latestVer) {
// For WordPress/Joomla(?), cleanup broken image_URL from 4.4.6 upgrades - https://issues.civicrm.org/jira/browse/CRM-14971
* alterable.
* @param string $rev
* an intermediate version; note that setPostUpgradeMessage is called repeatedly with different $revs.
- *
- * @return void
*/
public function setPostUpgradeMessage(&$postUpgradeMessage, $rev) {
if ($rev == '4.1.alpha1') {
* Note: This function is called iteratively for each upcoming
* revision to the database.
*
- * @param $preUpgradeMessage
+ * @param string $preUpgradeMessage
* @param string $rev
* a version number, e.g. '4.4.alpha1', '4.4.beta3', '4.4.0'.
* @param null $currentVer
- *
- * @return void
*/
public function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL) {
if ($rev == '4.7.alpha1') {
* alterable.
* @param string $rev
* an intermediate version; note that setPostUpgradeMessage is called repeatedly with different $revs.
- * @return void
*/
public function setPostUpgradeMessage(&$postUpgradeMessage, $rev) {
if ($rev == '4.7.alpha1') {
* alterable.
* @param string $rev
* an intermediate version; note that setPostUpgradeMessage is called repeatedly with different $revs.
- * @return void
*/
public function setPostUpgradeMessage(&$postUpgradeMessage, $rev) {
if ($rev == '4.6.alpha1') {
* Note: This function is called iteratively for each upcoming
* revision to the database.
*
- * @param $preUpgradeMessage
+ * @param string $preUpgradeMessage
* @param string $rev
* a version number, e.g. '4.3.alpha1', '4.3.beta3', '4.3.0'.
* @param null $currentVer
*
- * @return void|bool
+ * @return bool
*/
public function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL) {
if ($rev == '4.3.beta3') {
* Note: This function is called iteratively for each upcoming
* revision to the database.
*
- * @param $preUpgradeMessage
+ * @param string $preUpgradeMessage
* @param string $rev
* a version number, e.g. '4.2.alpha1', '4.2.beta3', '4.2.0'.
* @param null $currentVer
*
- * @return void
+ * @return bool
*/
public function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NULL) {
if ($rev == '4.2.alpha1') {
* alterable.
* @param string $rev
* an intermediate version; note that setPostUpgradeMessage is called repeatedly with different $revs.
- * @return void
*/
public function setPostUpgradeMessage(&$postUpgradeMessage, $rev) {
if ($rev == '4.2.beta5') {
* to the price set used for particular event
* @param array $values
* Reference to the values array(.
- * this is
- * lineItem array)
- *
- * @return void
+ * this is lineItem array)
*/
public static function format($fid, &$params, &$fields, &$values) {
if (empty($params["price_{$fid}"])) {
* Build the price set form.
*
* @param CRM_Core_Form $form
- *
- * @return void
*/
public static function buildPriceSet(&$form) {
$priceSetId = $form->get('priceSetId');
*
* @param array $values
* (reference) the array up for enhancing.
- * @return void
*/
public static function addDisplayEnums(&$values) {
$enumFields = &Snapshot_v4p2_Price_DAO_Field::getEnums();
}
/**
- * returns the list of fields that can be imported.
+ * Returns the list of fields that can be imported.
+ *
+ * @param bool $prefix
*
* @return array
*/
}
/**
- * Check whether a TCP service is available on $host and $port
+ * Check whether a TCP service is available on $host and $port.
+ *
+ * @param string $host
+ * @param string $port
+ * @param string $serverConnectionTimeOut
+ *
+ * @return bool
*/
public static function checkService($host, $port, $serverConnectionTimeOut) {
$old_error_reporting = error_reporting();
* The API responsible for executing the request.
* @param array $apiRequest
* The full description of the API request.
+ * @param \Civi\API\Kernel $apiKernel
*/
public function __construct($apiProvider, $apiRequest, $apiKernel) {
$this->apiKernel = $apiKernel;
}
/**
+ * Get api kernel.
+ *
* @return \Civi\API\Kernel
*/
public function getApiKernel() {
* Get count of contact references.
*
* @param array $params
+ * @param array $apiRequest
*/
function _civicrm_api3_generic_getrefcount_spec(&$params, $apiRequest) {
$params['id']['api.required'] = 1;
* @param string $entity
* @param array $request
* @param array $apiDefaults
+ * @param array $fields
*/
function _civicrm_api3_generic_getList_defaults($entity, &$request, $apiDefaults, $fields) {
$config = CRM_Core_Config::singleton();
}
/**
+ * Try redirect.
*
+ * @param string $input_url
+ * @param string $expected_url
*/
private function tryRedirect($input_url, $expected_url) {
// file_put_contents('php://stderr', $input_url . "\n", FILE_APPEND);