You are here

private function IsbnFormattedFormatter::format in ISBN Field 8

1 call to IsbnFormattedFormatter::format()
IsbnFormattedFormatter::viewElements in src/Plugin/Field/FieldFormatter/IsbnFormattedFormatter.php
Builds a renderable array for a field value.

File

src/Plugin/Field/FieldFormatter/IsbnFormattedFormatter.php, line 49

Class

IsbnFormattedFormatter
Plugin implementation of the 'isbn_formatted_formatter' formatter.

Namespace

Drupal\isbn\Plugin\Field\FieldFormatter

Code

private function format($isbn_number) {
  $isbn_tools = \Drupal::service("isbn.isbn_service");
  return $isbn_tools
    ->format($isbn_number);
}