CoolCMS API

SlugTranslatorInterface

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|null

slugToId()

Converts a slug to an id for the given locale.

public slugToId(string $slug, string $locale) : int|null
Parameters
$slug : string
$locale : string
Return values
int|null
On this page

Search results