Reference

Guide

page.changeStatus:before

$page, $status, $position

Example

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