Download the PHP package didweb/slug without Composer
On this page you can find all versions of the php package didweb/slug. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package slug
Short Description Creacion de slugs para url amigables
License GPLv3
Homepage https://github.com/Didweb
Informations about the package slug
:de: Slug
Dises ist ein kleine Script um Slug zu machen.
Installation.
Installation des Komponisten in der composer.json setzen ...
In der app/AppKernel.php put setzen ...
In der Konfigurationsdatei: app/config/config.yml ...
Beispiel Verwendung
Wenn Sie den Dienst im Controller Nutzung verwenden möchten es folgt ....
Der Standard-Code ist der Bindestrich - Separator. Sie können den Separator ändern, mit dem Sie, indem sie als Parameter in der clean Funktion wollen. Der Spacer ist ein optionaler Parameter so, wenn nicht spezifisch wird der Bindestrich - Standard.
Beispiel des Separators für eine Unterstreichungs modifizierende _:
:uk: Slug
It is a small script to make Slugs.
Installation
Installation using composer, put in composer.json file ...
In the app/AppKernel.php file put put ...
In the configuration file: app/config/config.yml import the service like this:
Example of use
When you want to use the service inside the controller use it as follows ....
The default code has the - half-dash as a separator. You can change the separator you want by passing it as a parameter in the cleaning function. The separator is an optional parameter so if you do not specify it you will have the default - by default.
Example modifying the separator by a dash under _:
:es: Slug
Es un pequeño script para realizar Slugs.
Instalación
Instalación mediante composer, poner en el archivo composer.json ...
En el archivo app/AppKernel.php poner poner...
En el archivo de configuración: app/config/config.yml importar el servicio de esta manera:
Ejemplo de uso
Cuando quieras utilizar el servicio dentro del controlador utilízalo de la siguiente manera....
El código por defecto tiene el guión medio - como separador. Puedes cambiar el separador por el que tu quieras pasándolo como un parámetro en la función clean. El separador es un parámetro opcional así que si no lo especificas tendrá el guión medio - por defecto.
Ejemplo modificando el separador por un guión bajo _: