private static function SecurepagesSettingsForm::explodeValues in Secure Pages 8
Explode $values and returned a clean array with options.
Parameters
string $values: Values as entered in the form, separated by newlines.
Return value
array Array formatted trimmed values with empty items removed.
File
- src/
Form/ SecurepagesSettingsForm.php, line 154 - Contains \Drupal\securepages\Form\SecurepagesSettingsForm.
Class
- SecurepagesSettingsForm
- Defines a form that configures forms module settings.
Namespace
Drupal\securepages\FormCode
private static function explodeValues($values) {
// Convert string to an array, trim whitespace on each item, remove
// empty items and reindex array for clean export.
return array_values(array_filter(array_map('trim', explode("\n", $values))));
}