Same name and namespace in other branches
  1. 5.0.x src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::formatList() 1 commentaire
  2. 8.x-2.x src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::formatList() 1 commentaire
  3. 8.x-3.x src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::formatList() 1 commentaire
  4. 8.x-4.x src/Form/InfoForm.php \Drupal\advagg\Form\InfoForm::formatList() 1 commentaire

Format an indented list from array.

Paramètres

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

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

Return value

string The imploded and spaced array.

Fichier

src/Form/InfoForm.php, line 164

Classe

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;
}