FOF30\Utils\StringHelper::toSlug PHP Méthode

toSlug() public static méthode

Convert a string into a slug (alias), suitable for use in URLs. Please note that transliteration support is rudimentary at this stage.
Deprecation: 3.0 Use \JApplicationHelper::stringURLSafe instead
public static toSlug ( string $value ) : string
$value string A string to convert to slug
Résultat string The slug
    public static function toSlug($value)
    {
        if (class_exists('\\JLog')) {
            \JLog::add('FOF30\\Utils\\StringHelper::toSlug is deprecated. Use \\JApplicationHelper::stringURLSafe instead', \JLog::WARNING, 'deprecated');
        }
        if (!class_exists('\\JApplicationHelper')) {
            \JLoader::import('cms.application.helper');
        }
        return \JApplicationHelper::stringURLSafe($value);
    }