actuel-inactuel/site/plugins/web2print/index.php
2026-03-09 10:14:25 +01:00

33 lines
810 B
PHP

<?php
Kirby::plugin('studio-variable/web2print', [
'fields' => [
'web2print' => [
'props' => [
'cssPath' => function($cssPath = null) {
return $cssPath;
}
],
'computed' => [
'htmlPageString' => function() {
return $this->model()->render();
},
'cssPath' => function() {
return $this->cssPath ?? 'assets/css/style.css';
},
'printFormat' => function() {
return $this->model()->printFormat()->value() ?? 'A4';
},
'pageId' => function() {
return $this->model()->id();
}
]
]
],
'routes' => [
require __DIR__ . '/src/routes/web2print.php',
],
'blueprints' => [
'tabs/web2print' => __DIR__ . '/src/blueprints/tabs/web2print.yml'
]
]);