You are here

private function ItemHistory::formatNotes in Library 8

Format notes.

Parameters

string $data: Unescaped data.

Return value

array Render array.

1 call to ItemHistory::formatNotes()
ItemHistory::showHistoryForItem in src/Controller/ItemHistory.php
History for one item.

File

src/Controller/ItemHistory.php, line 127

Class

ItemHistory
Item history controller.

Namespace

Drupal\library\Controller

Code

private function formatNotes($data) {
  $escaped = [
    '#markup' => nl2br($data),
  ];
  $formatted = \Drupal::service('renderer')
    ->render($escaped);
  return $formatted;
}