Reference

Guide

page.changeSlug:before

$page, $slug

Example

/site/config/config.php
return [
    'hooks' => [
        'page.changeSlug:before' => function ($page, $slug) {
            // your code goes here
        }
    ]
]