$_enabled : boolean
Allows entities to have a unique
$_defaultConfig : array
label: Set to the field name that contains the string from where to
generate the slug, or a set of field names to concatenate for generating
title by default.
slug: Name of the field name that holds generated slugs.
slug by default.
separator: Separator char.
- by default. e.g.:
on: When to generate new slugs.
both (by default).
length: Maximum length the generated slug can have. default to 200.
beforeSave(\Cake\Event\Event $event, \Cake\ORM\Entity $entity, array $options) : boolean
Run before a model is saved, used to set up slug for model.
The event that was triggered
The entity being saved
Array of options for the save operation
When some of the specified columns in config's "label" is not present in the entity being saved
True if save should proceed, false otherwise
_slug(string $string, \Cake\ORM\Entity $entity) : string
Generate a slug for the given string and entity.
The generated slug is unique on the whole table.
string from where to generate slug
The entity for which generate the slug
Slug for given string