You are here

public static function SuggestionHelper::getConfig in Autocomplete Search Suggestions 3.0.x

Same name and namespace in other branches
  1. 8.2 src/SuggestionHelper.php \Drupal\suggestion\SuggestionHelper::getConfig()
  2. 8 src/SuggestionHelper.php \Drupal\suggestion\SuggestionHelper::getConfig()

Configuration get wrapper.

Parameters

string $key: The field name.

Return value

mixed The value of the supplied field.

15 calls to SuggestionHelper::getConfig()
SuggestionAdminForm::buildForm in src/Form/SuggestionAdminForm.php
The suggestion configuration form.
SuggestionAdminForm::getAutocomplete in src/Form/SuggestionAdminForm.php
Build an autocomplete form ID to field name hash.
SuggestionAdminForm::submitForm in src/Form/SuggestionAdminForm.php
Submit function for the suggestion configuration form.
SuggestionBlock::blockForm in src/Plugin/Block/SuggestionBlock.php
SuggestionBlock::defaultConfiguration in src/Plugin/Block/SuggestionBlock.php

... See full list

File

src/SuggestionHelper.php, line 105

Class

SuggestionHelper
Provides helper methods for suggestions.

Namespace

Drupal\suggestion

Code

public static function getConfig($key = '') {
  $cfg =& drupal_static(__CLASS__ . '_' . __FUNCTION__, \Drupal::configFactory()
    ->get('suggestion.config'));
  return $key ? $cfg
    ->get($key) : (object) $cfg
    ->get();
}