/**
  * @param array $setting
  * @return mixed
  * @throws Exception
  */
 protected function settingGetType(array $setting)
 {
     if (!static::$types) {
         static::$types = ThemeSettingType::all()->keyBy('name');
     }
     if (!static::$types->has($setting['type'])) {
         throw new Exception('Invalid setting type provided');
     }
     return static::$types->get($setting['type']);
 }