You are here

protected function PlainStringFormatter::explode in String field formatter 2.0.x

Parameters

string $text:

Return value

string[]

1 call to PlainStringFormatter::explode()
PlainStringFormatter::prepareClasses in src/Plugin/Field/FieldFormatter/PlainStringFormatter.php

File

src/Plugin/Field/FieldFormatter/PlainStringFormatter.php, line 150

Class

PlainStringFormatter
Plugin implementation of the 'plain_string_formatter' formatter.

Namespace

Drupal\string_field_formatter\Plugin\Field\FieldFormatter

Code

protected function explode($text) {
  return preg_split('/[,\\s]+/', $text, -1, PREG_SPLIT_NO_EMPTY);
}