*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping {
* @param int $blockCount
* (no of blocks shown).
* @param NULL $exportMode
- *
- * @return void
*/
public static function buildMappingForm(&$form, $mappingType = 'Export', $mappingId = NULL, $columnNo, $blockCount = 3, $exportMode = NULL) {
if ($mappingType == 'Export') {
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
require_once 'Mail/mime.php';
/**
- * Class CRM_Core_BAO_MessageTemplate
+ * Class CRM_Core_BAO_MessageTemplate.
*/
class CRM_Core_BAO_MessageTemplate extends CRM_Core_DAO_MessageTemplate {
* Delete the Message Templates.
*
* @param int $messageTemplatesID
- * @return void
*/
public static function del($messageTemplatesID) {
// make sure messageTemplatesID is an integer
}
/**
- * Revert a message template to its default subject+text+HTML state
+ * Revert a message template to its default subject+text+HTML state.
*
* @param int $id id of the template
- *
- * @return void
*/
public static function revert($id) {
$diverted = new CRM_Core_BAO_MessageTemplate();
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * BAO object for crm_note table
+ * BAO object for crm_note table.
*/
class CRM_Core_BAO_Note extends CRM_Core_DAO_Note {
const MAX_NOTES = 3;
/**
- * Given a note id, retrieve the note text
+ * Given a note id, retrieve the note text.
*
* @param int $id
* Id of the note to retrieve.
*
* @param int $id
* ID of the contact for which note needs to be deleted.
- *
- * @return void
- *
*/
public static function deleteContact($id) {
// need to delete for both entity_id
*
* @param int $contactID
* Contact id whose notes to be deleted.
- *
- * @return void
*/
public static function cleanContactNotes($contactID) {
$params = array(1 => array($contactID, 'Integer'));
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Core_BAO_OptionValue extends CRM_Core_DAO_OptionValue {
}
/**
- * Create option value - note that the create function calls 'add' but
- * has more business logic
+ * Create option value.
+ *
+ * Note that the create function calls 'add' but has more business logic.
*
* @param array $params
* Input parameters.
* @param int $opGroupId
* @param array $opWeights
* Options value , weight pair.
- *
- * @return void
*/
public static function updateOptionWeights($opGroupId, $opWeights) {
if (!is_array($opWeights) || empty($opWeights)) {
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class contains functions for managing Paper Sizes
+ * This class contains functions for managing Paper Sizes.
*/
class CRM_Core_BAO_PaperSize extends CRM_Core_DAO_OptionValue {
* @param array (reference) $values associative array of name/value pairs
* @param int $id
* Id of the database record (null = new record).
- *
- * @return void
*/
public function savePaperSize(&$values, $id) {
// get the Option Group ID for Paper Sizes (create one if it doesn't exist)
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class contains functions for managing PDF Page Formats
+ * This class contains functions for managing PDF Page Formats.
*/
class CRM_Core_BAO_PdfFormat extends CRM_Core_DAO_OptionValue {
* @param array (reference) $list List of PDF Page Formats
* @param string $returnURL
* URL of page calling this function.
- *
- * @return void
*/
public static function addOrder(&$list, $returnURL) {
$filter = "option_group_id = " . self::_getGid();
/**
* Save the PDF Page Format in the DB.
*
- * @param array (reference) $values associative array of name/value pairs
+ * @param array $values associative array of name/value pairs
* @param int $id
* Id of the database record (null = new record).
- *
- * @return void
*/
public function savePdfFormat(&$values, $id = NULL) {
// get the Option Group ID for PDF Page Formats (create one if it doesn't exist)
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * Class contains functions for phone
+ * Class contains functions for phone.
*/
class CRM_Core_BAO_Phone extends CRM_Core_DAO_Phone {
*
* @param $optionId
* Value of option to be deleted.
- *
- * @return void
*/
public static function setOptionToNull($optionId) {
if (!$optionId) {
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Core_BAO_PreferencesDate extends CRM_Core_DAO_PreferencesDate {
* Id of the database record.
* @param bool $is_active
* Value we want to set the is_active field.
- *
- * @return void
- * DAO object on success, null otherwise
- *
*/
public static function setIsActive($id, $is_active) {
CRM_Core_Error::fatal();
* Delete preference dates.
*
* @param int $id
- *
*/
public static function del($id) {
CRM_Core_Error::fatal();
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
require_once 'packages/When/When.php';
/**
- * Class CRM_Core_BAO_RecurringEntity
+ * Class CRM_Core_BAO_RecurringEntity.
*/
class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
* This function updates the mode column in the civicrm_recurring_entity table.
*
* @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 .
- *
- *
- * @return void
+ * 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.
*/
public function mode($mode) {
if ($this->entity_id && $this->entity_table) {
}
/**
- * This function acts as a listener to dao->update whenever there is an update,
- * and propagates any changes to all related entities present in recurring entity table
+ * This function acts as a listener to dao->update whenever there is an update.
*
- * @param object $event
- * An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just updated .
+ * It propagates any changes to all related entities present in recurring entity table
*
- *
- * @return void
+ * @param object $event
+ * An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just updated.
*/
static public function triggerUpdate($event) {
// if DB version is earlier than 4.6 skip any processing
static $processedEntities = array();
$obj =& $event->object;
if (empty($obj->id) || empty($obj->__table)) {
- return FALSE;
+ return;
}
$key = "{$obj->__table}_{$obj->id}";
if (array_key_exists($key, $processedEntities)) {
// already processed
- return NULL;
+ return;
}
// get related entities
$repeatingEntities = self::getEntitiesFor($obj->id, $obj->__table, FALSE, NULL);
if (empty($repeatingEntities)) {
// return if its not a recurring entity parent
- return NULL;
+ return;
}
// mark being processed
$processedEntities[$key] = 1;
* and creates entries for linked entities in recurring entity table
*
* @param object $event
- * An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just inserted .
- *
- *
- * @return void
+ * An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just inserted.
*/
static public function triggerInsert($event) {
$obj =& $event->object;
if (!array_key_exists($obj->__table, self::$_linkedEntitiesInfo)) {
- return FALSE;
+ return;
}
// if DB version is earlier than 4.6 skip any processing
static $processedEntities = array();
if (empty($obj->id) || empty($obj->__table)) {
- return FALSE;
+ return;
}
$key = "{$obj->__table}_{$obj->id}";
if (array_key_exists($key, $processedEntities)) {
// already being processed. Exit recursive calls.
- return NULL;
+ return;
}
if (self::getStatus() == self::RUNNING) {
// if recursion->generate() is doing some work, lets not intercept
- return NULL;
+ return;
}
// mark being processed
foreach ($pRepeatingEntities as $key => $val) {
if (array_key_exists($key, $processedEntities)) {
// this graph is already being processed
- return NULL;
+ return;
}
$processedEntities[$key] = 1;
}
* This function acts as a listener to dao->delete, and deletes an entry from recurring_entity table
*
* @param object $event
- * An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just deleted .
- *
- *
- * @return void
+ * An object of /Civi/Core/DAO/Event/PostUpdate containing dao object that was just deleted.
*/
static public function triggerDelete($event) {
$obj =& $event->object;
static $processedEntities = array();
if (empty($obj->id) || empty($obj->__table) || !$event->result) {
- return FALSE;
+ return;
}
$key = "{$obj->__table}_{$obj->id}";
if (array_key_exists($key, $processedEntities)) {
// already processed
- return NULL;
+ return;
}
// mark being processed
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
*
* The group column is used for grouping together all settings that logically belong to the same set.
* Thus all settings in the same group are retrieved with one DB call and then cached for future needs.
- *
*/
class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
* An optional ID to assign the creator to. If not set, retrieved from session.
*
* @param int $domainID
- *
- * @return void
*/
public static function setItem(
$value,
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class contains function for UFField
- *
+ * This class contains function for UFField.
*/
class CRM_Core_BAO_UFField extends CRM_Core_DAO_UFField {
* Custom field id.
* @param bool $is_active
* Set the is_active field.
- *
- * @return void
*/
public static function setUFField($customFieldId, $is_active) {
//find the profile id given custom field
* From which we need to copy.
* @param bool $new_id
* In which to copy.
- *
- * @return void
*/
public static function copy($old_id, $new_id) {
$ufField = new CRM_Core_DAO_UFField();
*
* @param int $customFieldId
* ID of the custom field to be deleted.
- *
- * @return void
- *
*/
public static function delUFField($customFieldId) {
//find the profile id given custom field id
* Custom group id.
* @param bool $is_active
* Value we want to set the is_active field.
- *
- * @return void
*/
public static function setUFFieldStatus($customGroupId, $is_active) {
//find the profile id given custom group id
* Reset In selector and is searchable values for given $profileID.
*
* @param int $profileID
- *
- * @return void
*/
public function resetInSelectorANDSearchable($profileID) {
if (!$profileID) {
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- *
+ * UF group BAO class.
*/
class CRM_Core_BAO_UFGroup extends CRM_Core_DAO_UFGroup {
const PUBLIC_VISIBILITY = 1,
* @param bool $absolute
* Return urls in absolute form (useful when sending an email).
* @param null $additionalWhereClause
- *
- * @return void
*/
public static function getValues(
$cid, &$fields, &$values,
* (reference) an assoc array of name/value pairs.
* @param int $ufGroupId
* Ufgroup id.
- *
- * @return void
*/
public static function createUFJoin(&$params, $ufGroupId) {
$groupTypes = CRM_Utils_Array::value('uf_group_type', $params);
*
* @param array $params
* (reference) an assoc array of name/value pairs.
- *
- * @return void
*/
public static function delUFJoin(&$params) {
$ufJoin = new CRM_Core_DAO_UFJoin();
* @param int $id
* The profile id to copy.
*
- * @return void
+ * @return \CRM_Core_DAO
*/
public static function copy($id) {
$fieldsFix = array('prefix' => array('title' => ts('Copy of ')));
* Contact id.
* @param array $values
* Associative array of name/value pair.
- *
- * @return void
*/
public static function commonSendMail($contactID, &$values) {
if (!$contactID || !$values) {
* Group id.
* @param array $values
* @param CRM_Core_Smarty $template
- *
- * @return void
*/
public function profileDisplay($gid, $values, $template) {
$groupTitle = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', $gid, 'title');
* An array of default values.
*
* @param bool $isStandalone
- *
- * @return void
*/
public static function setComponentDefaults(&$fields, $componentId, $component, &$defaults, $isStandalone = FALSE) {
if (!$componentId ||
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * The basic class that interfaces with the external user framework
+ * The basic class that interfaces with the external user framework.
*/
class CRM_Core_BAO_UFMatch extends CRM_Core_DAO_UFMatch {
*
* @param $ctype
* @param bool $isLogin
- *
- * @return void
*/
public static function synchronize(&$user, $update, $uf, $ctype, $isLogin = FALSE) {
$userSystem = CRM_Core_Config::singleton()->userSystem;
*
* @param int $contactId
* Id of the contact to update.
- *
- * @return void
*/
public static function updateUFName($contactId) {
if (!$contactId) {
*
* @param int $contactId
* Contact ID of the user.
- * @param $emailAddress
+ * @param string $emailAddress
* Email to be modified for the user.
- *
- * @return void
*/
public static function updateContactEmail($contactId, $emailAddress) {
$strtolower = function_exists('mb_strtolower') ? 'mb_strtolower' : 'strtolower';
*
* @param int $ufID
* Id of the user to delete.
- *
- * @return void
*/
public static function deleteUser($ufID) {
$ufmatch = new CRM_Core_DAO_UFMatch();
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class contain function for Website handling
+ * This class contain function for Website handling.
*/
class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
* @param int $contactID
* Contact id.
*
- * @param $skipDelete
+ * @param bool $skipDelete
*
- * @return void
+ * @return bool
*/
public static function create(&$params, $contactID, $skipDelete) {
if (empty($params)) {
* @param array $ids
* Website ids.
*
- * @return void
+ * @return bool
*/
public static function del($ids) {
$query = 'DELETE FROM civicrm_website WHERE id IN ( ' . implode(',', $ids) . ')';
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * defines a simple implemenation of a drupal block.
- * blocks definitions and html are in a smarty template file
+ * Defines a simple implementation of a drupal block.
*
+ * Blocks definitions and html are in a smarty template file.
*/
class CRM_Core_Block {
/**
* Initialises the $_properties array
- *
- * @return void
*/
public static function initProperties() {
if (!defined('BLOCK_CACHE_GLOBAL')) {
* The desired property.
* @param string $value
* The value of the desired property.
- *
- * @return void
*/
public static function setProperty($id, $property, $value) {
if (!(self::$_properties)) {
}
/**
- * Returns the whole $_properties array
+ * Returns the whole $_properties array.
*
* @return array
* the $_properties array
* hence this hack
*
* @param int $id
- *
- * @return void
*/
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
*/
private static function setTemplateShortcutValues() {
$config = CRM_Core_Config::singleton();
/**
* Create the list of dashboard links.
- *
- * @return void
*/
private static function setTemplateDashboardValues() {
static $dashboardLinks = array();
/**
* Create the list of mail urls for the application and format is as a block.
- *
- * @return void
*/
private static function setTemplateMailValues() {
static $shortCuts = NULL;
/**
* Create the list of shortcuts for the application and format is as a block.
- *
- * @return void
*/
private static function setTemplateMenuValues() {
$config = CRM_Core_Config::singleton();
/**
* Create the event blocks for upcoming events.
- *
- * @return void
*/
private static function setTemplateEventValues() {
$config = CRM_Core_Config::singleton();
/**
* Config handles all the run time configuration changes that the system needs to deal with.
+ *
* Typically we'll have different values for a user's sandbox, a qa sandbox and a production area.
* The default values in general, should reflect production values (minimizes chances of screwing up)
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
require_once 'Log.php';
/**
* Initialize the config variables.
- *
- * @return void
*/
private function _initVariables() {
// retrieve serialised settings
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
require_once 'HTML/QuickForm/Controller.php';
}
/**
- * Helper function to add all the needed default actions. Note that the framework
- * redefines all of the default QFC actions
+ * Helper function to add all the needed default actions.
+ *
+ * Note that the framework redefines all of the default QFC actions.
*
* @param string $uploadDirectory to store all the uploaded files
* @param array $uploadNames for the various upload buttons (note u can have more than 1 upload)
- *
- *
- * @return void
*/
public function addActions($uploadDirectory = NULL, $uploadNames = NULL) {
$names = array(
* @param CRM_Core_StateMachine $stateMachine
* @param \const|int $action the mode in which the state machine is operating
* typically this will be add/view/edit
- *
- * @return void
*/
public function addPages(&$stateMachine, $action = CRM_Core_Action::NONE) {
$pages = $stateMachine->getPages();
/**
* Destroy all the session state of the controller.
- *
- *
- * @return void
*/
public function reset() {
$this->container(TRUE);
/**
* Virtual function to do any processing of data.
+ *
* Sometimes it is useful for the controller to actually process data.
* This is typically used when we need the controller to figure out
* what pages are potentially involved in this wizard. (this is dynamic
* and can change based on the arguments
- *
- * @return void
*/
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.
- *
- *
- * @return void
*/
public function set($name, $value = NULL) {
self::$_session->set($name, $value, $this->_scope);
* @param string $name
* name of the variable.
*
- *
* @return mixed
*/
public function get($name) {
*
* @param string $var
* @param mixed $value
- * Value of varaible.
- *
- * @return void
+ * Value of variable.
*/
public function assign($var, $value = NULL) {
self::$_template->assign($var, $value);
*
* @param string $var
* @param mixed $value
- * (reference) value of varaible.
- *
- * @return void
+ * (reference) value of variable.
*/
public function assign_by_ref($var, &$value) {
self::$_template->assign_by_ref($var, $value);
* Setter for embedded.
*
* @param bool $embedded
- *
- * @return void
*/
public function setEmbedded($embedded) {
$this->_embedded = $embedded;
* Setter for skipRedirection.
*
* @param bool $skipRedirection
- *
- * @return void
*/
public function setSkipRedirection($skipRedirection) {
$this->_skipRedirection = $skipRedirection;
* Setter for print.
*
* @param bool $print
- *
- * @return void
*/
public function setPrint($print) {
if ($print == "xls") {
}
/**
- * Write a simple fatal error message. Other controllers can decide to do something else
- * and present the user a better message and/or redirect to the same page with a reset url
+ * Write a simple fatal error message.
*
- * @return void
+ * Other controllers can decide to do something else and present the user a better message
+ * and/or redirect to the same page with a reset url
*/
public function invalidKey() {
self::invalidKeyCommon();
/**
* Instead of outputting a fatal error message, we'll just redirect
* to the entryURL if present
- *
- * @return void
*/
public function invalidKeyRedirect() {
if ($this->_entryURL && $url_parts = parse_url($this->_entryURL)) {
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
require_once 'PEAR.php';
*
* @param string $dsn
* The database connection string.
- *
- * @return void
*/
public static function init($dsn) {
$options = &PEAR::getStaticProperty('DB_DataObject', 'options');
}
/**
- * Reset the DAO object. DAO is kinda crappy in that there is an unwritten
- * rule of one query per DAO. We attempt to get around this crappy restricrion
- * by resetting some of DAO's internal fields. Use this with caution
+ * Reset the DAO object.
*
- * @return void
+ * DAO is kinda crappy in that there is an unwritten rule of one query per DAO.
+ *
+ * We attempt to get around this crappy restriction by resetting some of DAO's internal fields. Use this with caution
*/
public function reset() {
*
* @param object $factory
* The factory application object.
- *
- * @return void
*/
public static function setFactory(&$factory) {
self::$_factory = &$factory;
* Factory method to instantiate a new object from a table name.
*
* @param string $table
- *
- * @return void
*/
public function factory($table = '') {
if (!isset(self::$_factory)) {
/**
* Initialization for all DAO objects. Since we access DB_DO programatically
* we need to set the links manually.
- *
- * @return void
*/
public function initialize() {
$this->_connect();
* The object that we are extracting data from.
* @param array $values
* (reference ) associative array of name/value pairs.
- *
- * @return void
*/
public static function storeValues(&$object, &$values) {
$fields = &$object->fields();
* Name of the dao object.
* @param int $contactId
* Id of the contact to delete.
- *
- * @return void
*/
public static function deleteEntityContact($daoName, $contactId) {
$object = new $daoName();
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
require_once 'PEAR/ErrorStack.php';
*/
class CRM_Exception extends PEAR_Exception {
/**
- * Redefine the exception so message isn't optional
+ * Redefine the exception so message isn't optional.
+ *
* Supported signatures:
* - PEAR_Exception(string $message);
* - PEAR_Exception(string $message, int $code);
* which currently use PEAR::raiseError to notify of error messages.
*
* @param object $pearError PEAR_Error
- *
- * @return void
*/
public static function handle($pearError) {
* The email address to notify of this situation.
*
* @throws Exception
- *
- * @return void
*/
public static function fatal($message = NULL, $code = NULL, $email = NULL) {
$vars = array(
* something that follows a cleaner separation of concerns.
*
* @param Exception $exception
- *
- * @return void
*/
public static function handleUnhandledException($exception) {
try {
*
* @param null $redirect
* @param string $title
- * @return void
*/
public static function statusBounce($status, $redirect = NULL, $title = NULL) {
$session = CRM_Core_Session::singleton();
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
require_once 'HTML/QuickForm/Page.php';
/**
* Register all the standard rules that most forms potentially use.
- *
- * @return void
*/
public function registerRules() {
static $rules = array(
* called before buildForm. Any pre-processing that
* needs to be done for buildForm should be done here
*
- * This is a virtual function and should be redefined if needed
- *
- *
- * @return void
+ * This is a virtual function and should be redefined if needed.
*/
public function preProcess() {
}
/**
- * called after the form is validated. Any
- * processing of form state etc should be done in this function.
+ * Called after the form is validated.
+ *
+ * Any processing of form state etc should be done in this function.
* Typically all processing associated with a form should be done
* here and relevant state should be stored in the session
*
* This is a virtual function and should be redefined if needed
- *
- *
- * @return void
*/
public function postProcess() {
}
}
/**
- * This virtual function is used to build the form. It replaces the
- * buildForm associated with QuickForm_Page. This allows us to put
- * preProcess in front of the actual form building routine
- *
+ * This virtual function is used to build the form.
*
- * @return void
+ * It replaces the buildForm associated with QuickForm_Page. This allows us to put
+ * preProcess in front of the actual form building routine
*/
public function buildQuickForm() {
}
/**
- * This virtual function is used to set the default values of
- * various form elements
- *
- * access public
+ * This virtual function is used to set the default values of various form elements.
*
* @return array|NULL
* reference to the array of default values
}
/**
- * This is a virtual function that adds group and global rules to
- * the form. Keeping it distinct from the form to keep code small
- * and localized in the form building code
+ * This is a virtual function that adds group and global rules to the form.
*
- *
- * @return void
+ * Keeping it distinct from the form to keep code small
+ * and localized in the form building code
*/
public function addRules() {
}
* displayed. The associate array has 3 fields: 'type', 'name' and 'isDefault'
* The base form class will define a bunch of static arrays for commonly used
* formats.
- *
- * @return void
*/
public function addButtons($params) {
$prevnext = $spacing = array();
* Setter function for options.
*
* @param mixed $options
- *
- * @return void
*/
public function setOptions($options) {
$this->_options = $options;
* Setter function for Form Action.
*
* @param string $action
- *
- * @return void
*/
public function setFormAction($action) {
$this->_attributes['action'] = $action;
* Error Code.
* @param CRM_Core_DAO $dao
* A data access object on which we perform a rollback if non - empty.
- *
- * @return void
*/
public function error($message, $code = NULL, $dao = NULL) {
if ($dao) {
* Name of the variable.
* @param mixed $value
* Value of the variable.
- *
- * @return void
*/
public function set($name, $value) {
$this->controller->set($name, $value);
*
* @param int $action
* The mode we want to set the form.
- *
- * @return void
*/
public function setAction($action) {
$this->_action = $action;
* Name of variable.
* @param mixed $value
* Value of variable.
- *
- * @return void
*/
public function assign($var, $value = NULL) {
self::$_template->assign($var, $value);
* @param string $var
* Name of variable.
* @param mixed $value
- * Value of varaible.
- *
- * @return void
+ * Value of variable.
*/
public function assign_by_ref($var, &$value) {
self::$_template->assign_by_ref($var, $value);
* Button type for the form after processing.
* @param string $backType
* @param bool|string $submitOnce If true, add javascript to next button submit which prevents it from being clicked more than once
- *
- * @return void
*/
public function addDefaultButtons($title, $nextType = 'next', $backType = 'back', $submitOnce = FALSE) {
$buttons = array();
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Core_Form_Date {
const DATE_yyyy_mm_dd = 1, DATE_mm_dd_yy = 2, DATE_mm_dd_yyyy = 4, DATE_Month_dd_yyyy = 8, DATE_dd_mon_yy = 16, DATE_dd_mm_yyyy = 32;
/**
- * build the date-format form
+ * Build the date-format form.
*
* @param CRM_Core_Form $form
* The form object that we are operating on.
- *
*/
public static function buildAllowedDateFormats(&$form) {
/**
- * retrieve the date range - relative or absolute
- * and assign it to the form
+ * Retrieve the date range - relative or absolute and assign it to the form.
*
* @param CRM_Core_Form $form
* The form the dates should be added to.
* Additional value pairs to add.
* @param string $dateFormat
* @param bool|string $displayTime
- *
*/
public static function buildDateRange(
&$form, $fieldName, $count = 1,
}
/**
- * build the date range array that will provide the form option values.
- * It can be - relative or absolute
+ * Build the date range array that will provide the form option values.
+ *
+ * It can be - relative or absolute.
*
* @param CRM_Core_Form $form
* The form object that we are operating on.
* Additional Operator Selections to add.
* @param string $dateFormat
* @param bool $displayTime
+ *
* @return array
* Values for Selector
*/
}
/**
- * build the date range - relative or absolute
+ * Build the date range - relative or absolute.
*
* @param CRM_Core_Form $form
* The form object that we are operating on.
* Array of option values to add.
* @param string $from
* Label.
- * @param string|\stringe $to
+ * @param string $to
* @param string $fromLabel
* @param bool $required
* @param string $dateFormat
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class generates form components for processing Entity
- *
+ * This class generates form components for processing Entity.
*/
class CRM_Core_Form_RecurringEntity {
/**
/**
* Process the form submission.
- *
- *
- * @return void
*/
public static function postProcess($params = array(), $type, $linkedEntities = array()) {
//Check entity_id not present in params take it from class variable
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * Builds a form of shortcodes that can be added to WP posts
- * Use hook_civicrm_preProcess to modify this list
+ * Builds a form of shortcodes that can be added to WP posts.
+ *
+ * Use hook_civicrm_preProcess to modify this list.
*/
class CRM_Core_Form_ShortCode extends CRM_Core_Form {
/**
/**
- * Build form data. Can be modified via hook_civicrm_preProcess
- *
- * @return void
+ * Build form data. Can be modified via hook_civicrm_preProcess.
*/
public function preProcess() {
$config = CRM_Core_Config::singleton();
}
/**
- * Build form elements based on the above metadata
- *
- * @return void
+ * Build form elements based on the above metadata.
*/
public function buildQuickForm() {
CRM_Core_Resources::singleton()
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * This class generates form element for free tag widget
- *
+ * This class generates form element for free tag widget.
*/
class CRM_Core_Form_Tag {
public $_entityTagValues;
* True if need to add entry in entry table via ajax.
* @param string $tagsetElementName
* If you need to create tagsetlist with specific name.
- *
- * @return void
*/
public static function buildQuickForm(
&$form, $parentNames, $entityTable, $entityId = NULL, $skipTagCreate = FALSE,
* Entity table.
* @param CRM_Core_Form $form
* Form object.
- *
- * @return void
*/
public static function postProcess(&$params, $entityId, $entityTable = 'civicrm_contact', &$form) {
if ($form && !empty($form->_entityTagValues)) {
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Core_I18n {
* the array for localization (in place).
* @param array $params
* an array of additional parameters.
- *
- * @return void
*/
public function localizeArray(
&$array,
*
* @param array $array
* the array for localization (in place).
- *
- * @return void
*/
public function localizeTitles(&$array) {
foreach ($array as $key => $value) {
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Core_JobManager {
/**
* Class constructor.
- *
- * @return void
*/
public function __construct() {
$config = CRM_Core_Config::singleton();
/**
* @param string $message
- *
- * @return void
- * collection of permissions, null if none
*/
public function logEntry($message) {
$domainID = CRM_Core_Config::domainID();
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
+ * Joomla class.
+ *
+ * (clearly copied & pasted from a drupal class).
*
+ * Still used?
*/
class CRM_Core_Joomla {
/**
- * Reuse drupal blocks into a left sidebar. Assign the generated template
- * to the smarty instance
+ * Reuse drupal blocks into a left sidebar.
*
- * @return void
+ * Assign the generated template to the smarty instance.
*/
public static function sidebarLeft() {
$config = CRM_Core_Config::singleton();
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Core_OptionGroup {
static $_values = array();
*
*
* @param bool $flip
- *
- * @return void
- *
*/
public static function lookupValues(&$params, &$names, $flip = FALSE) {
foreach ($names as $postName => $value) {
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Core_OptionValue {
* Build select query in case of option-values
*
* @param $query
- *
- * @return void
*/
public static function select(&$query) {
if (!empty($query->_params) || !empty($query->_returnProperties)) {
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
}
/**
- * This function takes care of all the things common to all
- * pages. This typically involves assigning the appropriate smarty
- * variable :)
+ * This function takes care of all the things common to all pages.
*
- * @return void|string
- * The content generated by running this page
+ * This typically involves assigning the appropriate smarty variables :)
*/
public function run() {
if ($this->_embedded) {
* @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.
- *
- *
- * @return void
*/
public function set($name, $value = NULL) {
self::$_session->set($name, $value, $this->_name);
*
* @param string $var
* @param mixed $value
- * Value of varaible.
- *
- * @return void
+ * Value of variable.
*/
public function assign($var, $value = NULL) {
self::$_template->assign($var, $value);
*
* @param string $var
* @param mixed $value
- * (reference) value of varaible.
- *
- * @return void
+ * (reference) value of variable.
*/
public function assign_by_ref($var, &$value) {
self::$_template->assign_by_ref($var, $value);
/**
* Destroy all the session state of this page.
- *
- *
- * @return void
*/
public function reset() {
self::$_session->resetScope($this->_name);
* Setter for embedded.
*
* @param bool $embedded
- *
- * @return void
*/
public function setEmbedded($embedded) {
$this->_embedded = $embedded;
* Setter for print.
*
* @param bool $print
- *
- * @return void
*/
public function setPrint($print) {
$this->_print = $print;
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Core_Page_RecurringEntityPreview extends CRM_Core_Page {
/**
* Run the basic page (run essentially starts execution for that page).
- *
- * @return void
*/
public function run() {
$parentEventId = $startDate = $endDate = NULL;
*
* @param CRM_Core_Form $form
* @param CRM_Core_Payment $processor
- *
- * @return void
*/
static protected function setBillingAddressFields(&$form, $processor) {
$billingID = $form->_bltID;
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
require_once 'Google/library/googlecart.php';
require_once 'Google/library/googlerequest.php';
/**
- * Class CRM_Core_Payment_Google
+ * Class CRM_Core_Payment_Google.
+ *
+ * Possibly not functional.
*/
class CRM_Core_Payment_Google extends CRM_Core_Payment {
}
}
- /**
- * This function collects all the information from a web/api form and invokes
- * the relevant payment processor specific functions to perform the transaction
- *
- * @param array $params
- * Assoc array of input parameters for this transaction.
- *
- * @return void
- * the result in an nice formatted array (or an error object)
- * @abstract
- */
- public function doDirectPayment(&$params) {
- CRM_Core_Error::fatal(ts('This function is not implemented'));
- }
-
/**
* Sets appropriate parameters for checking out to google.
*
* @param array $params
- * Name value pair of contribution datat.
- *
- * @param $component
+ * Name value pair of contribution data.
*
- * @return void
+ * @param string $component
*/
public function doTransferCheckout(&$params, $component) {
$component = strtolower($component);
* @param string $component
* Event/contribution.
* @param object $cart
- * Object of googel cart.
- *
- * @return void
+ * Object of google cart.
*/
public function submitPostParams($params, $component, $cart) {
$url = rtrim($this->_paymentProcessor['url_site'], '/') . '/cws/v2/Merchant/' . $this->_paymentProcessor['user_name'] . '/checkout';
* Name value pair of contribution data.
*
* @param $component
- *
- * @return void
*/
public function doTransferCheckout(&$params, $component) {
$component = strtolower($component);
* @param $amount
* @param $transactionReference
*
- * @internal param \xml $dataRoot response send by google in xml format
- * @return void
+ * @return bool
*/
public function newOrderNotify($success, $privateData, $component, $amount, $transactionReference) {
$ids = $input = $params = array();
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Core_PseudoConstant {
* @param string $condition
* The condition that gets passed to the final query as the WHERE clause.
*
- * @param null $orderby
+ * @param bool $orderby
* @param string $key
- * @param null $force
+ * @param bool $force
*
- * @return void
+ * @return array
*/
public static function populate(
&$var,
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Core_QuickForm_Action_Reload extends CRM_Core_QuickForm_Action {
* @param string $actionName
* Current action name, as one Action object can serve multiple actions.
*
- * @return void
+ * @return object|void
*/
public function perform(&$page, $actionName) {
// save the form values and validation status to the session
+--------------------------------------------------------------------+
*/
-
-require_once "PEAR.php";
-
/**
- * Class CRM_Core_Session
+ * Class CRM_Core_Session.
*/
class CRM_Core_Session {
}
/**
- * Creates an array in the session. All variables now will be stored
- * under this array
+ * Creates an array in the session.
+ *
+ * All variables now will be stored under this array.
*
* @param bool $isRead
* Is this a read operation, in this case, the session will not be touched.
- *
- *
- * @return void
*/
public function initialize($isRead = FALSE) {
// lets initialize the _session variable just before we need it
) {
$this->_session[$this->_key] = array();
}
- return NULL;
}
/**
* Resets the session store.
*
- *
* @param int $all
- *
- * @return void
*/
public function reset($all = 1) {
if ($all != 1) {
$this->_session = array();
}
- return NULL;
}
/**
* Local scope name.
* @param bool $isRead
* Is this a read operation, in this case, the session will not be touched.
- *
- *
- * @return void
*/
public function createScope($prefix, $isRead = FALSE) {
$this->initialize($isRead);
*
* @param string $prefix
* Local scope name.
- *
- * @return void
*/
public function resetScope($prefix) {
$this->initialize();
* Value of the variable.
* @param string $prefix
* A string to prefix the keys in the session with.
- *
- * @return void
*/
public function set($name, $value = NULL, $prefix = NULL) {
// create session scope
}
/**
- * Gets all the variables in the current session scope
- * and stuffs them in an associate array
- *
+ * Gets all the variables in the current session scope and stuffs them in an associate array.
*
* @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.
- *
- * @return void
*/
public function getVars(&$vars, $prefix = '') {
// create session scope
}
/**
- * Set and check a timer. If it's expired, it will be set again.
+ * Set and check a timer.
+ *
+ * If it's expired, it will be set again.
+ *
* Good for showing a message to the user every hour or day (so not bugging them on every page)
* 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
* The url to return to when done.
* @param bool $check
* Should we do a dupe checking with the top element.
- *
- * @return void
*/
public function pushUserContext($userContext, $check = TRUE) {
if (empty($userContext)) {
*
* @param string $userContext
* The url to return to when done.
- *
- * @return void
*/
public function replaceUserContext($userContext) {
if (empty($userContext)) {
/**
* Dumps the session to the log.
+ *
* @param int $all
*/
public function debug($all = 1) {
}
/**
- * Stores an alert to be displayed to the user via crm-messages
+ * Stores an alert to be displayed to the user via crm-messages.
*
* @param string $text
* The status message
* set to 0 for no expiration
* defaults to 10 seconds for most messages, 5 if it has a title but no body,
* or 0 for errors or messages containing links
- *
- *
- * @return void
*/
public static function setStatus($text, $title = '', $type = 'alert', $options = array()) {
// make sure session is initialized, CRM-8120
}
/**
+ * Register and retrieve session objects.
+ *
* @param string|array $names
*/
public static function registerAndRetrieveSessionObjects($names) {
}
/**
+ * Store session objects.
+ *
* @param bool $reset
*/
public static function storeSessionObjects($reset = TRUE) {
/**
* Retrieve contact id of the logged in user.
+ *
* @return int|NULL
* contact ID of logged in user
*/
}
/**
+ * Check if session is empty.
+ *
+ * if so we don't cache stuff that we can get away with, helps proxies like varnish.
+ *
* @return bool
*/
public function isEmpty() {
- // check if session is empty, if so we don't cache
- // stuff that we can get away with
- // helps proxies like varnish
return empty($_SESSION);
}
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Core_ShowHideBlocks {
/**
* Load icon vars used in hide and show links.
- *
- * @return void
*/
public static function setIcons() {
if (!isset(self::$_showIcon)) {
/**
* Add the values from this class to the template.
- *
- * @return void
*/
public function addToTemplate() {
$hide = $show = '';
*
* @param string $name
* Id to be added.
- *
- * @return void
*/
public function addShow($name) {
$this->_show[$name] = 1;
*
* @param string $name
* Id to be added.
- *
- * @return void
*/
public function addHide($name) {
$this->_hide[$name] = 1;
*
* @param bool $assign
*
- *
- * @return void
+ * @return array
*/
public static function links(&$form, $prefix, $showLinkText, $hideLinkText, $assign = TRUE) {
$showCode = "cj('#id_{$prefix}').show(); cj('#id_{$prefix}_show').hide();";
* The set the class.
* @param string $hideLink
* The hide block string.
- *
- * @return void
*/
public function linksForArray(&$form, $index, $maxIndex, $prefix, $showLinkText, $hideLinkText, $elementType = NULL, $hideLink = NULL) {
$showHidePrefix = str_replace(array("]", "["), array("", "_"), $prefix);
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Core_State {
}
/**
- * Mark this page as valid for the QFC framework. This is needed as
- * we build more advanced functionality into the StateMachine
- *
- * @return void
+ * Mark this page as valid for the QFC framework.
*/
public function validate(&$data) {
$data['valid'][$this->_name] = TRUE;
}
/**
- * Mark this page as invalid for the QFC framework. This is needed as
- * we build more advanced functionality into the StateMachine
- *
- * @return void
+ * Mark this page as invalid for the QFC framework.
*/
public function invalidate(&$data) {
$data['valid'][$this->_name] = NULL;
/**
* Setter for name.
- *
- * @return void
*/
public function setName($name) {
$this->_name = $name;
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**
- * Core StateMachine. All statemachines subclass for the core one
- * for functionality specific to their needs.
+ * Core StateMachine.
*
- * A statemachine keeps track of different states and forms for a
- * html quickform controller.
+ * All state machines subclass for the core one for functionality specific to their needs.
*
+ * A state machine keeps track of different states and forms for a
+ * html quickform controller.
*/
class CRM_Core_StateMachine {
* Setter for name.
*
* @param string $name
- *
- * @return void
*/
public function setName($name) {
$this->_name = $name;
* @param string $type
* The type of transition being requested (Next or Back).
*
- * @return void
+ * @return object
*/
public function perform(&$page, $actionName, $type = 'Next') {
// save the form values and validation status to the session
* The previous page if any.
* @param object $next
* The next page if any.
- *
- * @return void
*/
public function addState($name, $type, $prev, $next) {
$this->_states[$name] = new CRM_Core_State($name, $type, $prev, $next, $this);
/**
* Reset the state machine.
- *
- * @return void
*/
public function reset() {
$this->_controller->reset();
*
* @param string $content
* The content generated by this state machine.
- *
- * @return void
*/
public function setContent(&$content) {
$this->_controller->setContent($content);
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
/**