Returns settings.
@param {String} [category] If passed, returns only the settings in the given category. Otherwise, returns all settings.
@returns {orion.settings.Setting[]}
509822
function(category) {
			var settingsMap = this.settingsMap;
			var pids = typeof category === 'string' ? this.categories[category] : Object.keys(settingsMap); //$NON-NLS-0$
			if (!pids) {
				return [];
			}
			return pids.map(function(pid) {
				return settingsMap[pid];
			});
		}
649187
function(category, filter) {
            var r = [];
            for (var i in this.registered_node_types) {
                var type = this.registered_node_types[i];
                if (filter && type.filter && type.filter != filter) {
                    continue;
                }

                if (category == "") {
                    if (type.category == null) {
                        r.push(type);
                    }
                } else if (type.category == category) {
                    r.push(type);
                }
            }

            return r;
        }
1229187
public function getCategoryConfig($category)
    {
        if (!array_key_exists($category, $this->config)) {
            $query = $this->entityManager->createQueryBuilder()
                ->select('config')
                ->from(
                    '\Reliv\RcmConfig\Entity\RcmConfig',
                    'config',
                    'config.id'
                )
                ->where('config.category = :category')
                ->getQuery();
            $query->setParameter('category', $category);

            $results = $query->getResult();
            $preparedResult = [];

            /**
             * @var                                   $context
             * @var \Reliv\RcmConfig\Entity\RcmConfig $item
             */
            foreach ($results as $id => $item) {
                $context = $item->getContext();
                if (!array_key_exists($context, $preparedResult)) {
                    $preparedResult[$context] = [];
                }
                $preparedResult[$context][$item->getName()] = $item->getValue();
            }

            $this->config[$category] = $preparedResult;
        }

        return $this->config[$category];
    }
816007
public function getCategory() : ?string 
    {
        if ( ! $this->hasCategory()) {
            $this->setCategory($this->getDefaultCategory());
        }
        return $this->category;
    }
1042831
public static List<Setting> categoriesToSettings(List<Category> categories) {
    return categories.stream()
        .map(Category::getGroups)     // get groups from categories
        .filter(Objects::nonNull)     // remove all null
        .flatMap(Collection::stream)  // recursively flatten all categories
        .map(Group::getSettings)      // get settings from groups
        .filter(Objects::nonNull)     // remove all null
        .flatMap(Collection::stream)  // recursively flatten all settings
        .collect(Collectors.toList());
  }
1028665
public function getCategory($category)
    {
        $ds = DIRECTORY_SEPARATOR;
        $categoryPath = str_replace('/', $ds, $category);

        $path = app_path().$ds.'lablog'.$ds.$categoryPath;

        if (!$this->exists($category)) {
            return (object) array();
        }

        $categoryExplode = explode('/', $category);
        $categoryName = end($categoryExplode);

        $linkPrefix = \Config::get('lablog::prefix') == '/' ? '' : \Config::get('lablog::prefix');

        $baseCategory = $category;
        $categoryLink = $linkPrefix.'/category/'.$category;
        $fullCategory = $category;

        $category = new Category;
        $category->name = $categoryName;
        $category->link = $baseCategory;
        $category->url = \URL::to($categoryLink);

        return $category;
    }
1116102
private function categories()
    {
        $package = Package::where('name', 'Core')->first();
        $core = ConfigCategory::create([
            'key' => 'core',
            'package_id' => $package->id
        ]);
        ConfigCategory::create([
            'key' => 'core_mail',
            'parent_id' => $core->id,
            'package_id' => $core->package_id
        ]);
        ConfigCategory::create([
            'key' => 'core_general',
            'parent_id' => $core->id,
            'package_id' => $core->package_id
        ]);
        $this->general();
        $this->mail();
    }
845639
def find_category(category_name, options = {})
      categories = self.categories
      if categories.is_a?(Array)
        categories.detect { |c| c['name'] == category_name }
      else
        raise "Could not retrieve categories: #{categories}"
      end
    end
509395
def _find_v1_settings(self, settings):
        

        if 'module_name' in settings:
            modname = settings['module_name']
        if 'modules' not in settings or len(settings['modules']) == 0:
            raise DataError("No modules defined in module_settings.json file")
        elif len(settings['modules']) > 1:
            raise DataError("Multiple modules defined in module_settings.json file",
                            modules=[x for x in settings['modules']])
        else:
            modname = list(settings['modules'])[0]

        if modname not in settings['modules']:
            raise DataError("Module name does not correspond with an entry in the modules directory",
                            name=modname, modules=[x for x in settings['modules']])

        release_info = self._load_release_info(settings)
        modsettings = settings['modules'][modname]
        architectures = settings.get('architectures', {})

        target_defs = settings.get('module_targets', {})
        targets = target_defs.get(modname, [])

        return TileInfo(modname, modsettings, architectures, targets, release_info)
91669
public static function get_category_extensions($categories)
    {
        if (empty($categories)) {
            return array();
        }

        // Fix arguments into a single array
        if (!is_array($categories)) {
            $categories = array($categories);
        } elseif (count($categories) === 1 && is_array(reset($categories))) {
            $categories = reset($categories);
        }

        // Check configured categories
        $appCategories = static::config()->get('app_categories');

        // Merge all categories into list of extensions
        $extensions = array();
        foreach (array_filter($categories) as $category) {
            if (isset($appCategories[$category])) {
                $extensions = array_merge($extensions, $appCategories[$category]);
            } else {
                throw new InvalidArgumentException("Unknown file category: $category");
            }
        }
        $extensions = array_unique($extensions);
        sort($extensions);
        return $extensions;
    }
1357142
function(setting) {
			if (typeof setting === "undefined") {
				if (typeof window !== "undefined") {
					if (typeof window.reckonSettings !== "undefined") {
						if (typeof window.reckonSettings.delimStart) {
							settings.delimStart = window.reckonSettings.delimStart;
						}
						if (typeof window.reckonSettings.delimEnd) {
							settings.delimEnd = window.reckonSettings.delimEnd;
						}
					}
				}
			} else {
				if (typeof setting.delimStart) {
					settings.delimStart = setting.delimStart;
				}
				if (typeof setting.delimEnd) {
					settings.delimEnd = setting.delimEnd;
				}
			}
			this.delimStart = settings.delimStart;
			this.delimEnd = settings.delimEnd;
			
			return this;
		}
624152
protected function getConstants($category = null)
    {
        if (!$category) {
            return \get_defined_constants();
        }

        $consts = \get_defined_constants(true);

        if ($category === 'internal') {
            unset($consts['user']);

            return \call_user_func_array('array_merge', $consts);
        }

        return isset($consts[$category]) ? $consts[$category] : [];
    }
318034
def get_settings(self, *args, **kwargs):
        
        url = self.reddit_session.config['wiki_page_settings']
        url = url.format(subreddit=six.text_type(self.subreddit),
                         page=self.page)
        return self.reddit_session.request_json(url, *args, **kwargs)['data']
79208
function (category) {
    return this.get('/getappsincategory', {
      // 'cc': this.options.country,
      // 'l': this.options.language,
      'category': category
    }).then(function (body) {
      console.log('getAppsInCategory - ', body)
      return Promise.resolve(body);
    });
  }
364403
function pickCategories() {
  var picked = [];
  var max = Math.floor(Math.random() * maxCategories);
  while(picked.length < max) {
    var category = pickCategory();
    if (picked.indexOf(category) === -1) {
      picked.push(category);
    }
  }
  return picked;
}
1003881
def get_settings(self, index):
        
        settings = self.es.indices.get_settings(index=index)
        return next(iter(settings.values()))
665171
function list(category){
	let list = [];

	if (category && typeof(category) === 'string') {
		list = _(goblin.ambush).filter(function(current) {
			return _.includes(current.category, category);
		}).map('id').value();
	} else {
		list = _(goblin.ambush).map('id').value();
	}
	
	return list;

}