if (!in_array($context, array(
'home',
'dashlet',
- 'dashletFullscreen'
+ 'dashletFullscreen',
))
) {
$url = CRM_Utils_System::url('civicrm/contact/view', "reset=1&cid={$cid}&selectedChild=activity");
* @param array $values
* The array of values belonging to this line.
*
- * @return boolean
+ * @return bool
*/
public function mapField(&$values) {
return CRM_Import_Parser::VALID;
* @param array $values
* The array of values belonging to this line.
*
- * @return boolean
+ * @return bool
* the result of this processing
*/
public function preview(&$values) {
* @param array $values
* The array of values belonging to this line.
*
- * @return boolean
+ * @return bool
* the result of this processing
*/
public function summary(&$values) {
* @param array $values
* The array of values belonging to this line.
*
- * @return boolean
+ * @return bool
* the result of this processing
*/
public function import($onDuplicate, &$values) {
$data = $formattedRow['values'];
if ($formattedRow['barcode']['type'] == 'barcode') {
- $data['current_value'] =
- $formattedRow['values']['contact_id'] . '-' . $formattedRow['values']['participant_id'];
+ $data['current_value'] = $formattedRow['values']['contact_id'] . '-' . $formattedRow['values']['participant_id'];
}
else {
// view participant url
);
$sEcho = CRM_Utils_Type::escape($_REQUEST['sEcho'], 'Integer');
- $offset =
- isset($_REQUEST['iDisplayStart']) ? CRM_Utils_Type::escape($_REQUEST['iDisplayStart'], 'Integer') : 0;
- $rowCount =
- isset($_REQUEST['iDisplayLength']) ? CRM_Utils_Type::escape($_REQUEST['iDisplayLength'], 'Integer') : 25;
- $sort =
- isset($_REQUEST['iSortCol_0']) ? CRM_Utils_Array::value(CRM_Utils_Type::escape($_REQUEST['iSortCol_0'], 'Integer'), $sortMapper) : NULL;
- $sortOrder =
- isset($_REQUEST['sSortDir_0']) ? CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'String') : 'asc';
- $context =
- isset($_REQUEST['context']) ? CRM_Utils_Type::escape($_REQUEST['context'], 'String') : NULL;
+ $offset = isset($_REQUEST['iDisplayStart']) ? CRM_Utils_Type::escape($_REQUEST['iDisplayStart'], 'Integer') : 0;
+ $rowCount = isset($_REQUEST['iDisplayLength']) ? CRM_Utils_Type::escape($_REQUEST['iDisplayLength'], 'Integer') : 25;
+ $sort = isset($_REQUEST['iSortCol_0']) ? CRM_Utils_Array::value(CRM_Utils_Type::escape($_REQUEST['iSortCol_0'], 'Integer'), $sortMapper) : NULL;
+ $sortOrder = isset($_REQUEST['sSortDir_0']) ? CRM_Utils_Type::escape($_REQUEST['sSortDir_0'], 'String') : 'asc';
+ $context = isset($_REQUEST['context']) ? CRM_Utils_Type::escape($_REQUEST['context'], 'String') : NULL;
$params = $_REQUEST;
if ($sort && $sortOrder) {
*
* @return array|null
*/
- static function defaultReturnProperties(
+ public static function defaultReturnProperties(
$mode,
$includeCustomFields = TRUE
) {
while ($dao->fetch()) {
foreach (array(
'ward',
- 'precinct'
+ 'precinct',
) as $name) {
if (stripos($name, $dao->label) !== FALSE) {
$fieldId = $dao->id;
/**
* Build the campaign clause for component serach.
*
- **/
+ */
public static function componentSearchClause(&$params, &$query) {
$op = CRM_Utils_Array::value('op', $params, '=');
$campaign = CRM_Utils_Array::value('campaign', $params);
if (is_array($campaign)) {
foreach (array(
'current_campaign',
- 'past_campaign'
+ 'past_campaign',
) as $ignore) {
$index = array_search($ignore, $campaign);
if ($index !== FALSE) {
*
* @param int $caseID
*
- * @return Void
+ * @return;
*/
public static function deleteCaseContact($caseID) {
$caseContact = new CRM_Case_DAO_CaseContact();
$where = $groupBy = ' ';
if (!$caseID) {
- return;
+ return NULL;
}
if ($latestDate) {
*/
public static function getCaseManagerContact($caseType, $caseId) {
if (!$caseType || !$caseId) {
- return;
+ return NULL;
}
$caseManagerContact = array();
*
* @param string $fieldName
* @param string $context
- * @see CRM_Core_DAO::buildOptionsContext.
+ * @see CRM_Core_DAO::buildOptionsContext
* @param array $props
* Whatever is known about this dao object.
*
* @return array
* array reference of all redaction rules
*/
-
public static function redactionRule($filter = NULL) {
// if ( ! self::$redactionRule ) {
self::$redactionRule = array();
// hack to handle custom data of type state and country
if (in_array($type, array(
'Country',
- 'StateProvince'
+ 'StateProvince',
))) {
$type = "Integer";
}
* FIXME: When our core fields contain reliable metadata this will be much simpler.
* @return array
* (string => string) key: field_name value: api entity name
- * Note: options are fetched via ajax using the api "getoptions" method
+ * Note: options are fetched via ajax using the api "getoptions" method
*/
public static function fieldOptions() {
// Hack to add options not retrieved by getfields
'member',
'contribution',
'case',
- 'grant'
+ 'grant',
);
CRM_Contact_BAO_Query_Hook::singleton()->alterSearchBuilderOptions($entities, $options);
foreach ($entities as $entity) {
}
elseif (in_array(substr($field, 0, 3), array(
'is_',
- 'do_'
+ 'do_',
)) || CRM_Utils_Array::value('data_type', $info) == 'Boolean'
) {
$options[$field] = 'yesno';
$status = array(
ts('%count contact added to group', array(
'count' => $added,
- 'plural' => '%count contacts added to group'
- ))
+ 'plural' => '%count contacts added to group',
+ )),
);
if ($notAdded) {
$status[] = ts('%count contact was already in group', array(
'count' => $notAdded,
- 'plural' => '%count contacts were already in group'
+ 'plural' => '%count contacts were already in group',
));
}
$status = '<ul><li>' . implode('</li><li>', $status) . '</li></ul>';
CRM_Core_Session::setStatus($status, ts('Added Contact to %1', array(
1 => $groupName,
'count' => $added,
- 'plural' => 'Added Contacts to %1'
+ 'plural' => 'Added Contacts to %1',
)), 'success', array('expires' => 0));
if ($this->_context === 'amtg') {
* @param $addBreadCrumb
* @param string $type
*
- * @return string
+ * @return;
* the location of the file we have created
*/
public static function createMapXML($ids, $locationId, &$page, $addBreadCrumb, $type = 'Contact') {
'id',
's',
'q',
- 'action'
+ 'action',
);
foreach ($_GET as $param => $val) {
if (empty($val) ||
$addressVal["error_message"] = "no contact id found";
}
else {
- $entityBlock =
- array(
- 'contact_id' => $contactId,
- 'entity_id' => $contactId,
- );
+ $entityBlock = array(
+ 'contact_id' => $contactId,
+ 'entity_id' => $contactId,
+ );
$addressVal = CRM_Core_BAO_Address::getValues($entityBlock);
}
/**
* called when action is browse
*
- * @return null
+ * @return;
*/
public function browse() {
$count = CRM_Contact_BAO_GroupContact::getContactGroup(
public function edit($groupId = NULL) {
$this->assign('edit', $this->_edit);
if (!$this->_edit) {
- return;
+ return NULL;
}
$action = CRM_Utils_Request::retrieve('action', 'String',
);
if ($action == CRM_Core_Action::DELETE) {
- $groupContactId =
- CRM_Utils_Request::retrieve('gcid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE);
- $status =
- CRM_Utils_Request::retrieve('st', 'String', CRM_Core_DAO::$_nullObject, TRUE);
+ $groupContactId = CRM_Utils_Request::retrieve('gcid', 'Positive', CRM_Core_DAO::$_nullObject, TRUE);
+ $status = CRM_Utils_Request::retrieve('st', 'String', CRM_Core_DAO::$_nullObject, TRUE);
if (is_numeric($groupContactId) && $status) {
CRM_Contact_Page_View_GroupContact::del($groupContactId, $status, $this->_contactId);
}
* the main function that is called when the page loads,
* it decides the which action has to be taken for the page.
*
- * @return null
+ * @return;
*/
public function run() {
$this->edit();
* Generate the select clause and the associated tables
* for the from clause
*
- * @param NULL
- *
* @return void
*/
public function select() {
* Generate the where clause and also the english language
* equivalent
*
- * @param NULL
- *
* @return void
*/
public function where() {
$wildcard = $isSerialized ? $wildcard : TRUE;
$options = CRM_Utils_Array::value('values', civicrm_api3('contact', 'getoptions', array(
'field' => $name,
- 'context' => 'search'
+ 'context' => 'search',
), array()));
$qillValue = '';
$sqlOP = $wildcard ? ' OR ' : ' AND ';
* Function that does the actual query generation
* basically ties all the above functions together
*
- * @param NULL
- *
* @return array
* array of strings
*/
$dashlets = array();
$getDashlets = civicrm_api3("Dashboard", "get", array(
'domain_id' => CRM_Core_Config::domainID(),
- 'option.limit' => 0
+ 'option.limit' => 0,
));
$contactID = CRM_Core_Session::singleton()->get('userID');
$allDashlets = CRM_Utils_Array::index(array('name'), $getDashlets['values']);
* Comma separated list.
* @param string $operator
*
- * @return boolean
+ * @return bool
* true if use has permission else false
*/
public static function checkPermission($permission, $operator) {
// hack to handle case permissions
if (!$componentName && in_array($key, array(
'access my cases and activities',
- 'access all cases and activities'
+ 'access all cases and activities',
))
) {
$componentName = 'CiviCase';
$dashletIDs = array();
if (is_array($columns)) {
foreach ($columns as $colNo => $dashlets) {
- if (!is_integer($colNo)) {
+ if (!is_int($colNo)) {
continue;
}
$weight = 1;
* @param bool $is_active
* Value we want to set the is_active field.
*
- * @return Object
+ * @return;
* DAO object on sucess, null otherwise
*
*/
if ($code == 'en_US') {
continue;
}
- if (!in_array($code, $codes)) unset($all[$code]);
+ if (!in_array($code, $codes)) {
+ unset($all[$code]);
+ }
}
}
*
* @param string $str
* source string.
- * @param mixed arguments, can be passed in an array or through single variables
*
* @return string
* modified string
*
* @return void
*/
- function localizeArray(
+ public function localizeArray(
&$array,
$params = array()
) {
* @param $key
* Key of the extension (can be 'civicrm', or 'org.example.foo').
*
- * @return Boolean
+ * @return Bool
* True if the domain was changed for an extension.
*/
public function setGettextDomain($key) {
*/
public static function _invoke($args) {
if ($args[0] !== 'civicrm') {
- return;
+ return NULL;
}
if (!defined('CIVICRM_SYMFONY_PATH')) {
// check that we are permissioned to access this page
if (!CRM_Core_Permission::checkMenuItem($item)) {
CRM_Utils_System::permissionDenied();
- return;
+ return NULL;
}
// check if ssl is set
}
$title = CRM_Utils_Array::value('title', $item);
if (strstr($item['page_callback'], '_Page')) {
- $object = new $item['page_callback'] ($title, $mode);
+ $object = new $item['page_callback']($title, $mode);
$object->urlPath = explode('/', $_GET[$config->userFrameworkURLVar]);
}
elseif (strstr($item['page_callback'], '_Controller')) {
$addSequence = $addSequence ? 'true' : 'false';
unset($pageArgs['addSequence']);
}
- $object = new $item['page_callback'] ($title, TRUE, $mode, NULL, $addSequence);
+ $object = new $item['page_callback']($title, TRUE, $mode, NULL, $addSequence);
}
else {
CRM_Core_Error::fatal();
/**
* Given an CRM Form, jump to the previous page
*
- * @param object the CRM_Core_Form element under consideration
- *
* @return mixed
* does a jump to the back state
*/
/**
* Given an CRM Form, jump to the next page
*
- * @param object the CRM_Core_Form element under consideration
- *
* @return mixed
* does a jump to the nextstate
*/
* Mark this page as valid for the QFC framework. This is needed as
* we build more advanced functionality into the StateMachine
*
- * @param object the QFC data container
- *
* @return void
*/
public function validate(&$data) {
* Mark this page as invalid for the QFC framework. This is needed as
* we build more advanced functionality into the StateMachine
*
- * @param object the QFC data container
- *
* @return void
*/
public function invalidate(&$data) {
/**
* Setter for name
*
- * @param string
- *
* @return void
*/
public function setName($name) {
$importableFields = $this->getGroupFieldsForImport($customGroupID, $this);
$this->_fields = array_merge(array(
'do_not_import' => array('title' => ts('- do not import -')),
- 'contact_id' => array('title' => ts('Contact ID'))
+ 'contact_id' => array('title' => ts('Contact ID')),
), $importableFields);
}
* @param array $values
* The array of values belonging to this line.
*
- * @return boolean
+ * @return bool
*/
public function mapField(&$values) {
return CRM_Import_Parser::VALID;
* @param array $values
* The array of values belonging to this line.
*
- * @return boolean
+ * @return bool
* the result of this processing
*/
public function preview(&$values) {
* @param array $values
* The array of values belonging to this line.
*
- * @return boolean
+ * @return bool
* the result of this processing
* It is called from both the preview & the import actions
*
* @param array $values
* The array of values belonging to this line.
*
- * @return boolean
+ * @return bool
* the result of this processing
*/
public function import($onDuplicate, &$values) {
/**
* Get the action links for this page.
*
- * @param null
- *
* @return array
* array of action links that we need to display for the browse screen
*/
/**
* Browse all custom group fields.
*
- * @param null
- *
* @return void
*/
public function browse() {
* This method is called after the page is created. It checks for the
* type of action and executes that action.
*
- * @param null
- *
* @return void
*/
public function run() {
array(
'title' => ts('Custom Data Fields'),
'url' => CRM_Utils_System::url('civicrm/admin/custom/group/field', 'reset=1&gid=' . $this->_gid),
- )
+ ),
);
CRM_Utils_System::appendBreadCrumb($breadcrumb);
'cap' => 'round',
'join' => 'round',
'dash' => '2,2',
- 'color' => array(0, 0, 200)
+ 'color' => array(0, 0, 200),
));
$this->pdf->SetFontSize(8);
/**
* Global validation rules for the form
*
- * @param array $fields
+ * @param array $params
* Posted values of the form.
*
* @return array
$status = array(
ts('%count contact added to group', array(
'count' => $added,
- 'plural' => '%count contacts added to group'
- ))
+ 'plural' => '%count contacts added to group',
+ )),
);
if ($notAdded) {
$status[] = ts('%count contact was already in group', array(
'count' => $notAdded,
- 'plural' => '%count contacts were already in group'
+ 'plural' => '%count contacts were already in group',
));
}
$status = '<ul><li>' . implode('</li><li>', $status) . '</li></ul>';
CRM_Core_Session::setStatus($status, ts('Added Contact to %1', array(
1 => $groupName,
'count' => $added,
- 'plural' => 'Added Contacts to %1'
+ 'plural' => 'Added Contacts to %1',
)), 'success', array('expires' => 0));
}
}
* extensions.
*
*
- * @return Array
+ * @return array
* list of extension names
*/
private function grabRemoteKeyList() {
$financialItems = array();
$this->_batchIds = $batchId;
while ($dao->fetch()) {
- $creditAccountName = $creditAccountType =
- $creditAccount = NULL;
+ $creditAccountName = $creditAccountType = $creditAccount = NULL;
if ($dao->credit_account) {
$creditAccountName = $dao->credit_account_name;
$creditAccountType = $dao->credit_account_type_code;
$batchTitle = CRM_Core_DAO::getFieldValue('CRM_Batch_BAO_Batch', self::$_entityID, 'title');
CRM_Utils_System::setTitle(ts('Accounting Batch - %1', array(1 => $batchTitle)));
- $columnHeaders =
- array(
- 'created_by' => ts('Created By'),
- 'status' => ts('Status'),
- 'description' => ts('Description'),
- 'payment_instrument' => ts('Payment Instrument'),
- 'item_count' => ts('Entered Transactions'),
- 'assigned_item_count' => ts('Assigned Transactions'),
- 'total' => ts('Entered Total'),
- 'assigned_total' => ts('Assigned Total'),
- 'opened_date' => ts('Opened'),
- );
+ $columnHeaders = array(
+ 'created_by' => ts('Created By'),
+ 'status' => ts('Status'),
+ 'description' => ts('Description'),
+ 'payment_instrument' => ts('Payment Instrument'),
+ 'item_count' => ts('Entered Transactions'),
+ 'assigned_item_count' => ts('Assigned Transactions'),
+ 'total' => ts('Entered Total'),
+ 'assigned_total' => ts('Assigned Total'),
+ 'opened_date' => ts('Opened'),
+ );
$this->assign('columnHeaders', $columnHeaders);
}
}
'6' => 1, //Asset
'7' => 4, //cost of sales
'8' => 1, //premium inventory
- '9' => 3 //discount account is,
+ '9' => 3, //discount account is,
);
$financialAccountType = CRM_Utils_Array::value($this->_submitValues['account_relationship'], $financialAccountType);
}
else {
$financialAccountSelect = array(
- 'select' => ts('- select -'),
- ) + CRM_Contribute_PseudoConstant::financialAccount();
+ 'select' => ts('- select -'),
+ ) + CRM_Contribute_PseudoConstant::financialAccount();
}
}
if ($this->_action == CRM_Core_Action::UPDATE) {
'6' => 1, //Asset
'7' => 4, //cost of sales
'8' => 1, //premium inventory
- '9' => 3 //discount account is,
+ '9' => 3, //discount account is,
);
$financialAccountType = $financialAccountType[$this->_defaultValues['account_relationship']];
array(
'type' => 'cancel',
'name' => ts('Cancel'),
- )
+ ),
)
);
$this->addFormRule(array('CRM_Financial_Form_FinancialTypeAccount', 'formRule'), $this);
public static function create(&$params, $ids = array()) {
$id = CRM_Utils_Array::value('id', $params, CRM_Utils_Array::value('id', $ids));
if (!is_array($params) || empty($params)) {
- return;
+ return NULL;
}
if (!$id && empty($params['name'])) {
$params['name'] = strtolower(CRM_Utils_String::munge($params['label'], '_', 242));
* @param int $id
* Id.
*
- * @return boolean
+ * @return bool
*
*/
public static function del($id) {
*
* @param int $entityId
* Id.
- * @param string $entityTableEntity table.
+ * @param string $entityTable table.
* Entity table.
- * @param string $financialTypeIDFinancial type id.
+ * @param string $financialTypeID type id.
* Financial type id.
*
*/
$errors = array();
$template = CRM_Core_Smarty::singleton();
-
$domain = CRM_Core_BAO_Domain::getDomain();
$mailing = new CRM_Mailing_BAO_Mailing();
$urls[$key]++;
}
-
$skipTextFile = $self->get('skipTextFile');
if (!$params['upload_type']) {
/* Do a full token replacement on a dummy verp, the current
* contact and domain, and the first organization. */
-
// here we make a dummy mailing object so that we
// can retrieve the tokens that we need to replace
// so that we do get an invalid token error
}
if (!empty($dataErrors)) {
$errors['textFile'] = ts('The following errors were detected in %1:', array(
- 1 => $name
+ 1 => $name,
)) . ' <ul>' . implode('', $dataErrors) . '</ul>';
}
}
$config = CRM_Core_Config::singleton();
$preUpgradeMessage .= '<br />' . ts("As per <a href='%1'>the related blog post</a>, we are making contact names, addresses and mailings monolingual; the values entered for the default locale (%2) will be preserved and values for other locales removed.", array(
1 => 'http://civicrm.org/blogs/shot/multilingual-civicrm-3440-making-some-fields-monolingual',
- 2 => $config->lcMessages
+ 2 => $config->lcMessages,
));
}
$message .= '<br />' . ts("The default copies of the message templates listed below will be updated to handle new features or correct a problem. Your installation has customized versions of these message templates, and you will need to apply the updates manually after running this upgrade. <a href='%1' style='color:white; text-decoration:underline; font-weight:bold;' target='_blank'>Click here</a> for detailed instructions. %2", array(
1 => 'http://wiki.civicrm.org/confluence/display/CRMDOC/Message+Templates#MessageTemplates-UpgradesandCustomizedSystemWorkflowTemplates',
- 2 => $html
+ 2 => $html,
));
}
}
$subTypeTemplates = implode(',', $subTypeTemplates);
$postUpgradeMessage .= '<br />' . ts('You are using custom template for contact subtypes: %1.', array(1 => $subTypeTemplates)) . '<br />' . ts('You need to move these subtype templates to the SubType directory in %1 and %2 respectively.', array(
1 => 'CRM/Contact/Form/Edit',
- 2 => 'CRM/Contact/Page/View'
+ 2 => 'CRM/Contact/Page/View',
));
}
}
$config = CRM_Core_Config::singleton();
if (is_callable(array(
$config->userSystem,
- 'replacePermission'
+ 'replacePermission',
))) {
$config->userSystem->replacePermission('access CiviEvent', array('access CiviEvent', 'edit all events'));
}
$dao->free();
// Do the regular upgrade
- $upgrade = new CRM_Upgrade_Form;
+ $upgrade = new CRM_Upgrade_Form();
$upgrade->processSQL($rev);
}
// we definitely need a contact id for the from address
// if we dont have one, skip this email
if (empty($params['from']['id'])) {
- return;
+ return NULL;
}
$emailFields = array('to', 'cc', 'bcc');
* See how file rules are written in HTML/QuickForm/file.php
* Checks to make sure the uploaded file is ascii
*
- * @param array Uploaded file info (from $_FILES)
- *
* @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)
- *
* @return bool
* whether file has been uploaded properly and is now in UTF-8
*/
* See how file rules are written in HTML/QuickForm/file.php
* Checks to make sure the uploaded file is html
*
- * @param array Uploaded file info (from $_FILES)
- *
* @return bool
* true if file has been uploaded, false otherwise
*/
* @param array $options
* The daoName and fieldName (optional ).
*
- * @return boolean
+ * @return bool
* true if object exists
*/
public static function objectExists($value, $options) {
/**
* Rewrite various system urls to https
*
- * @param null
- *
* @return void
*/
public function mapConfigToSSL() {
* @return string
* an HTML string containing a link to the given path.
*/
- function url(
+ public function url(
$path = NULL,
$query = NULL,
$absolute = FALSE,
/**
* Check is user logged in.
*
- * @return boolean
+ * @return bool
*/
public function isUserLoggedIn() {
$isloggedIn = FALSE;
* @param CRM_Core_Form $form
*/
public function getLoginDestination(&$form) {
- return;
+ return NULL;
}
/**
if ($id) {
$this->callbacks[$phase][$id] = array(
'callback' => $callback,
- 'parameters' => (is_array($params) ? $params : array($params))
+ 'parameters' => (is_array($params) ? $params : array($params)),
);
}
else {
$this->callbacks[$phase][] = array(
'callback' => $callback,
- 'parameters' => (is_array($params) ? $params : array($params))
+ 'parameters' => (is_array($params) ? $params : array($params)),
);
}
}
* @return array
* modified $apiRequest
*/
- function fromApiInput($apiRequest);
+ public function fromApiInput($apiRequest);
/**
* @param array $apiRequest
* @return array
* modified $result
*/
- function toApiOutput($apiRequest, $result);
+ public function toApiOutput($apiRequest, $result);
}
*
* @return array
* API Result Array
- * {@getfields relationship_create}
+ * {@getfields relationship_create}
*/
function civicrm_api3_relationship_create($params) {
_civicrm_api3_handle_relationship_type($params);
*
* @return array
* API Result Array
- * {@getfields relationship_delete}
+ * {@getfields relationship_delete}
* @example RelationshipDelete.php Delete Example
*
*/
* - if you pass in contact_id - it just returns all relationships for 'contact_id'
* - if you don't pass in contact_id then it does a filter on the relationship table (DAO based search)
*
- * @return Array
+ * @return array
* API Result Array
- * {@getfields relationship_get}
+ * {@getfields relationship_get}
* @example RelationshipGet.php
* @access public
*/
*
* @return array
* details of found Option Values
- * {@getfields OptionValue_get}
+ * {@getfields OptionValue_get}
*/
function civicrm_api3_report_template_get($params) {
require_once 'api/v3/OptionValue.php';
*
* @return array
* Array of newly created option_value property values.
- * {@getfields OptionValue_create}
+ * {@getfields OptionValue_create}
*/
function civicrm_api3_report_template_create($params) {
require_once 'api/v3/OptionValue.php';
*
* @return array
* Api result
- * {@getfields ReportTemplate_create}
+ * {@getfields ReportTemplate_create}
*/
function civicrm_api3_report_template_delete($params) {
require_once 'api/v3/OptionValue.php';
* @param array $params
* Input parameters.
*
- * @return array
+ * @return;
* details of found instances
*/
function _civicrm_api3_report_template_getrows_spec(&$params) {
/**
* @param array $params
*
- * @return array
+ * @return;
*/
function _civicrm_api3_system_log_create_spec(&$params) {
require_once 'api/v3/System.php';
fi
BOWER=$(pickcmd node_modules/bower/bin/bower bower)
- $BOWER install
+ #$BOWER install
popd
fi
if (!$fd) {
die("Cannot open $name");
}
- fputs($fd, $buffer);
+ fwrite($fd, $buffer);
fclose($fd);
}
<?php
/**
- * Implements hook_civicrm_install
+ * Implements civicrm_install
*/
function moduletest_civicrm_install() {
CRM_Extension_Manager_ModuleTest::incHookCount('moduletest', 'install');
}
/**
- * Implements hook_civicrm_postInstall
+ * Implements civicrm_postInstall
*/
function moduletest_civicrm_postInstall() {
CRM_Extension_Manager_ModuleTest::incHookCount('moduletest', 'postInstall');
}
/**
- * Implements hook_civicrm_uninstall
+ * Implements civicrm_uninstall
*/
function moduletest_civicrm_uninstall() {
CRM_Extension_Manager_ModuleTest::incHookCount('moduletest', 'uninstall');
}
/**
- * Implements hook_civicrm_enable
+ * Implements civicrm_enable
*/
function moduletest_civicrm_enable() {
CRM_Extension_Manager_ModuleTest::incHookCount('moduletest', 'enable');
}
/**
- * Implements hook_civicrm_disable
+ * Implements civicrm_disable
*/
function moduletest_civicrm_disable() {
CRM_Extension_Manager_ModuleTest::incHookCount('moduletest', 'disable');
$cases[] = array('x=1 x=2 x=1', '{crmScope x=1}x={$x} {crmScope x=2}x={$x}{/crmScope} x={$x}{/crmScope}');
$cases[] = array(
'x=1 x=2 x=3 x=2 x=1',
- '{crmScope x=1}x={$x} {crmScope x=2}x={$x} {crmScope x=3}x={$x}{/crmScope} x={$x}{/crmScope} x={$x}{/crmScope}'
+ '{crmScope x=1}x={$x} {crmScope x=2}x={$x} {crmScope x=3}x={$x}{/crmScope} x={$x}{/crmScope} x={$x}{/crmScope}',
);
$cases[] = array('x=1,y=9', '{crmScope x=1 y=9}x={$x},y={$y}{/crmScope}');
$cases[] = array(
'x=1,y=9 x=1,y=8 x=1,y=9',
- '{crmScope x=1 y=9}x={$x},y={$y} {crmScope y=8}x={$x},y={$y}{/crmScope} x={$x},y={$y}{/crmScope}'
+ '{crmScope x=1 y=9}x={$x},y={$y} {crmScope y=8}x={$x},y={$y}{/crmScope} x={$x},y={$y}{/crmScope}',
);
$cases[] = array('x=', 'x={$x}');
return $cases;
'civicrm_membership',
'civicrm_membership_log',
'civicrm_contribution',
- 'civicrm_membership_payment'
+ 'civicrm_membership_payment',
);
$this->quickCleanup($tablesToTruncate);
$this->relationshipTypeDelete($this->_relationshipTypeId);
*
* @return bool
*/
- static
- public function _recordValue($taskCtx, $value) {
+ static public function _recordValue($taskCtx, $value) {
self::$_recordedValues[] = $value;
return TRUE;
}
*
* @return bool
*/
- static
- public function _returnFalse($taskCtx) {
+ static public function _returnFalse($taskCtx) {
return FALSE;
}
*
* @throws Exception
*/
- static
- public function _throwException($taskCtx, $value) {
+ static public function _throwException($taskCtx, $value) {
throw new Exception("Manufactured error: $value");
}
*
* @return bool
*/
- static
- public function _enqueueNumbers($taskCtx, $low, $high) {
+ static public function _enqueueNumbers($taskCtx, $low, $high) {
for ($i = $low; $i <= $high; $i++) {
$taskCtx->queue->createItem(new CRM_Queue_Task(
array('CRM_Queue_RunnerTest', '_recordValue'),
* saveMapping : save current mapping?
* saveMappingName : to override mapping name
*/
- function importCSVComponent(
+ public function importCSVComponent(
$component,
$headers,
$rows,
if (!empty($other['callbackImportSummary']) && is_callable(array(
$this,
- $other['callbackImportSummary']
+ $other['callbackImportSummary'],
))
) {
$callbackImportSummary = $other['callbackImportSummary'];
foreach (array(
'joinDate',
'startDate',
- 'endDate'
+ 'endDate',
) as $date) {
$$date = CRM_Utils_Date::customFormat($$date, $configVars->dateformatFull);
}
* Test civicrm_update() Deliberately exclude contact_type as it should still
* cope using civicrm_api CRM-7645
*/
-
public function testUpdateCreateWithID() {
// Insert a row in civicrm_contact creating individual contact
$op = new PHPUnit_Extensions_Database_Operation_Insert();
}
/**
- * Test id only format
- */
+ * Test id only format
+ */
public function testContactGetFormatID_only() {
$this->createContactFromXML();
$description = "This demonstrates use of the 'format.id_only' param.
}
/**
- * Test id only format
- */
+ * Test id only format
+ */
public function testContactGetFormatSingleValue() {
$this->createContactFromXML();
$description = "This demonstrates use of the 'format.single_value' param.
$this->quickCleanup($tablesToTruncate, TRUE);
}
- ///////////////// civicrm_event_get methods
-
+ /**
+ * civicrm_event_get methods
+ */
public function testGetEventById() {
$params = array(
'id' => $this->_events[1]['id'],
'participant_status' => 1,
'role_id' => 1,
'contact_id' => $contactID,
- 'event_id' => $this->_eventIds[0]
+ 'event_id' => $this->_eventIds[0],
));
$currentEvent = $this->callAPIAndDocument('Event', 'getsingle', $getEventParams, __FUNCTION__, __FILE__, $description, $subfile, 'getsingle');
$this->assertEquals(1, $currentEvent['is_full'], ' is full is set in line ' . __LINE__);
$this->contactDelete($contactID);
}
- /*
+ /**
* Legacy support for Contribution Type ID. We need to ensure this is supported
* as an alias for financial_type_id
*/
$check = $this->callAPISuccess($this->_entity, 'get', array(
'return.custom_' . $ids['custom_field_id'] => 1,
- 'id' => $result['id']
+ 'id' => $result['id'],
));
$this->assertEquals("custom string", $check['values'][$check['id']]['custom_' . $ids['custom_field_id']], ' in line ' . __LINE__);
$this->_participantID = $this->participantCreate(array(
'contactID' => $this->_contactID,
- 'eventID' => $this->_eventID
+ 'eventID' => $this->_eventID,
));
$this->_contactID2 = $this->individualCreate();
$this->_participantID2 = $this->participantCreate(array(
'contactID' => $this->_contactID2,
- 'eventID' => $this->_eventID
+ 'eventID' => $this->_eventID,
));
$this->_participantID3 = $this->participantCreate(array(
'contactID' => $this->_contactID2,
- 'eventID' => $this->_eventID
+ 'eventID' => $this->_eventID,
));
$this->_contactID3 = $this->individualCreate();
$this->_participantID4 = $this->participantCreate(array(
'contactID' => $this->_contactID3,
- 'eventID' => $this->_eventID
+ 'eventID' => $this->_eventID,
));
}
$this->_participantID = $this->participantCreate(array(
'contact_id' => $this->_contactID,
- 'event_id' => $this->_eventID
+ 'event_id' => $this->_eventID,
));
$this->_contactID2 = $this->individualCreate();
$this->_participantID2 = $this->participantCreate(array(
'contact_id' => $this->_contactID2,
- 'event_id' => $this->_eventID
+ 'event_id' => $this->_eventID,
));
$this->_participantID3 = $this->participantCreate(array(
'contact_id' => $this->_contactID2,
- 'event_id' => $this->_eventID
+ 'event_id' => $this->_eventID,
));
$this->_params = array(
'contact_id' => $this->_contactID,
$event = $this->eventCreate(NULL);
$this->callAPISuccess('participant', 'create', array(
'event_id' => $event['id'],
- 'contact_id' => $this->_contactID
+ 'contact_id' => $this->_contactID,
));
$description = "use nested get to get an event";
$rel2 = $this->callAPISuccess('relationship', 'create', $rel2Params);
}
- /*
+ /**
* Test using various operators
*/
public function testGetTypeOperators() {
public static function getReportTemplates() {
$reportsToSkip = array(
'activity' => 'does not respect function signature on from clause',
- 'walklist' => 'Notice: Undefined index: type in CRM_Report_Form_Walklist_Walklist line 155.
- (suspect the select function should be removed in favour of the parent (state province field)
- also, type should be added to state province & others? & potentially getAddressColumns fn should be
- used per other reports',
+ 'walklist' => 'Notice: Undefined index: type in CRM_Report_Form_Walklist_Walklist line 155.(suspect the select function should be removed in favour of the parent (state province field) also, type should be added to state province & others? & potentially getAddressColumns fn should be used per other reports',
'contribute/repeat' => 'Reports with important functionality in postProcess are not callable via the api. For variable setting recommend beginPostProcessCommon, for temp table creation recommend From fn',
'contribute/topDonor' => 'construction of query in postProcess makes inaccessible ',
- 'contribute/sybunt' => 'e notice - (ui gives fatal error at civicrm/report/contribute/sybunt&reset=1&force=1
- e-notice is on yid_valueContribute/Sybunt.php(214) because at the force url "yid_relative" not "yid_value" is defined',
+ 'contribute/sybunt' => 'e notice - (ui gives fatal error at civicrm/report/contribute/sybunt&reset=1&force=1 e-notice is on yid_valueContribute/Sybunt.php(214) because at the force url "yid_relative" not "yid_value" is defined',
'contribute/lybunt' => 'same as sybunt - fatals on force url & test identifies why',
'event/income' => 'I do no understand why but error is Call to undefined method CRM_Report_Form_Event_Income::from() in CRM/Report/Form.php on line 2120',
'contact/relationship' => '(see contribute/repeat), property declaration issue, Undefined property: CRM_Report_Form_Contact_Relationship::$relationType in /Contact/Relationship.php(486):',