return $caseTypeDAO->save();
}
+ /**
+ * Generate and assign an arbitrary value to a field of a test object.
+ *
+ * @param string $fieldName
+ * @param array $fieldDef
+ * @param int $counter
+ * The globally-unique ID of the test object.
+ */
protected function assignTestValue($fieldName, &$fieldDef, $counter) {
if ($fieldName == 'definition') {
$this->{$fieldName} = "<CaseType><name>TestCaseType{$counter}</name></CaseType>";
<?php
+/**
+ * Class CRM_Case_ManagedEntities
+ */
class CRM_Case_ManagedEntities {
/**
return NULL;
}
+ /**
+ * @param int $offset
+ * @param int $rowcount
+ * @param null $sort
+ * @param bool $returnSQL
+ *
+ * @return string
+ */
public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL, $returnSQL = FALSE) {
return $this->all($offset, $rowcount, $sort, FALSE, TRUE);
}
protected $label;
/**
+ * Class constructor.
+ *
* @param string $name
* @param string $label
*/
*/
class CRM_Contact_Form_Search_Custom_FullText_Activity extends CRM_Contact_Form_Search_Custom_FullText_AbstractPartialQuery {
+ /**
+ * Class constructor.
+ */
public function __construct() {
parent::__construct('Activity', ts('Activities'));
}
+ /**
+ * @return bool
+ */
public function isActive() {
return CRM_Core_Permission::check('view all activities');
}
parent::__construct('Case', ts('Cases'));
}
+ /**
+ * @return bool
+ */
public function isActive() {
$config = CRM_Core_Config::singleton();
return in_array('CiviCase', $config->enableComponents);
parent::__construct('Contact', ts('Contacts'));
}
+ /**
+ * @return bool
+ */
public function isActive() {
return CRM_Core_Permission::check('view all contacts');
}
parent::__construct('Contribution', ts('Contributions'));
}
+ /**
+ * @return bool
+ */
public function isActive() {
$config = CRM_Core_Config::singleton();
return in_array('CiviContribute', $config->enableComponents) &&
parent::__construct('Membership', ts('Memberships'));
}
+ /**
+ * @return bool
+ */
public function isActive() {
$config = CRM_Core_Config::singleton();
return in_array('CiviMember', $config->enableComponents) &&
*/
/**
- * Save an acl
+ * Save an acl.
*
* {@getfields acl_create}
* @example aclCreate.php
}
/**
- * Get an acl
- *
- * {@getfields acl_get}
- * @example aclCreate.php
+ * Get an acl.
*
* @param array $params
*
}
/**
- * Delete an acl
- *
- * {@getfields acl_delete}
- * @example aclCreate.php
+ * Delete an acl.
*
* @param array $params
*
*/
/**
+ * Get available api actions.
+ *
* @param array $apiRequest
*
* @return array
*/
/**
- * Update function is basically a hack to get around issues listed in
+ * Update function is basically a hack.
+ *
+ * We want to remove it but must resolve issues in
* http://issues.civicrm.org/jira/browse/CRM-12144
*
* It is not recommended & if update doesn't work & fix does then update will not be fixed
*/
/**
- * Add an IM for a contact
- *
- * Allowed @params array keys are:
- * {@getfields im_create}
+ * Add an IM for a contact.
*
* @param array $params
*
}
/**
- * Adjust Metadata for Create action
+ * Adjust Metadata for Create action.
+ *
+ * The metadata is used for setting defaults, documentation & validation.
*
- * The metadata is used for setting defaults, documentation & validation
* @param array $params
* Array or parameters determined by getfields.
*/
}
/**
- * Deletes an existing IM
+ * Deletes an existing IM.
*
* @param array $params
*
}
/**
- * Process sms queue
+ * Process sms queue.
*
* @param array $params
*
* @param array $keys
* List of required fields. A value can be an array denoting that either this or that is required.
* @param bool $verifyDAO
+ *
+ * @throws \API_Exception
*/
function civicrm_api3_verify_mandatory($params, $daoName = NULL, $keys = array(), $verifyDAO = TRUE) {
return TRUE;
}
+ /**
+ * Ensure function is being run from the cli.
+ *
+ * @return bool
+ */
public function _accessing_from_cli() {
if (PHP_SAPI === 'cli') {
return TRUE;
parent::initialize();
}
+ /**
+ * Run CLI function.
+ */
public function run() {
$this->row = 1;
$handle = fopen($this->_file, "r");
$this->processLine($params);
}
fclose($handle);
- return NULL;
}
/* return a params as expected */
*/
class CRM_Utils_QueryFormatterTest extends CiviUnitTestCase {
+ /**
+ * Generate data for tests to iterate through.
+ *
+ * @return array
+ */
public function dataProvider() {
// Array(0=>$inputText, 1=>$language, 2=>$options, 3=>$expectedText).
$cases = array();