}
}
+ /**
+ * Post Processing function for Form (postProcessCommon should be used to set other variables from input as the api accesses that function)
+ */
function beginPostProcess() {
$this->setParams($this->controller->exportValues($this->_name));
}
/**
- * @param $rows
+ * @param array $rows
*/
function alterDisplay(&$rows) {
// custom code to alter rows
/**
* Deprecated. Use activity API instead
+ *
+ * @param array $params
+ *
+ * @throws API_Exception
+ * @return array
*/
function civicrm_api3_case_activity_create($params) {
return civicrm_api3_activity_create($params);
/**
* Internal function to format create params for processing
+ *
+ * @param array $params
*/
function _civicrm_api3_case_format_params(&$params) {
// figure out case type id from case type and vice-versa
<?php
/**
* params must contain at least id=xx & {one of the fields from getfields}=value
+ *
+ * @param $apiRequest
+ *
+ * @throws API_Exception
+ * @return array
*/
function civicrm_api3_generic_setValue($apiRequest) {
$entity = $apiRequest['entity'];
* To do this, perform a 'get' action to load the existing values, then merge in the updates
* and call 'create' to save the revised entity.
*
- * @param $apiRequest an array with keys:
+ * @param array $apiRequest array with keys:
* - entity: string
* - action: string
* - version: string
$p = array_merge($existing, $apiRequest['params']);
return civicrm_api($apiRequest['entity'], 'create', $p);
}
-
/**
* Delete a job
*
- * @param $params
- *
- * @internal param int $id
+ * @param array $params
*
* @return array API Result Array
* {@getfields Job_delete}
* Dumb wrapper to execute scheduled jobs. Always creates success - errors
* and results are handled in the job log.
*
- * @param array $params (reference ) input parameters
+ * @param array $params (reference ) input parameters
*
* @return array API Result Array
*
return civicrm_api3_create_error($result['messages']);
}
}
+
/**
* First check on Code documentation
+ *
+ * @param array $params
*/
function _civicrm_api3_job_geocode_spec(&$params) {
$params['start'] = array('title' => 'Start Date');
*
* id - Integer - greetings option group
*
- * @param $params
+ * @param array $params
*
* @return boolean true if success, else false
* @static
/**
* Job to get mail responses from civimailing
+ *
+ * @param array $params
+ *
+ * @return array
*/
function civicrm_api3_job_fetch_bounces($params) {
$lock = new CRM_Core_Lock('civimail.job.EmailProcessor');
/**
* Job to get mail and create activities
+ *
+ * @param array $params
+ *
+ * @return array
*/
function civicrm_api3_job_fetch_activities($params) {
$lock = new CRM_Core_Lock('civimail.job.EmailProcessor');
/**
* Set expired relationships to disabled.
*
+ * @param array $params
+ *
+ * @return array
*/
function civicrm_api3_job_disable_expired_relationships($params) {
$result = CRM_Contact_BAO_Relationship::disableExpiredRelationships();
* it is recommended that they use the limit clause to limit the number of smart groups
* evaluated on a per job basis. Might also help to increase the smartGroupCacheTimeout
* and use the cache
+ *
+ * @param array $params
+ *
+ * @return array
*/
-function civicrm_api3_job_group_rebuild( $params ) {
+function civicrm_api3_job_group_rebuild($params) {
$lock = new CRM_Core_Lock('civimail.job.groupRebuild');
if (!$lock->isAcquired()) {
return civicrm_api3_create_error('Could not acquire lock, another EmailProcessor process is running');
*
* @param $profileID
*
- * @return array
+ * @return integer|string
* @throws CiviCRM_API3_Exception
*/
function _civicrm_api3_profile_getProfileID($profileID) {
/**
* Specify Meta data for create. Note that this data is retrievable via the getfields function
* and is used for pre-filling defaults and ensuring mandatory requirements are met.
+ *
+ * @param array $params
*/
function _civicrm_api3_tag_create_spec(&$params) {
$params['used_for']['api.default'] = 'civicrm_contact';
<?php
/**
* Test Generated example of using group getfields API
- * demonstrate use of getfields to interogate api *
+ * demonstrate use of getfields to interrogate api *
*/
function group_getfields_example(){
$params = array(
<?php
/**
* Test Generated example of using tag getfields API
- * demonstrate use of getfields to interogate api *
+ * demonstrate use of getfields to interrogate api *
*/
function tag_getfields_example(){
$params = array(
}
function testgetfields() {
- $description = "demonstrate use of getfields to interogate api";
+ $description = "demonstrate use of getfields to interrogate api";
$params = array('action' => 'create');
$result = $this->callAPISuccess('event', 'getfields', $params);
$this->assertEquals(1, $result['values']['title']['api.required'], 'in line ' . __LINE__);
* test api_action param also works
*/
function testgetfieldsRest() {
- $description = "demonstrate use of getfields to interogate api";
+ $description = "demonstrate use of getfields to interrogate api";
$params = array('api_action' => 'create');
$result = $this->callAPISuccess('event', 'getfields', $params);
$this->assertEquals(1, $result['values']['title']['api.required'], 'in line ' . __LINE__);
}
function testgetfieldsGet() {
- $description = "demonstrate use of getfields to interogate api";
+ $description = "demonstrate use of getfields to interrogate api";
$params = array('action' => 'get');
$result = $this->callAPISuccess('event', 'getfields', $params);
$this->assertEquals('title', $result['values']['event_title']['name'], 'in line ' . __LINE__);
}
function testgetfieldsDelete() {
- $description = "demonstrate use of getfields to interogate api";
+ $description = "demonstrate use of getfields to interrogate api";
$params = array('action' => 'delete');
$result = $this->callAPISuccess('event', 'getfields', $params);
$this->assertEquals(1, $result['values']['id']['api.required']);
}
function testgetfields() {
- $description = "demonstrate use of getfields to interogate api";
+ $description = "demonstrate use of getfields to interrogate api";
$params = array('action' => 'create');
$result = $this->callAPIAndDocument('group', 'getfields', $params, __FUNCTION__, __FILE__, $description, 'getfields', 'getfields');
$this->assertEquals(1, $result['values']['is_active']['api.default']);
}
function testTagGetfields() {
- $description = "demonstrate use of getfields to interogate api";
+ $description = "demonstrate use of getfields to interrogate api";
$params = array('action' => 'create');
$result = $this->callAPIAndDocument('tag', 'getfields', $params, __FUNCTION__, __FILE__, $description, NULL, 'getfields');
$this->assertEquals('civicrm_contact', $result['values']['used_for']['api.default']);