You are here

class FormatAddonsName in Views Slideshow 8.4

Provides a class to manipulate addons names.

Hierarchy

Expanded class hierarchy of FormatAddonsName

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

File

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

Namesort descending Modifiers Type Description Overrides
FormatAddonsName::format public function Format callback to move from underscore separated words to camelCase. Overrides FormatAddonsNameInterface::format