*/
class CRM_Activity_Controller_Search extends CRM_Core_Controller {
+ /**
+ * @var string
+ */
protected $entity = 'Activity';
/**
$activityTypeDescription = NULL;
if ($this->_activityTypeId) {
- list($this->_activityTypeName, $activityTypeDescription) = CRM_Core_BAO_OptionValue::getActivityTypeDetails($this->_activityTypeId);
+ [$this->_activityTypeName, $activityTypeDescription] = CRM_Core_BAO_OptionValue::getActivityTypeDetails($this->_activityTypeId);
}
// Set activity type name and description to template.
foreach ($allTypes as $act) {
$url = 'civicrm/activity/add';
- if ($act['name'] == 'Email') {
+ if ($act['name'] === 'Email') {
if (!CRM_Utils_Mail::validOutBoundMail() || !$contactId) {
continue;
}
- list($name, $email, $doNotEmail, $onHold, $isDeceased) = CRM_Contact_BAO_Contact::getContactDetails($contactId);
+ [, $email, $doNotEmail, , $isDeceased] = CRM_Contact_BAO_Contact::getContactDetails($contactId);
if (!$doNotEmail && $email && !$isDeceased) {
$url = 'civicrm/activity/email/add';
$act['label'] = ts('Send an Email');
continue;
}
}
- elseif ($act['name'] == 'SMS') {
+ elseif ($act['name'] === 'SMS') {
if (!$contactId || !CRM_SMS_BAO_Provider::activeProviderCount() || !CRM_Core_Permission::check('send SMS')) {
continue;
}
CRM_Activity_BAO_Activity::retrieve($params, $defaults);
// Send activity type description to template.
- list(, $activityTypeDescription) = CRM_Core_BAO_OptionValue::getActivityTypeDetails($defaults['activity_type_id']);
+ [, $activityTypeDescription] = CRM_Core_BAO_OptionValue::getActivityTypeDetails($defaults['activity_type_id']);
$this->assign('activityTypeDescription', $activityTypeDescription);
if (!empty($defaults['mailingId'])) {
foreach ($allTags as $key => $dnc) {
$this->_name[] = $this->_tags[$key];
- list($total, $added, $notAdded) = CRM_Core_BAO_EntityTag::addEntitiesToTag($this->_activityHolderIds, $key,
+ [, $added, $notAdded] = CRM_Core_BAO_EntityTag::addEntitiesToTag($this->_activityHolderIds, $key,
'civicrm_activity', FALSE);
$status = [ts('Activity tagged', ['count' => $added, 'plural' => '%count activities tagged'])];
$tagList[$val] = 1;
}
else {
- list($label, $tagID) = explode(',', $val);
+ [, $tagID] = explode(',', $val);
$tagList[$tagID] = 1;
}
}
foreach ($allTags as $key => $dnc) {
$this->_name[] = $this->_tags[$key];
- list($total, $removed, $notRemoved) = CRM_Core_BAO_EntityTag::removeEntitiesFromTag($this->_activityHolderIds,
+ [, $removed, $notRemoved] = CRM_Core_BAO_EntityTag::removeEntitiesFromTag($this->_activityHolderIds,
$key, 'civicrm_activity', FALSE);
$status = [
$row['target_contact_name'] = CRM_Activity_BAO_ActivityContact::getNames($row['activity_id'], $targetID);
$row['assignee_contact_name'] = CRM_Activity_BAO_ActivityContact::getNames($row['activity_id'], $assigneeID);
- list($row['source_contact_name'], $row['source_contact_id']) = CRM_Activity_BAO_ActivityContact::getNames($row['activity_id'], $sourceID, TRUE);
+ [$row['source_contact_name'], $row['source_contact_id']] = CRM_Activity_BAO_ActivityContact::getNames($row['activity_id'], $sourceID, TRUE);
$row['source_contact_name'] = implode(',', array_values($row['source_contact_name']));
$row['source_contact_id'] = implode(',', $row['source_contact_id']);
$this->_pages = [];
$this->_pages['CRM_Activity_Form_Search'] = NULL;
- list($task) = $this->taskName($controller, 'Search');
+ [$task] = $this->taskName($controller, 'Search');
$this->_task = $task;
foreach ($task as $t) {
$this->_pages[$t] = NULL;
*/
class CRM_Activity_Task extends CRM_Core_Task {
+ /**
+ * @var string
+ */
public static $objectType = 'activity';
/**
$parseStreetAddress = $addressOptions['street_address_parsing'] ?? 0;
$form->assign('parseStreetAddress', $parseStreetAddress);
foreach ($elements as $name => $v) {
- list($title, $attributes, $select, $multiSelect) = $v;
+ [$title, $attributes, $select, $multiSelect] = $v;
if (in_array($name,
['street_number', 'street_name', 'street_unit']
*
* Create the necessary initial objects for a pcpBlock, then return the
* params needed to create the pcpBlock.
- *
*/
public function pcpBlockParams() {
$contribPage = CRM_Core_DAO::createTestObject('CRM_Contribute_DAO_ContributionPage');