public function NameGeneratorInterface::generateSampleNames in Name Field 8
Service to generate random names.
Parameters
int $limit: The number to generate.
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition if in context.
Return value
array An array of name components.
1 method overrides NameGeneratorInterface::generateSampleNames()
- NameGenerator::generateSampleNames in src/
NameGenerator.php - Service to generate random names.
File
- src/
NameGeneratorInterface.php, line 23
Class
- NameGeneratorInterface
- Provides an interface for the various functions required for the examples.
Namespace
Drupal\nameCode
public function generateSampleNames($limit = 3, FieldDefinitionInterface $field_definition = NULL);