From af00ced57cbbb8b58570f2f6a297b1b1ca203d20 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sun, 17 Feb 2019 22:55:21 -0500 Subject: [PATCH] Use PascalCase with CRM_Core_Form::addEntityRef Although entityRef fields accept either snake_case or CamelCase, let's be consistent. --- CRM/Campaign/BAO/Campaign.php | 2 +- CRM/Campaign/Form/Petition.php | 2 +- CRM/Campaign/Form/Survey/Main.php | 2 +- CRM/Case/Form/AddToCaseAsRole.php | 2 +- CRM/Core/BAO/CustomField.php | 2 +- CRM/Core/Form/Tag.php | 2 +- CRM/Event/BAO/Query.php | 4 ++-- CRM/Event/Form/ManageEvent/Conference.php | 2 +- CRM/Event/Form/Participant.php | 2 +- CRM/Report/Form/Event/ParticipantListCount.php | 2 +- CRM/Report/Form/Event/ParticipantListing.php | 2 +- settings/Multisite.setting.php | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CRM/Campaign/BAO/Campaign.php b/CRM/Campaign/BAO/Campaign.php index 9f6416dff1..77440fa746 100644 --- a/CRM/Campaign/BAO/Campaign.php +++ b/CRM/Campaign/BAO/Campaign.php @@ -599,7 +599,7 @@ INNER JOIN civicrm_group grp ON ( grp.id = campgrp.entity_id ) if ($connectedCampaignId || ($isCampaignEnabled && $hasAccessCampaign)) { $showAddCampaign = TRUE; $campaign = $form->addEntityRef('campaign_id', ts('Campaign'), [ - 'entity' => 'campaign', + 'entity' => 'Campaign', 'create' => TRUE, 'select' => ['minimumInputLength' => 0], ]); diff --git a/CRM/Campaign/Form/Petition.php b/CRM/Campaign/Form/Petition.php index d04659c297..e1e005eda0 100644 --- a/CRM/Campaign/Form/Petition.php +++ b/CRM/Campaign/Form/Petition.php @@ -191,7 +191,7 @@ class CRM_Campaign_Form_Petition extends CRM_Core_Form { $this->add('wysiwyg', 'instructions', ts('Introduction'), $attributes['instructions']); $this->addEntityRef('campaign_id', ts('Campaign'), [ - 'entity' => 'campaign', + 'entity' => 'Campaign', 'create' => TRUE, 'select' => ['minimumInputLength' => 0], ]); diff --git a/CRM/Campaign/Form/Survey/Main.php b/CRM/Campaign/Form/Survey/Main.php index 2ef5899ad9..901981ab07 100644 --- a/CRM/Campaign/Form/Survey/Main.php +++ b/CRM/Campaign/Form/Survey/Main.php @@ -130,7 +130,7 @@ class CRM_Campaign_Form_Survey_Main extends CRM_Campaign_Form_Survey { $this->addSelect('activity_type_id', array('option_url' => 'civicrm/admin/campaign/surveyType'), TRUE); $this->addEntityRef('campaign_id', ts('Campaign'), [ - 'entity' => 'campaign', + 'entity' => 'Campaign', 'create' => TRUE, 'select' => ['minimumInputLength' => 0], ]); diff --git a/CRM/Case/Form/AddToCaseAsRole.php b/CRM/Case/Form/AddToCaseAsRole.php index d62dd92ad1..af02512fdd 100644 --- a/CRM/Case/Form/AddToCaseAsRole.php +++ b/CRM/Case/Form/AddToCaseAsRole.php @@ -23,7 +23,7 @@ class CRM_Case_Form_AddToCaseAsRole extends CRM_Contact_Form_Task { $this->addEntityRef( 'assign_to', ts('Assign to'), - array('entity' => 'case'), + array('entity' => 'Case'), TRUE ); diff --git a/CRM/Core/BAO/CustomField.php b/CRM/Core/BAO/CustomField.php index 8e08547b32..988cbdb67a 100644 --- a/CRM/Core/BAO/CustomField.php +++ b/CRM/Core/BAO/CustomField.php @@ -1093,7 +1093,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField { else { // FIXME: This won't work with customFieldOptions hook $attributes += array( - 'entity' => 'option_value', + 'entity' => 'OptionValue', 'placeholder' => $placeholder, 'multiple' => $search, 'api' => array( diff --git a/CRM/Core/Form/Tag.php b/CRM/Core/Form/Tag.php index 0ff005ca95..b47d0779ca 100644 --- a/CRM/Core/Form/Tag.php +++ b/CRM/Core/Form/Tag.php @@ -78,7 +78,7 @@ class CRM_Core_Form_Tag { $tagset[$tagsetItem]['tagsetElementName'] = $tagsetElementName; $form->addEntityRef("{$tagsetElementName}[{$parentId}]", $parentNameItem, array( - 'entity' => 'tag', + 'entity' => 'Tag', 'multiple' => TRUE, 'create' => !$skipTagCreate, 'api' => array('params' => array('parent_id' => $parentId)), diff --git a/CRM/Event/BAO/Query.php b/CRM/Event/BAO/Query.php index 1c5c9a0ecf..e43e38377c 100644 --- a/CRM/Event/BAO/Query.php +++ b/CRM/Event/BAO/Query.php @@ -581,14 +581,14 @@ class CRM_Event_BAO_Query extends CRM_Core_BAO_Query { $form->assign('dataURLEventFee', $dataURLEventFee); $form->addEntityRef('event_id', ts('Event Name'), array( - 'entity' => 'event', + 'entity' => 'Event', 'placeholder' => ts('- any -'), 'multiple' => 1, 'select' => array('minimumInputLength' => 0), ) ); $form->addEntityRef('event_type_id', ts('Event Type'), array( - 'entity' => 'option_value', + 'entity' => 'OptionValue', 'placeholder' => ts('- any -'), 'select' => array('minimumInputLength' => 0), 'api' => array( diff --git a/CRM/Event/Form/ManageEvent/Conference.php b/CRM/Event/Form/ManageEvent/Conference.php index cf6eee93c0..cd4b3e67e6 100644 --- a/CRM/Event/Form/ManageEvent/Conference.php +++ b/CRM/Event/Form/ManageEvent/Conference.php @@ -57,7 +57,7 @@ class CRM_Event_Form_ManageEvent_Conference extends CRM_Event_Form_ManageEvent { ); $this->addEntityRef('parent_event_id', ts('Parent Event'), array( - 'entity' => 'event', + 'entity' => 'Event', 'placeholder' => ts('- any -'), 'select' => array('minimumInputLength' => 0), ) diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index fdb9cacd84..ee2621e601 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -635,7 +635,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment } $eventFieldParams = array( - 'entity' => 'event', + 'entity' => 'Event', 'select' => array('minimumInputLength' => 0), 'api' => array( 'extra' => array('campaign_id', 'default_role_id', 'event_type_id'), diff --git a/CRM/Report/Form/Event/ParticipantListCount.php b/CRM/Report/Form/Event/ParticipantListCount.php index 1bae9c1341..2642f1abcc 100644 --- a/CRM/Report/Form/Event/ParticipantListCount.php +++ b/CRM/Report/Form/Event/ParticipantListCount.php @@ -238,7 +238,7 @@ class CRM_Report_Form_Event_ParticipantListCount extends CRM_Report_Form_Event { 'operatorType' => CRM_Report_Form::OP_ENTITYREF, 'type' => CRM_Utils_Type::T_INT, 'attributes' => array( - 'entity' => 'event', + 'entity' => 'Event', 'select' => array('minimumInputLength' => 0), ), ), diff --git a/CRM/Report/Form/Event/ParticipantListing.php b/CRM/Report/Form/Event/ParticipantListing.php index 33a7a17329..7af206a7ff 100644 --- a/CRM/Report/Form/Event/ParticipantListing.php +++ b/CRM/Report/Form/Event/ParticipantListing.php @@ -180,7 +180,7 @@ class CRM_Report_Form_Event_ParticipantListing extends CRM_Report_Form_Event { 'operatorType' => CRM_Report_Form::OP_ENTITYREF, 'type' => CRM_Utils_Type::T_INT, 'attributes' => array( - 'entity' => 'event', + 'entity' => 'Event', 'select' => array('minimumInputLength' => 0), ), ), diff --git a/settings/Multisite.setting.php b/settings/Multisite.setting.php index 7325a95b18..6f4770bba1 100644 --- a/settings/Multisite.setting.php +++ b/settings/Multisite.setting.php @@ -58,7 +58,7 @@ return array( 'title' => ts('Multisite Domain Group'), 'type' => 'Integer', 'html_type' => 'entity_reference', - 'entity_reference_options' => ['entity' => 'group', 'select' => array('minimumInputLength' => 0)], + 'entity_reference_options' => ['entity' => 'Group', 'select' => array('minimumInputLength' => 0)], 'default' => '0', 'add' => '4.1', 'is_domain' => 1, -- 2.25.1