You are here

protected function NameFormatter::getListSettings in Name Field 8

Helper function to load and get the format list settings.

Parameters

string $format: The ID of the preferred format to use. This will fallback to the default format if the format can not be loaded.

Return value

array The settings to use to format the list.

1 call to NameFormatter::getListSettings()
NameFormatter::formatList in src/NameFormatter.php
Formats a list of author information.

File

src/NameFormatter.php, line 239

Class

NameFormatter
Primary name formatter for an array of name components.

Namespace

Drupal\name

Code

protected function getListSettings($format) {

  /* @var \Drupal\name\Entity\NameListFormat $listFormat */
  $listFormat = $this->listFormatStorage
    ->load($format);
  if (!$format) {
    $listFormat = $this->listFormatStorage
      ->load('default');
  }
  return $listFormat
    ->listSettings();
}