You are here

public static function FeedImportFilter::append in Feed Import 8

Same name in this branch
  1. 8 feed_import_base/filters/feed_import_default_filters.php \FeedImportFilter::append()
  2. 8 feed_import_base/src/Filter/FeedImportFilter.php \Drupal\feed_import_base\FeedImportFilter::append()

Append text

Parameters

mixed $field: A string or an array of strings

string $text: Text to append

Return value

mixed A string or an array of strings with text appended

File

feed_import_base/src/Filter/FeedImportFilter.php, line 385

Class

FeedImportFilter
This class contains default filters for feed import.

Namespace

Drupal\feed_import_base

Code

public static function append($field, $text) {
  if (is_array($field)) {
    foreach ($field as &$f) {
      $f = self::append($f, $text);
    }
    return $field;
  }
  return $field . $text;
}