Skip to content

Commit

Permalink
Merge pull request #14005 from colemanw/shortSettings
Browse files Browse the repository at this point in the history
[NFC] Short array syntax - auto convert settings dir
  • Loading branch information
eileenmcnaughton authored Apr 9, 2019
2 parents 824c92c + dfe1f88 commit 476cc43
Show file tree
Hide file tree
Showing 16 changed files with 576 additions and 576 deletions.
20 changes: 10 additions & 10 deletions settings/Address.setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
/**
* Settings metadata file
*/
return array(
'address_standardization_provider' => array(
return [
'address_standardization_provider' => [
'group_name' => 'Address Preferences',
'group' => 'address',
'name' => 'address_standardization_provider',
Expand All @@ -49,8 +49,8 @@
'is_contact' => 0,
'description' => NULL,
'help_text' => 'CiviCRM includes an optional plugin for interfacing with the United States Postal Services (USPS) Address Standardization web service. You must register to use the USPS service at https://www.usps.com/business/web-tools-apis/address-information.htm. If you are approved, they will provide you with a User ID and the URL for the service. Plugins for other address standardization services may be available from 3rd party developers. If installed, they will be included in the drop-down below. ',
),
'address_standardization_userid' => array(
],
'address_standardization_userid' => [
'group_name' => 'Address Preferences',
'group' => 'address',
'name' => 'address_standardization_userid',
Expand All @@ -63,8 +63,8 @@
'is_contact' => 0,
'description' => NULL,
'help_text' => NULL,
),
'address_standardization_url' => array(
],
'address_standardization_url' => [
'group_name' => 'Address Preferences',
'group' => 'address',
'name' => 'address_standardization_url',
Expand All @@ -78,8 +78,8 @@
'description' => NULL,
'help_text' => 'Web Service URL',
'validate_callback' => 'CRM_Utils_Rule::url',
),
'hideCountryMailingLabels' => array(
],
'hideCountryMailingLabels' => [
'group_name' => 'Address Preferences',
'group' => 'address',
'name' => 'hideCountryMailingLabels',
Expand All @@ -92,5 +92,5 @@
'is_contact' => 0,
'description' => 'Do not display the country field in mailing labels when the country is the same as that of the domain',
'help_text' => NULL,
),
);
],
];
12 changes: 6 additions & 6 deletions settings/Campaign.setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
* Settings metadata file
*/

return array(
'tag_unconfirmed' => array(
return [
'tag_unconfirmed' => [
'group_name' => 'Campaign Preferences',
'group' => 'campaign',
'name' => 'tag_unconfirmed',
Expand All @@ -49,8 +49,8 @@
'is_contact' => 0,
'description' => ts('If set, new contacts that are created when signing a petition are assigned a tag of this name.'),
'help_text' => '',
),
'petition_contacts' => array(
],
'petition_contacts' => [
'group_name' => 'Campaign Preferences',
'group' => 'campaign',
'name' => 'petition_contacts',
Expand All @@ -63,6 +63,6 @@
'is_contact' => 0,
'description' => ts('All contacts that have signed a CiviCampaign petition will be added to this group. The group will be created if it does not exist (it is required for email verification).'),
'help_text' => '',
),
],

);
];
44 changes: 22 additions & 22 deletions settings/Case.setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,71 +36,71 @@
/**
* Settings metadata file
*/
return array(
'civicaseRedactActivityEmail' => array(
return [
'civicaseRedactActivityEmail' => [
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'name' => 'civicaseRedactActivityEmail',
'type' => 'String',
'quick_form_type' => 'Select',
'html_type' => 'Select',
'html_attributes' => array(
'html_attributes' => [
//'class' => 'crm-select2',
),
],
'default' => 'default',
'add' => '4.7',
'title' => 'Redact Activity Email',
'is_domain' => 1,
'is_contact' => 0,
'pseudoconstant' => array(
'pseudoconstant' => [
'callback' => 'CRM_Case_Info::getRedactOptions',
),
],
'description' => 'Should activity emails be redacted? (Set "Default" to load setting from the legacy "Settings.xml" file.)',
'help_text' => '',
),
'civicaseAllowMultipleClients' => array(
],
'civicaseAllowMultipleClients' => [
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'name' => 'civicaseAllowMultipleClients',
'type' => 'String',
'quick_form_type' => 'Select',
'html_type' => 'Select',
'html_attributes' => array(
'html_attributes' => [
//'class' => 'crm-select2',
),
],
'default' => 'default',
'add' => '4.7',
'title' => 'Allow Multiple Case Clients',
'is_domain' => 1,
'is_contact' => 0,
'pseudoconstant' => array(
'pseudoconstant' => [
'callback' => 'CRM_Case_Info::getMultiClientOptions',
),
],
'description' => 'How many clients may be associated with a given case? (Set "Default" to load setting from the legacy "Settings.xml" file.)',
'help_text' => '',
),
'civicaseNaturalActivityTypeSort' => array(
],
'civicaseNaturalActivityTypeSort' => [
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'name' => 'civicaseNaturalActivityTypeSort',
'type' => 'String',
'quick_form_type' => 'Select',
'html_type' => 'Select',
'html_attributes' => array(
'html_attributes' => [
//'class' => 'crm-select2',
),
],
'default' => 'default',
'add' => '4.7',
'title' => 'Activity Type Sorting',
'is_domain' => 1,
'is_contact' => 0,
'pseudoconstant' => array(
'pseudoconstant' => [
'callback' => 'CRM_Case_Info::getSortOptions',
),
],
'description' => 'How to sort activity-types on the "Manage Case" screen? (Set "Default" to load setting from the legacy "Settings.xml" file.)',
'help_text' => '',
),
'civicaseActivityRevisions' => array(
],
'civicaseActivityRevisions' => [
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'name' => 'civicaseActivityRevisions',
Expand All @@ -114,5 +114,5 @@
'is_contact' => 0,
'description' => 'Enable tracking of activity revisions embedded within the "civicrm_activity" table. Alternatively, see "Administer => System Settings => Misc => Logging".',
'help_text' => '',
),
);
],
];
48 changes: 24 additions & 24 deletions settings/Contribute.setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
* Settings metadata file
*/

return array(
'cvv_backoffice_required' => array(
return [
'cvv_backoffice_required' => [
'group_name' => 'Contribute Preferences',
'group' => 'contribute',
'name' => 'cvv_backoffice_required',
Expand All @@ -48,31 +48,31 @@
'is_contact' => 0,
'description' => 'Is the CVV code required for back office credit card transactions',
'help_text' => 'If set it back-office credit card transactions will required a cvv code. Leave as required unless you have a very strong reason to change',
),
'contribution_invoice_settings' => array(
],
'contribution_invoice_settings' => [
// @todo our standard is to have a setting per item not to hide settings in an array with
// no useful metadata. Undo this setting.
'group_name' => 'Contribute Preferences',
'group' => 'contribute',
'name' => 'contribution_invoice_settings',
'type' => 'Array',
'default' => array(
'default' => [
'invoice_prefix' => 'INV_',
'credit_notes_prefix' => 'CN_',
'due_date' => '10',
'due_date_period' => 'days',
'notes' => '',
'tax_term' => 'Sales Tax',
'tax_display_settings' => 'Inclusive',
),
],
'add' => '4.7',
'title' => 'Contribution Invoice Settings',
'is_domain' => 1,
'is_contact' => 0,
'description' => NULL,
'help_text' => NULL,
),
'invoicing' => array(
],
'invoicing' => [
'group_name' => 'Contribute Preferences',
'group' => 'contribute',
'name' => 'invoicing',
Expand All @@ -84,11 +84,11 @@
'title' => 'Enable Tax and Invoicing',
'is_domain' => 1,
'is_contact' => 0,
'on_change' => array(
'on_change' => [
'CRM_Invoicing_Utils::onToggle',
),
),
'acl_financial_type' => array(
],
],
'acl_financial_type' => [
'group_name' => 'Contribute Preferences',
'group' => 'contribute',
'name' => 'acl_financial_type',
Expand All @@ -103,8 +103,8 @@
'description' => NULL,
'help_text' => NULL,
'help' => ['id' => 'acl_financial_type'],
),
'deferred_revenue_enabled' => array(
],
'deferred_revenue_enabled' => [
'group_name' => 'Contribute Preferences',
'group' => 'contribute',
'name' => 'deferred_revenue_enabled',
Expand All @@ -118,27 +118,27 @@
'is_contact' => 0,
'description' => NULL,
'help_text' => NULL,
),
'default_invoice_page' => array(
],
'default_invoice_page' => [
'group_name' => 'Contribute Preferences',
'group' => 'contribute',
'name' => 'default_invoice_page',
'type' => 'Integer',
'quick_form_type' => 'Select',
'default' => NULL,
'pseudoconstant' => array(
'pseudoconstant' => [
// @todo - handle table style pseudoconstants for settings & avoid deprecated function.
'callback' => 'CRM_Contribute_PseudoConstant::contributionPage',
),
],
'html_type' => 'select',
'add' => '4.7',
'title' => 'Default invoice payment page',
'is_domain' => 1,
'is_contact' => 0,
'description' => NULL,
'help_text' => NULL,
),
'always_post_to_accounts_receivable' => array(
],
'always_post_to_accounts_receivable' => [
'group_name' => 'Contribute Preferences',
'group' => 'contribute',
'name' => 'always_post_to_accounts_receivable',
Expand All @@ -152,8 +152,8 @@
'is_contact' => 0,
'description' => NULL,
'help_text' => NULL,
),
'update_contribution_on_membership_type_change' => array(
],
'update_contribution_on_membership_type_change' => [
'group_name' => 'Contribute Preferences',
'group' => 'contribute',
'name' => 'update_contribution_on_membership_type_change',
Expand All @@ -167,5 +167,5 @@
'is_contact' => 0,
'description' => 'Enabling this setting will update related contribution of membership(s) except if the membership is paid for with a recurring contribution.',
'help_text' => NULL,
),
);
],
];
Loading

0 comments on commit 476cc43

Please sign in to comment.