I have two small arrays I want to store in my plugin settings, though I'm stuck at what the AttributeType:: should be, as well as how to retrieve the actual values. The arrays I want to store look like:
'active_features' => [
'change_team' => false,
'change_series' => false,
'change_user_settings' => false,
],
In my plugin file (pluginHandlePlugin.php) I see I can do something like this:
protected function defineSettings()
{
return array(
'pluginSettings1' => array(AttributeType::Mixed, 'active_features' => array('change_team' => false, 'change_series' => false, 'change_user_settings' => false)),
);
}
And getting those values through the service file works like:
public function getPluginSettings()
{
$plugin = craft()->plugins->getPlugin('pluginHandle');
$settings = $plugin->getSettings();
return $settings;
}
Which works, and returns the object for me. However I'm unable to get to the actual key/values from the original array, I've tried:
return $settings->pluginSettings1;
But that returns NULL
So, how do I retrieve the keys/values, and also, what is the best AttributeType:: to set for this? I've looked around for AttributeType:: options and details but didn't find anything.
Any help would be GREAT! Thanks!