SlugTranslatorInterface
in
Table of Contents
Methods
- idToSlug() : string|null
- Converts an id to a slug for the given locale.
- slugToId() : int|null
- Converts a slug to an id for the given locale.
Methods
idToSlug()
Converts an id to a slug for the given locale.
public
idToSlug(int $id, string $locale) : string|null
Parameters
- $id : int
- $locale : string
Return values
string|nullslugToId()
Converts a slug to an id for the given locale.
public
slugToId(string $slug, string $locale) : int|null
Parameters
- $slug : string
- $locale : string