function AsciiSlugger::withEmoji
Parameters
bool|string $emoji true will use the same locale,: false will disable emoji, and a string to use a specific locale
File
-
vendor/
symfony/ string/ Slugger/ AsciiSlugger.php, line 92
Class
- AsciiSlugger
- @author Titouan Galopin <galopintitouan@gmail.com>
Namespace
Symfony\Component\String\SluggerCode
public function withEmoji(bool|string $emoji = true) : static {
if (false !== $emoji && !class_exists(EmojiTransliterator::class)) {
throw new \LogicException(\sprintf('You cannot use the "%s()" method as the "symfony/emoji" package is not installed. Try running "composer require symfony/emoji".', __METHOD__));
}
$new = clone $this;
$new->emoji = $emoji;
return $new;
}