public function Generator::wordList in Style Guide 8
Same name and namespace in other branches
- 2.x src/Generator.php \Drupal\styleguide\Generator::wordList()
Return a simple array of words.
Parameters
int $size: The size of the list to return.
int $words: The number of words to generate.
Return value
array An array of words.
Overrides GeneratorInterface::wordList
2 calls to Generator::wordList()
- Generator::tableHeader in src/
Generator.php - Return a random table header array.
- Generator::tableRows in src/
Generator.php - Return a random table row array.
File
- src/
Generator.php, line 60
Class
- Generator
- Class Generator.
Namespace
Drupal\styleguideCode
public function wordList($size = 5, $words = 3) {
$items = [];
for ($i = 0; $i < $size; $i++) {
$items[] = $this
->words($words, 'ucfirst');
}
return $items;
}