Same name in other branches
- 8.x-4.x src/FormatAddonsName.php \Drupal\views_slideshow\FormatAddonsName::format()
Format callback to move from underscore separated words to camelCase.
Overrides FormatAddonsNameInterface::format
Fichier
-
src/
FormatAddonsName.php, line 13
Classe
- FormatAddonsName
- Provides a class to manipulate addons names.
Namespace
Drupal\views_slideshowCode
public function format($subject) {
return preg_replace_callback('/_(.?)/', function ($matches) {
if (isset($matches[1])) {
return strtoupper($matches[1]);
}
}, $subject);
}