Same name in other branches
- 5.0.x src/FormatAddonsName.php \Drupal\views_slideshow\FormatAddonsName
Provides a class to manipulate addons names.
Hierarchy
- class \Drupal\views_slideshow\FormatAddonsName implements \Drupal\views_slideshow\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
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
FormatAddonsName::format | public | function | Format callback to move from underscore separated words to camelCase. | Overrides FormatAddonsNameInterface::format |