class FormatAddonsName in Views Slideshow 8.4
Provides a class to manipulate addons names.
Hierarchy
- class \Drupal\views_slideshow\FormatAddonsName implements FormatAddonsNameInterface
Expanded class hierarchy of FormatAddonsName
1 string reference to 'FormatAddonsName'
1 service uses FormatAddonsName
File
- src/
FormatAddonsName.php, line 8
Namespace
Drupal\views_slideshowView source
class FormatAddonsName implements FormatAddonsNameInterface {
/**
* Format callback to move from underscore separated words to camelCase.
*/
public function format($subject) {
return preg_replace_callback('/_(.?)/', function ($matches) {
if (isset($matches[1])) {
return strtoupper($matches[1]);
}
}, $subject);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FormatAddonsName:: |
public | function |
Format callback to move from underscore separated words to camelCase. Overrides FormatAddonsNameInterface:: |