I want the admin to select one of the child of a parent in "page reference" as radio buttons, but it comes out empty
here is my hook in site/ready.php
$wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) {
if ($event->object->hasField == 'childLinks') {
$page = $event->arguments('page');
$parent = "parent=" . $page->path;
$event->return = $event->pages->find($parent);
}
});