From c6d3780d10d62263e07d709a66482cf90daf6768 Mon Sep 17 00:00:00 2001 From: Kurt Jensen Date: Thu, 9 Mar 2017 21:33:35 -0800 Subject: [PATCH 1/2] Allows Settings to be defined in YAML Allow settings array to be defined in the plugin.yaml file instead of just in php file. --- modules/system/classes/PluginBase.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/system/classes/PluginBase.php b/modules/system/classes/PluginBase.php index 48ade4de7..c5cc668de 100644 --- a/modules/system/classes/PluginBase.php +++ b/modules/system/classes/PluginBase.php @@ -138,7 +138,10 @@ class PluginBase extends ServiceProviderBase */ public function registerSettings() { - return []; + $configuration = $this->getConfigurationFromYaml(); + if (array_key_exists('settings', $configuration)) { + return $configuration['settings']; + } } /** From 0710418df74ea1639d2434644f527ba0b1d5eb0e Mon Sep 17 00:00:00 2001 From: Kurt Jensen Date: Fri, 10 Mar 2017 12:08:42 -0800 Subject: [PATCH 2/2] Converted all indents to spaces Converted all indents to spaces --- modules/system/classes/PluginBase.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/system/classes/PluginBase.php b/modules/system/classes/PluginBase.php index c5cc668de..10f80fb24 100644 --- a/modules/system/classes/PluginBase.php +++ b/modules/system/classes/PluginBase.php @@ -138,10 +138,10 @@ class PluginBase extends ServiceProviderBase */ public function registerSettings() { - $configuration = $this->getConfigurationFromYaml(); - if (array_key_exists('settings', $configuration)) { - return $configuration['settings']; - } + $configuration = $this->getConfigurationFromYaml(); + if (array_key_exists('settings', $configuration)) { + return $configuration['settings']; + } } /**