xiaowang/kirby/config/fields/mixins/pagepicker.php

15 lines
282 B
PHP
Raw Normal View History

2021-10-29 18:05:46 +02:00
<?php
use Kirby\Cms\PagePicker;
return [
'methods' => [
'pagepicker' => function (array $params = []) {
// inject the current model
$params['model'] = $this->model();
return (new PagePicker($params))->toArray();
}
]
];