public function FormatAddonsName::format in Views Slideshow 8.4
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);
}