You are here

private function InfoForm::formatList in Advanced CSS/JS Aggregation 8.4

Same name and namespace in other branches
  1. 8.2 src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::formatList()
  2. 8.3 src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::formatList()

Format an indented list from array.

Parameters

array $list: The array to convert to a string.

int $depth: (optional) Depth multiplier for indentation.

Return value

string The imploded and spaced array.

1 call to InfoForm::formatList()
InfoForm::buildForm in src/Form/InfoForm.php
Form constructor.

File

src/Form/InfoForm.php, line 185

Class

InfoForm
View AdvAgg information for this site.

Namespace

Drupal\advagg\Form

Code

private function formatList(array $list, $depth = 1) {
  $spacer = '<br />' . str_repeat('&nbsp;', 2 * $depth);
  $output = $spacer . Xss::filter(implode($spacer, $list), [
    'br',
  ]);
  return $output;
}