private function RemoveHttpHeadersSettings::convertHeadersToRemoveValueToArray in Remove HTTP headers 8
Converts the value of the headers to remove textarea to an array.
Parameters
string $headersToRemoveValue: The value of the headers to remove textarea.
Return value
array Array with item for each textarea line.
2 calls to RemoveHttpHeadersSettings::convertHeadersToRemoveValueToArray()
- RemoveHttpHeadersSettings::submitForm in src/
Form/ RemoveHttpHeadersSettings.php - We cannot add a return typehint or add a return type. Because of the interface / PHPCS rule "Drupal.Commenting.FunctionComment.VoidReturn".
- RemoveHttpHeadersSettings::validateForm in src/
Form/ RemoveHttpHeadersSettings.php - We cannot add a return typehint or add a return type. Because of the interface / PHPCS rule "Drupal.Commenting.FunctionComment.VoidReturn".
File
- src/
Form/ RemoveHttpHeadersSettings.php, line 134
Class
- RemoveHttpHeadersSettings
- Form for the module settings.
Namespace
Drupal\remove_http_headers\FormCode
private function convertHeadersToRemoveValueToArray($headersToRemoveValue) {
// Convert string to array and trim empty values and spaces.
return array_filter(array_map('trim', explode(PHP_EOL, $headersToRemoveValue)));
}