Commit dfe1f88a authored by colemanw's avatar colemanw

Short array syntax - auto convert settings dir

parent f9e118bf
......@@ -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',
......@@ -49,8 +49,8 @@ return array(
'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',
......@@ -63,8 +63,8 @@ return array(
'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',
......@@ -78,8 +78,8 @@ return array(
'description' => NULL,
'help_text' => 'Web Service URL',
'validate_callback' => 'CRM_Utils_Rule::url',
),
'hideCountryMailingLabels' => array(
],
'hideCountryMailingLabels' => [
'group_name' => 'Address Preferences',
'group' => 'address',
'name' => 'hideCountryMailingLabels',
......@@ -92,5 +92,5 @@ return array(
'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,
),
);
],
];
......@@ -35,8 +35,8 @@
* Settings metadata file
*/
return array(
'tag_unconfirmed' => array(
return [
'tag_unconfirmed' => [
'group_name' => 'Campaign Preferences',
'group' => 'campaign',
'name' => 'tag_unconfirmed',
......@@ -49,8 +49,8 @@ return array(
'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',
......@@ -63,6 +63,6 @@ return array(
'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' => '',
),
],
);
];
......@@ -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',
......@@ -114,5 +114,5 @@ return array(
'is_contact' => 0,
'description' => 'Enable tracking of activity revisions embedded within the "civicrm_activity" table. Alternatively, see "Administer => System Settings => Misc => Logging".',
'help_text' => '',
),
);
],
];
......@@ -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',
......@@ -48,15 +48,15 @@ return array(
'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',
......@@ -64,15 +64,15 @@ return array(
'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',
......@@ -84,11 +84,11 @@ return array(
'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',
......@@ -103,8 +103,8 @@ return array(
'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',
......@@ -118,18 +118,18 @@ return array(
'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',
......@@ -137,8 +137,8 @@ return array(
'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',
......@@ -152,8 +152,8 @@ return array(
'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',
......@@ -167,5 +167,5 @@ return array(
'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,
),
);
],
];
This diff is collapsed.
......@@ -36,17 +36,17 @@
* Settings metadata file
*/
return array(
'assetCache' => array(
return [
'assetCache' => [
'group_name' => 'Developer Preferences',
'group' => 'developer',
'name' => 'assetCache',
'type' => 'String',
'quick_form_type' => 'Select',
'html_type' => 'Select',
'html_attributes' => array(
'html_attributes' => [
//'class' => 'crm-select2',
),
],
'default' => 'auto',
'add' => '4.7',
'title' => 'Asset Caching',
......@@ -54,11 +54,11 @@ return array(
'is_contact' => 0,
'description' => 'Store computed JS/CSS content in cache files? (Note: In "Auto" mode, the "Debug" setting will determine whether to activate the cache.)',
'help_text' => NULL,
'pseudoconstant' => array(
'pseudoconstant' => [
'callback' => '\Civi\Core\AssetBuilder::getCacheModes',
),
),
'userFrameworkLogging' => array(
],
],
'userFrameworkLogging' => [
'group_name' => 'Developer Preferences',
'group' => 'developer',
'name' => 'userFrameworkLogging',
......@@ -71,8 +71,8 @@ return array(
'is_contact' => 0,
'description' => "Set this value to Yes if you want CiviCRM error/debugging messages to appear in the Drupal error logs",
'help_text' => "Set this value to Yes if you want CiviCRM error/debugging messages the appear in your CMS' error log. In the case of Drupal, this will cause all CiviCRM error messages to appear in the watchdog (assuming you have Drupal's watchdog enabled)",
),
'debug_enabled' => array(
],
'debug_enabled' => [
'group_name' => 'Developer Preferences',
'group' => 'developer',
'name' => 'debug_enabled',
......@@ -86,8 +86,8 @@ return array(
'is_contact' => 0,
'description' => "Set this value to Yes if you want to use one of CiviCRM's debugging tools. This feature should NOT be enabled for production sites",
'help_text' => 'Do not turn this on on production sites',
),
'backtrace' => array(
],
'backtrace' => [
'group_name' => 'Developer Preferences',
'group' => 'developer',
'name' => 'backtrace',
......@@ -99,8 +99,8 @@ return array(
'is_domain' => 1,
'is_contact' => 0,
'description' => "Set this value to Yes if you want to display a backtrace listing when a fatal error is encountered. This feature should NOT be enabled for production sites",
),
'environment' => array(
],
'environment' => [
'group_name' => 'Developer Preferences',
'group' => 'developer',
'name' => 'environment',
......@@ -108,19 +108,19 @@ return array(
'html_type' => 'Select',
'quick_form_type' => 'Select',
'default' => 'Production',
'pseudoconstant' => array(
'pseudoconstant' => [
'optionGroupName' => 'environment',
),
],
'add' => '4.7',
'title' => 'Environment',
'is_domain' => 1,
'is_contact' => 0,
'description' => "Setting to define the environment in which this CiviCRM instance is running.",
'on_change' => array(
'on_change' => [
'CRM_Core_BAO_Setting::onChangeEnvironmentSetting',
),
),
'fatalErrorHandler' => array(
],
],
'fatalErrorHandler' => [
'group_name' => 'Developer Preferences',
'group' => 'developer',
'name' => 'fatalErrorHandler',
......@@ -133,5 +133,5 @@ return array(
'is_domain' => 1,
'is_contact' => 0,
'description' => "Enter the path and class for a custom PHP error-handling function if you want to override built-in CiviCRM error handling for your site.",
),
);
],
];
......@@ -36,8 +36,8 @@
* Settings metadata file
*/
return array(
'uploadDir' => array(
return [
'uploadDir' => [
'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().',
'group_name' => 'Directory Preferences',
'group' => 'directory',
......@@ -52,8 +52,8 @@ return array(
'is_contact' => 0,
'description' => NULL,
'help_text' => 'File system path where temporary CiviCRM files - such as import data files - are uploaded.',
),
'imageUploadDir' => array(
],
'imageUploadDir' => [
'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().',
'group_name' => 'Directory Preferences',
'group' => 'directory',
......@@ -68,8 +68,8 @@ return array(
'is_contact' => 0,
'description' => 'File system path where image files are uploaded. Currently, this path is used for images associated with premiums (CiviContribute thank-you gifts).',
'help_text' => NULL,
),
'customFileUploadDir' => array(
],
'customFileUploadDir' => [
'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().',
'group_name' => 'Directory Preferences',
'group' => 'directory',
......@@ -84,8 +84,8 @@ return array(
'is_contact' => 0,
'description' => 'Path where documents and images which are attachments to contact records are stored (e.g. contact photos, resumes, contracts, etc.). These attachments are defined using \'file\' type custom fields.',
'help_text' => NULL,
),
'customTemplateDir' => array(
],
'customTemplateDir' => [
'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().',
'group_name' => 'Directory Preferences',
'group' => 'directory',
......@@ -100,8 +100,8 @@ return array(
'is_contact' => 0,
'description' => 'Path where site specific templates are stored if any. This directory is searched first if set. Custom JavaScript code can be added to templates by creating files named templateFile.extra.tpl. (learn more...)',
'help_text' => NULL,
),
'customPHPPathDir' => array(
],
'customPHPPathDir' => [
'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().',
'group_name' => 'Directory Preferences',
'group' => 'directory',
......@@ -116,8 +116,8 @@ return array(
'is_contact' => 0,
'description' => 'Path where site specific PHP code files are stored if any. This directory is searched first if set.',
'help_text' => NULL,
),
'extensionsDir' => array(
],
'extensionsDir' => [
'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().',
'group_name' => 'Directory Preferences',
'group' => 'directory',
......@@ -132,6 +132,6 @@ return array(
'is_contact' => 0,
'description' => 'Path where CiviCRM extensions are stored.',
'help_text' => NULL,
),
],
);
];
......@@ -34,8 +34,8 @@
/**
* Settings metadata file
*/
return array(
'enable_cart' => array(
return [
'enable_cart' => [
'name' => 'enable_cart',
'group_name' => 'Event Preferences',
'settings_pages' => ['event' => ['weight' => 10]],
......@@ -50,8 +50,8 @@ return array(
'description' => ts('This feature allows users to register for more than one event at a time. When enabled, users will add event(s) to a "cart" and then pay for them all at once. Enabling this setting will affect online registration for all active events. The code is an alpha state, and you will potentially need to have developer resources to debug and fix sections of the codebase while testing and deploying it'),
'help_text' => '',
'documentation_link' => ['page' => 'CiviEvent Cart Checkout', 'resource' => 'wiki'],
),
'show_events' => array(
],
'show_events' => [
'name' => 'show_events',
'group_name' => 'Event Preferences',
'group' => 'event',
......@@ -67,5 +67,5 @@ return array(
'description' => ts('Configure how many events should be shown on the dashboard. This overrides the default value of 10 entries.'),
'help_text' => NULL,
'pseudoconstant' => ['callback' => 'CRM_Core_SelectValues::getDashboardEntriesCount'],
),
);
],
];
......@@ -35,17 +35,17 @@
/*
* Settings metadata file
*/
return array(
'ext_repo_url' => array(
return [
'ext_repo_url' => [
'group_name' => 'Extension Preferences',
'group' => 'ext',
'name' => 'ext_repo_url',
'type' => 'String',
'quick_form_type' => 'Element',
'html_attributes' => array(
'html_attributes' => [
'size' => 64,
'maxlength' => 128,
),
],
'html_type' => 'text',
'default' => 'https://civicrm.org/extdir/ver={ver}|cms={uf}',
'add' => '4.3',
......@@ -54,5 +54,5 @@ return array(
'is_contact' => 0,
'description' => '',
'help_text' => '',
),
);
],
];
This diff is collapsed.
This diff is collapsed.
......@@ -33,8 +33,8 @@
*
* Settings metadata file
*/
return array(
'geoAPIKey' => array(
return [
'geoAPIKey' => [
'add' => '4.7',
'help_text' => NULL,
'is_domain' => 1,
......@@ -45,15 +45,15 @@ return array(
'type' => 'String',
'quick_form_type' => 'Element',
'html_type' => 'text',
'html_attributes' => array(
'html_attributes' => [
'size' => '32',
'maxlength' => '64',
),
],
'default' => NULL,
'title' => 'Geo Provider Key',
'description' => 'Enter the API key or Application ID associated with your geocoding provider (not required for Yahoo).',
),
'geoProvider' => array(
],
'geoProvider' => [
'add' => '4.7',
'help_text' => NULL,
'is_domain' => 1,
......@@ -64,17 +64,17 @@ return array(
'type' => 'String',
'quick_form_type' => 'Select',
'html_type' => 'Select',
'html_attributes' => array(
'html_attributes' => [
'class' => 'crm-select2',
),
'pseudoconstant' => array(
],
'pseudoconstant' => [
'callback' => 'CRM_Core_SelectValues::geoProvider',
),
],
'default' => NULL,
'title' => 'Geocoding Provider',
'description' => 'This can be the same or different from the mapping provider selected.',
),
'mapAPIKey' => array(
],
'mapAPIKey' => [
'add' => '4.7',
'help_text' => NULL,
'is_domain' => 1,
......@@ -85,15 +85,15 @@ return array(
'type' => 'String',
'quick_form_type' => 'Element',
'html_type' => 'text',
'html_attributes' => array(
'html_attributes' => [
'size' => '32',
'maxlength' => '64',
),
],
'default' => NULL,
'title' => 'Map Provider Key',
'description' => 'Enter your API Key or Application ID. An API Key is required for the Google Maps API. Refer to developers.google.com for the latest information.',
),
'mapProvider' => array(
],
'mapProvider' => [
'add' => '4.7',
'help_text' => NULL,
'is_domain' => 1,
......@@ -104,14 +104,14 @@ return array(
'type' => 'String',
'quick_form_type' => 'Select',
'html_type' => 'Select',
'html_attributes' => array(
'html_attributes' => [
'class' => 'crm-select2',
),
'pseudoconstant' => array(
],
'pseudoconstant' => [
'callback' => 'CRM_Core_SelectValues::mapProvider',
),
],
'default' => NULL,
'title' => 'Mapping Provider',
'description' => 'Choose the mapping provider that has the best coverage for the majority of your contact addresses.',
),
);
],
];
......@@ -36,23 +36,23 @@
* Settings metadata file
*/
return array(
'default_renewal_contribution_page' => array(
return [
'default_renewal_contribution_page' => [
'group_name' => 'Member Preferences',
'group' => 'member',
'name' => 'default_renewal_contribution_page',
'type' => 'Integer',
'html_type' => 'select',
'default' => NULL,
'pseudoconstant' => array(
'pseudoconstant' => [
// @todo - handle table style pseudoconstants for settings & avoid deprecated function.
'callback' => 'CRM_Contribute_PseudoConstant::contributionPage',
),
],
'add' => '4.1',
'title' => 'Default online membership renewal page',
'is_domain' => 1,
'is_contact' => 0,
'description' => ts('If you select a default online contribution page for self-service membership renewals, a "renew" link pointing to that page will be displayed on the Contact Dashboard for memberships which were entered offline. You will need to ensure that the membership block for the selected online contribution page includes any currently available memberships.'),
'help_text' => NULL,
),
);
],
];
......@@ -35,8 +35,8 @@
* Settings metadata file
*/
return array(
'is_enabled' => array(
return [
'is_enabled' => [
'group_name' => 'Multi Site Preferences',
'group' => 'multisite',
'name' => 'is_enabled',
......@@ -50,23 +50,23 @@ return array(
'description' => ts('Make CiviCRM aware of multiple domains. You should configure a domain group if enabled'),
'documentation_link' => ['page' => 'Multi Site Installation', 'resource' => 'wiki'],
'help_text' => NULL,
),
'domain_group_id' => array(
],
'domain_group_id' => [
'group_name' => 'Multi Site Preferences',
'group' => 'multisite',
'name' => 'domain_group_id',
'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' => ['minimumInputLength' => 0]],
'default' => '0',
'add' => '4.1',
'is_domain' => 1,
'is_contact' => 0,
'description' => ts('Contacts created on this site are added to this group'),
'help_text' => NULL,
),
'event_price_set_domain_id' => array(
],
'event_price_set_domain_id' => [
'group_name' => 'Multi Site Preferences',
'group' => 'multisite',
'name' => 'event_price_set_domain_id',
......@@ -78,8 +78,8 @@ return array(
'is_contact' => 0,
'description' => '',
'help_text' => NULL,
),
'uniq_email_per_site' => array(
],
'uniq_email_per_site' => [
'group_name' => 'Multi Site Preferences',
'group' => 'multisite',
'name' => 'uniq_email_per_site',
......@@ -91,5 +91,5 @@ return array(
'is_contact' => 0,
'description' => '',
'help_text' => NULL,
),
);
],
];
......@@ -35,18 +35,18 @@
/*
* Settings metadata file
*/
return array(
'search_autocomplete_count' => array(
return [
'search_autocomplete_count' => [
'group_name' => 'Search Preferences',
'group' => 'Search Preferences',
'name' => 'search_autocomplete_count',
'type' => 'Integer',
'quick_form_type' => 'Element',
'html_type' => 'text',
'html_attributes' => array(
'html_attributes' => [
'size' => 2,
'maxlength' => 2,
),
],
'default' => 10,
'add' => '4.3',