function _simplify_get_config_value in Simplify 8
Gets an array representing the configuration form values.
Parameters
string $config_key: The configuration name to be retrieved.
object $default: A default value.
Return value
array An array representing the configuration or empty array if the configuration is not applicable.
15 calls to _simplify_get_config_value()
- SimplifyAdminForm::buildForm in src/
Form/ SimplifyAdminForm.php - Form constructor.
- simplify_field_widget_comment_default_form_alter in ./
simplify.module - Implements hook_field_widget_WIDGET_TYPE_form_alter().
- simplify_form_block_content_form_alter in ./
simplify.module - Implements hook_form_FORM_ID_alter() for block_add_block_form().
- simplify_form_block_content_type_edit_form_alter in ./
simplify.module - Implements hook_form_FORM_ID_alter() for block_content_type_edit_form().
- simplify_form_block_form_alter in ./
simplify.module - Implements hook_form_FORM_ID_alter() for block_form().
File
- ./
simplify.module, line 647 - Hooks implemented by the simplify module.
Code
function _simplify_get_config_value($config_key, $default = [], $config_name = 'simplify.global') {
$simplify_config = \Drupal::config($config_name);
$value = $simplify_config
->get($config_key);
return !empty($value) ? $value : $default;
}