function _soft_length_widget_settings in Soft Length Limit 8
Returns the widget settings that can be used for a soft_length widget.
Return value
array An array of settings and default values for each textfield type.
2 calls to _soft_length_widget_settings()
File
- ./
soft_length_limit.module, line 23
Code
function _soft_length_widget_settings(string $plugin_id) : array {
$settings = [
'string_textfield' => [
'max_limit' => TRUE,
'minimum_limit' => TRUE,
'style_select' => TRUE,
],
'string_textarea' => [
'max_limit' => TRUE,
'minimum_limit' => TRUE,
'style_select' => TRUE,
],
'text_textfield' => [
'max_limit' => TRUE,
'minimum_limit' => TRUE,
'style_select' => TRUE,
],
'text_textarea' => [
'max_limit' => TRUE,
'minimum_limit' => TRUE,
'style_select' => TRUE,
],
'text_textarea_with_summary' => [
'max_limit' => TRUE,
'minimum_limit' => TRUE,
'style_select' => TRUE,
],
];
return $settings[$plugin_id] ?? [];
}