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

15 lines
280 B
PHP
Raw Normal View History

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