Same name and namespace in other branches
  1. 5.0.x src/FormatAddonsName.php \Drupal\views_slideshow\FormatAddonsName

Provides a class to manipulate addons names.

Hierarchy

Expanded class hierarchy of FormatAddonsName

1 string reference to 'FormatAddonsName'
views_slideshow.services.yml dans ./views_slideshow.services.yml
views_slideshow.services.yml
1 service uses FormatAddonsName
views_slideshow.format_addons_name dans ./views_slideshow.services.yml
Drupal\views_slideshow\FormatAddonsName

Fichier

src/FormatAddonsName.php, line 8

Namespace

Drupal\views_slideshow
View 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

Titre Trier par ordre décroissant Modifiers Object type Résumé Overriden Title
FormatAddonsName::format public function Format callback to move from underscore separated words to camelCase. Overrides FormatAddonsNameInterface::format