protected function ModuleRouteSubscriber::explodeString in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/EventSubscriber/ModuleRouteSubscriber.php \Drupal\Core\EventSubscriber\ModuleRouteSubscriber::explodeString()
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.
1 call to ModuleRouteSubscriber::explodeString()
- ModuleRouteSubscriber::alterRoutes in core/
lib/ Drupal/ Core/ EventSubscriber/ ModuleRouteSubscriber.php - Alters existing routes for a specific collection.
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\EventSubscriberCode
protected function explodeString($string, $separator = ',') {
return array_filter(array_map('trim', explode($separator, $string)));
}