*
* @return string|bool
* if file exists returns $activityTypeFile activity filename otherwise false.
- *
*/
public static function getFileForActivityTypeId($activityTypeId, $crmDir = 'Activity') {
$activityTypes = CRM_Case_PseudoConstant::caseActivityType(FALSE, TRUE);
}
/**
- * Get the allowed profile fields for Activities
+ * Get the allowed profile fields for Activities.
*
* @return array
* array of activity profile Fields
}
/**
- * This function deletes the activity record related to contact record,
- * when there are no target and assignee record w/ other contact.
+ * This function deletes the activity record related to contact record.
+ *
+ * This is conditional on there being no target and assignee record
+ * with other contacts.
*
* @param int $contactId
* ContactId.
}
/**
- * copy custom fields and attachments from an existing activity to another.
+ * Copy custom fields and attachments from an existing activity to another.
+ *
* @see CRM_Case_Page_AJAX::_convertToCaseActivity()
*
* @param array $params
}
/**
+ * Get activity contact.
+ *
* @param int $activityId
* @param int $recordTypeID
* @param string $column
}
/**
+ * Set api filter.
+ *
+ * @todo Document what this is for.
+ *
* @param array $params
*/
public function setApiFilter(&$params) {
'first second',
CRM_Utils_QueryFormatter::LANG_SQL_FTSBOOL,
CRM_Utils_QueryFormatter::MODE_WILDWORDS,
- '+*first* +*second*'
+ '+*first* +*second*',
);
$cases[] = array(
'first second',
CRM_Utils_QueryFormatter::LANG_SQL_FTSBOOL,
CRM_Utils_QueryFormatter::MODE_WILDWORDS_SUFFIX,
- '+first* +second*'
+ '+first* +second*',
);
$cases[] = array(
'first second',
CRM_Utils_QueryFormatter::LANG_SOLR,
CRM_Utils_QueryFormatter::MODE_NONE,
- 'first second'
+ 'first second',
);
$cases[] = array(
'first second',
CRM_Utils_QueryFormatter::LANG_SOLR,
CRM_Utils_QueryFormatter::MODE_PHRASE,
- '"first second"'
+ '"first second"',
);
$cases[] = array(
'first second',
CRM_Utils_QueryFormatter::LANG_SOLR,
CRM_Utils_QueryFormatter::MODE_WILDPHRASE,
- '"*first second*"'
+ '"*first second*"',
);
$cases[] = array(
'first second',
'first* second*',
);
- // if user supplies wildcards, then ignore mode
+ // If user supplies wildcards, then ignore mode.
foreach (array(
CRM_Utils_QueryFormatter::MODE_NONE,
CRM_Utils_QueryFormatter::MODE_WILDPHRASE,
CRM_Utils_QueryFormatter::MODE_WILDWORDS,
CRM_Utils_QueryFormatter::MODE_WILDWORDS_SUFFIX,
) as $mode) {
- $cases[] = array('first% second', CRM_Utils_QueryFormatter::LANG_SQL_LIKE, $mode, 'first% second');
- $cases[] = array('first% second', CRM_Utils_QueryFormatter::LANG_SQL_FTS, $mode, 'first* second');
- $cases[] = array('first% second', CRM_Utils_QueryFormatter::LANG_SQL_FTSBOOL, $mode, '+first* +second');
- $cases[] = array('first% second', CRM_Utils_QueryFormatter::LANG_SOLR, $mode, 'first* second');
- $cases[] = array('first second%', CRM_Utils_QueryFormatter::LANG_SQL_LIKE, $mode, 'first second%');
- $cases[] = array('first second%', CRM_Utils_QueryFormatter::LANG_SQL_FTS, $mode, 'first second*');
- $cases[] = array('first second%', CRM_Utils_QueryFormatter::LANG_SQL_FTSBOOL, $mode, '+first +second*');
- $cases[] = array('first second%', CRM_Utils_QueryFormatter::LANG_SOLR, $mode, 'first second*');
+ $cases[] = array(
+ 'first% second',
+ CRM_Utils_QueryFormatter::LANG_SQL_LIKE,
+ $mode,
+ 'first% second',
+ );
+ $cases[] = array(
+ 'first% second',
+ CRM_Utils_QueryFormatter::LANG_SQL_FTS,
+ $mode,
+ 'first* second',
+ );
+ $cases[] = array(
+ 'first% second',
+ CRM_Utils_QueryFormatter::LANG_SQL_FTSBOOL,
+ $mode,
+ '+first* +second',
+ );
+ $cases[] = array(
+ 'first% second',
+ CRM_Utils_QueryFormatter::LANG_SOLR,
+ $mode,
+ 'first* second',
+ );
+ $cases[] = array(
+ 'first second%',
+ CRM_Utils_QueryFormatter::LANG_SQL_LIKE,
+ $mode,
+ 'first second%',
+ );
+ $cases[] = array(
+ 'first second%',
+ CRM_Utils_QueryFormatter::LANG_SQL_FTS,
+ $mode,
+ 'first second*',
+ );
+ $cases[] = array(
+ 'first second%',
+ CRM_Utils_QueryFormatter::LANG_SQL_FTSBOOL,
+ $mode,
+ '+first +second*',
+ );
+ $cases[] = array(
+ 'first second%',
+ CRM_Utils_QueryFormatter::LANG_SOLR,
+ $mode,
+ 'first second*',
+ );
}
return $cases;
}
/**
- * @param $text
- * @param $language
- * @param $mode
- * @param $expectedText
+ * @param string $text
+ * @param string $language
+ * @param string $mode
+ * @param string $expectedText
* @dataProvider dataProvider
*/
public function testFormat($text, $language, $mode, $expectedText) {
'Survey' => 'CiviCampaign',
);
- /* they are two types of missing APIs:
- - Those that are to be implemented
- (in some future version when someone steps in -hint hint-). List the entities in toBeImplemented[ {$action} ]
- Those that don't exist
- and that will never exist (eg an obsoleted Entity
- they need to be returned by the function toBeSkipped_{$action} (because it has to be a static method and therefore couldn't access a this->toBeSkipped)
- */
+ /**
+ * Set up function.
+ *
+ * There are two types of missing APIs:
+ * Those that are to be implemented
+ * (in some future version when someone steps in -hint hint-). List the entities in toBeImplemented[ {$action} ]
+ * Those that don't exist
+ * and that will never exist (eg an obsoleted Entity
+ * they need to be returned by the function toBeSkipped_{$action} (because it has to be a static method and therefore couldn't access a this->toBeSkipped)
+ */
public function setUp() {
parent::setUp();
$this->enableCiviCampaign();