Same name in other branches
- 5.0.x src/FormatAddonsName.php \Drupal\views_slideshow\FormatAddonsName::format()
Format callback to move from underscore separated words to camelCase.
Overrides FormatAddonsNameInterface::format
File
-
src/
FormatAddonsName.php, line 13
Class
- 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);
}