Plugin Settings: Attribute Types, and how to receive 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' =&gt; [
     'change_team' =&gt; false,
     'change_series' =&gt; false,
     'change_user_settings' =&gt; false,
],


In my plugin file (pluginHandlePlugin.php) I see I can do something like this:

protected function defineSettings()
{
    return array(
        'pluginSettings1'   =&gt; array(AttributeType::Mixed, 'active_features' =&gt; array('change_team' =&gt; false, 'change_series' =&gt; false, 'change_user_settings' =&gt; false)),
    );
}


And getting those values through the service file works like:

public function getPluginSettings()
{
$plugin = craft()-&gt;plugins-&gt;getPlugin('pluginHandle');
$settings = $plugin-&gt;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-&gt;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!
As far as accessing the value of the setting, try: 

$plugin = craft()-&gt;plugins-&gt;getPlugin('pluginHandle');
$plugin-&gt;getSettings()-&gt;getAttribute('pluginSettings1');


If you need to access your settings throughout your services file you might also create a global variable.

class PluginHandleService extends BaseApplicationComponent
{
    public $settings = array();

    public function __construct()
    {
        $this-&gt;settings = $this-&gt;initSettings();
    }

    private function initSettings()
    {
        $plugin = craft()-&gt;plugins-&gt;getPlugin('pluginHandle');

        $settings = array();
        $settings['pluginSettings1'] = $plugin-&gt;getSettings()-&gt;getAttribute('pluginSettings1');

        return $settings;
    }

    // other service methods

}


Which you can then access like this:

$this-&gt;settings['pluginSettings1']


Thanks to André Elvan for help on setting up a constructor.

Update

As far as assigning a value however, I think you may have to use the 'default' property. In the past I have successfully done this with strings like so:

protected function defineSettings()
{
    return array(
        'pluginSettings1' =&gt; array(AttributeType::String, 'default' =&gt; "value"),
}


I presume you could do the same with 'Mixed', although never tried:

protected function defineSettings()
{
    return array(
        'pluginSettings1' =&gt; array(AttributeType::Mixed, 'default' =&gt; 'active_features' =&gt; array('change_team' =&gt; false, 'change_series' =&gt; false, 'change_user_settings' =&gt; false))),
}


It might make more sense to break the array into individual settings, however.

protected function defineSettings()
{
    return array(
        'change_team'          =&gt; array(AttributeType::Bool, 'default' =&gt; 'false',
        'change_series'        =&gt; array(AttributeType::Bool, 'default' =&gt; 'false',
        'change_user_settings' =&gt; array(AttributeType::Bool, 'default' =&gt; 'false',
    ),
}