src/Model/Behavior/SluggableBehavior.php
public function slug(Entity $entity)
    {
        $config = $this->config();
        $value = $entity->get($config['field']);
        $entity->set($config['slug'], strtolower(Inflector::slug($value, $config['replacement'])));
    }
public function slug(Entity $entity)
    {
        $config = $this->config();
        $value = $entity->get($config['field']);
        $entity->set($config['slug'], strtolower(Inflector::slug($value, $config['replacement'])));
    }
Slug a field passed in the default config with its replacement.

@param \Cake\ORM\Entity $entity The entity that is going to be updated.

@return void