ModuleRouteSubscriber::explodeString

protected ModuleRouteSubscriber::explodeString($string, $separator = ',')

Explodes a string based on a separator.

Parameters

string $string: The string to explode.

string $separator: The string separator to explode with.

Return value

array An array of exploded (and trimmed) values.

File

core/lib/Drupal/Core/EventSubscriber/ModuleRouteSubscriber.php, line 75

Class

ModuleRouteSubscriber
A route subscriber to remove routes that depend on modules being enabled.

Namespace

Drupal\Core\EventSubscriber

Code

protected function explodeString($string, $separator = ',') {
  return array_filter(array_map('trim', explode($separator, $string)));
}
doc_Drupal
2016-10-29 09:29:27
Comments
Leave a Comment

Please login to continue.