interface CRM_Contact_Form_Search_Interface {
/**
- * The constructor gets the submitted form values
+ * The constructor gets the submitted form values.
*
- * @param $formValues
+ * @param array $formValues
*/
public function __construct(&$formValues);
/**
- * Builds the quickform for this search
+ * Builds the quickform for this search.
+ *
+ * @param CRM_Core_Form $form
+ * @return
*/
public function buildForm(&$form);
*/
/**
- * Count of records that match the current input parameters
- * Used by pager
+ * Count of records that match the current input parameters.
+ *
+ * Used by pager.
*/
public function count();
/**
- * Summary information for the query that can be displayed in the template
+ * Summary information for the query that can be displayed in the template.
+ *
* This is useful to pass total / sub total information if needed
*/
public function summary();
/**
- * List of contact ids that match the current input parameters
+ * List of contact ids that match the current input parameters.
+ *
* Used by different tasks. Will be also used to optimize the
* 'all' query below to avoid excessive LEFT JOIN blowup
+ *
+ * @param int $offset
+ * @param int $rowcount
+ * @param null $sort
+ *
+ * @return
*/
public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL);
/**
- * Retrieve all the values that match the current input parameters
+ * Retrieve all the values that match the current input parameters.
+ *
* Used by the selector
+ *
+ * @param int $offset
+ * @param int $rowcount
+ * @param null $sort
+ * @param bool $includeContactIDs
+ * @param bool $justIDs
+ *
+ * @return
*/
public function all($offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE);
*/
/**
- * The from clause for the query
+ * The from clause for the query.
*/
public function from();
/**
- * The where clause for the query
+ * The where clause for the query.
+ *
+ * @param bool $includeContactIDs
+ *
+ * @return
*/
public function where($includeContactIDs = FALSE);
/**
- * The template FileName to use to display the results
+ * The template FileName to use to display the results.
*/
public function templateFile();
/**
- * Returns an array of column headers and field names and sort options
+ * Returns an array of column headers and field names and sort options.
*/
public function &columns();
/**
* Returns all contribution related object ids.
+ *
+ * @param $contributionId
+ *
+ * @return array
*/
public static function getComponentDetails($contributionId) {
$componentDetails = $pledgePayment = array();
return CRM_Utils_Array::value('financial_account_id', $result);
}
+ /**
+ * Check tax amount.
+ *
+ * @param array $params
+ * @param bool $isLineItem
+ *
+ * @return mixed
+ */
public static function checkTaxAmount($params, $isLineItem = FALSE) {
$taxRates = CRM_Core_PseudoConstant::getTaxRates();
- // Update contribution
+ // Update contribution.
if (!empty($params['id'])) {
$id = $params['id'];
$values = $ids = array();
/**
* @param array $paymentParams
- *
+ * @param $message
*/
public function cleanupDBAfterPaymentFailure($paymentParams, $message) {
//make sure to cleanup db for recurring case.
/**
* Class constructor
+ *
+ * @param object $controller
+ * @param \const|int $action
*/
public function __construct($controller, $action = CRM_Core_Action::NONE) {
parent::__construct($controller, $action);
* @param array $params
* To create trxn entries.
*
+ * @return bool
*/
public static function recordFees($params) {
$expenseTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('account_relationship', NULL, " AND v.name LIKE 'Expense Account is' "));
* @param int $rgid
* @param int $gid
* @param NULL $cacheKeyString
+ *
+ * @return bool
*/
public static function refillCache($rgid = NULL, $gid = NULL, $cacheKeyString = NULL) {
if (!$cacheKeyString && $rgid) {
require_once "$civicrm_base_path/vendor/autoload.php";
}
+ /**
+ * Initialize HTML purifier class.
+ *
+ * @param string $prepend
+ */
public function initHtmlPurifier($prepend) {
if (class_exists('HTMLPurifier_Bootstrap')) {
// HTMLPurifier is already initialized, e.g. by the Drupal module.
$this->smarty = NULL;
}
+ /**
+ * Get templates_c directory.
+ *
+ * @return string
+ */
public function getCompileDir() {
if ($this->compileDir === NULL) {
$this->compileDir = CRM_Core_CodeGen_Util_File::createTempDir('templates_c_');
return $this->compileDir;
}
+ /**
+ * Get smarty instance.
+ *
+ * @return \Smarty
+ */
public function getSmarty() {
if ($this->smarty === NULL) {
require_once 'Smarty/Smarty.class.php';
/**
* @param $config
* @param bool $oldMode
+ *
+ * @return null
*/
public static function addConfig(&$config, $oldMode = FALSE) {
$info = self::_info();
return $newObject;
}
+ /**
+ * Cascade update through related entities.
+ *
+ * @param string $daoName
+ * @param $fromId
+ * @param $toId
+ * @param array $newData
+ *
+ * @return null
+ */
public static function cascadeUpdate($daoName, $fromId, $toId, $newData = array()) {
$object = new $daoName();
$object->id = $fromId;
* that small pieces of duplication are not being refactored into separate functions because their only shared parent
* is this form. Inserting a class FrontEndForm.php between the contribution & event & this class would allow functions like this
* and a dozen other small ones to be refactored into a shared parent with the reduction of much code duplication
+ *
+ * @param $onlinePaymentProcessorEnabled
*/
public function addCIDZeroOptions($onlinePaymentProcessorEnabled) {
$this->assign('nocid', TRUE);
*/
public static $_hasParent = FALSE;
+ /**
+ * @param $entityTable
+ */
public static function preProcess($entityTable) {
self::$_entityId = (int) CRM_Utils_Request::retrieve('id', 'Positive');
self::$_entityTable = $entityTable;
/**
* Based on php-gettext, since native gettext does not support this as is.
+ *
+ * @param $context
+ * @param $text
+ *
+ * @return string
*/
public function pgettext($context, $text) {
$key = $context . chr(4) . $text;
*/
protected $isActive;
+ /**
+ * Class constructor.
+ *
+ * @param $isActive
+ * @param $indices
+ */
public function __construct($isActive, $indices) {
$this->isActive = $isActive;
$this->indices = $this->normalizeIndices($indices);
}
+ /**
+ * Fix schema differences.
+ *
+ * Limitation: This won't pick up stale indices on tables which are not
+ * declared in $this->indices. That's not much of an issue for now b/c
+ * we have a static list of tables.
+ */
public function fixSchemaDifferences() {
- // Limitation: This won't pick up stale indices on tables which are not
- // declared in $this->indices. That's not much of an issue for now b/c
- // we have a static list of tables.
+ //
foreach ($this->indices as $tableName => $ign) {
$todoSqls = $this->reconcileIndexSqls($tableName);
foreach ($todoSqls as $todoSql) {
* @param boolen $fetchFromXML
* Fetch the menu items from xml and not from cache.
*
+ * @return array
*/
public static function &items($fetchFromXML = FALSE) {
return self::xmlItems($fetchFromXML);
/**
* @param $input
* @param $ids
+ *
+ * @return bool
*/
public function getInput(&$input, &$ids) {
$input['amount'] = $this->retrieve('x_amount', 'String');
* @param $ids
* @param $objects
* @param $first
+ *
+ * @return bool
*/
public function recur(&$input, &$ids, &$objects, $first) {
if (!isset($input['txnType'])) {
* @param $objects
* @param bool $recur
* @param bool $first
+ *
+ * @return bool
*/
public function single(
&$input, &$ids, &$objects,
/**
* @param $input
* @param $ids
+ *
+ * @return bool
*/
public function getInput(&$input, &$ids) {
if (!$this->getBillingID($ids)) {
* @param $objects
* @param bool $recur
* @param bool $first
+ *
+ * @return bool
*/
public function single(&$input, &$ids, &$objects, $recur = FALSE, $first = FALSE) {
$contribution = &$objects['contribution'];
*
* @param array $params
* Assoc array of input parameters for this transaction.
+ *
+ * @return array|void
*/
public function doDirectPayment(&$params) {
CRM_Core_Error::fatal(ts('This function is not implemented'));
*/
class CRM_Core_QuickForm_GroupMultiSelect extends CRM_Core_QuickForm_NestedAdvMultiSelect {
/**
- * Returns the HTML generated for the advanced mutliple select component
+ * Returns the HTML generated for the advanced multiple select component
*
* @return string
* @since version 0.4.0 (2005-06-25)
*/
class CRM_Custom_Import_Controller extends CRM_Core_Controller {
/**
- * Class constructor
+ * Class constructor.
+ *
+ * @param string $title
+ * @param bool|int $action
+ * @param bool $modal
*/
public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) {
parent::__construct($title, $modal);
protected $_params = array();
/**
- * Class constructor
+ * Class constructor.
+ *
+ * @param array $mapperKeys
+ * @param null $mapperLocType
+ * @param null $mapperPhoneType
*/
public function __construct(&$mapperKeys, $mapperLocType = NULL, $mapperPhoneType = NULL) {
parent::__construct();
/**
* @param bool $useWhere
+ *
+ * @return mixed|void
*/
public function delete($useWhere = FALSE) {
$this->load_associations();
class CRM_Event_Controller_Registration extends CRM_Core_Controller {
/**
- * Class constructor
+ * Class constructor.
+ *
+ * @param null $title
+ * @param bool|int $action
+ * @param bool $modal
*/
public function __construct($title = NULL, $action = CRM_Core_Action::NONE, $modal = TRUE) {
parent::__construct($title, $modal);
/**
* This function checks if there was any registraion for related event ids,
* and returns array of ids with no regsitrations
+ *
* @param string or int or object... $eventID
+ *
+ * @return array
*/
public static function checkRegistrationForEvents($eventID) {
$eventIdsWithNoRegistration = array();