You are here

protected function EasyEmailForm::explodeAndTrim in Easy Email 8

Same name and namespace in other branches
  1. 2.0.x src/Form/EasyEmailForm.php \Drupal\easy_email\Form\EasyEmailForm::explodeAndTrim()

Parameters

string $string:

string $delimiter:

Return value

array

File

src/Form/EasyEmailForm.php, line 443

Class

EasyEmailForm
Form controller for Email edit forms.

Namespace

Drupal\easy_email\Form

Code

protected function explodeAndTrim($string, $delimiter = ',') {
  $return = [];
  if (!empty($string)) {
    $return = explode($delimiter, $string);
    $return = array_filter(array_map('trim', $return));
  }
  return $return;
}