Drupal modules for browsing and managing Fedora-based digital repositories.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

24 lines
539 B

<?php
namespace Drupal\islandora_advanced_search;
use Drupal\islandora_advanced_search\Form\SettingsForm;
/**
* Simple trait for accessing this modules configuration.
*/
trait GetConfigTrait {
/**
* Get a config setting or returns a default.
*
* @return string
* The config setting or default value.
*/
protected static function getConfig($config, $default) {
$settings = \Drupal::config(SettingsForm::CONFIG_NAME);
$value = $settings->get($config);
return !empty($value) ? $value : $default;
}
}