Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AsciiSlugger.php

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\Slugger

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal