function UpdateSettingsForm::multiLineStringToArray

Same name in other branches
  1. 10 core/modules/update/src/UpdateSettingsForm.php \Drupal\update\UpdateSettingsForm::multiLineStringToArray()

Prepares the submitted value to be stored in the notify_emails property.

Parameters

string $value: The submitted value.

Return value

array The value to be stored in config.

File

core/modules/update/src/UpdateSettingsForm.php, line 128

Class

UpdateSettingsForm
Configure update settings for this site.

Namespace

Drupal\update

Code

public static function multiLineStringToArray(string $value) : array {
    return array_map('trim', explode("\n", trim($value)));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.