Reference

Guide

page.changeNum:before

$page, $num

Example

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