Yassine Doghri adbc7e78c0 feat(plugins): abstract settings form for general, podcast and episode types
update filter permission logic for replacing router param
2024-05-28 10:14:10 +00:00

40 lines
829 B
PHP

<?= $this->extend('_layout') ?>
<?= $this->section('title') ?>
<?= lang('Plugins.settings', [
'pluginName' => $plugin->getName(),
'type' => $type,
]) ?>
<?= $this->endSection() ?>
<?= $this->section('pageTitle') ?>
<?= lang('Plugins.settings', [
'pluginName' => $plugin->getName(),
'type' => $type,
]) ?>
<?= $this->endSection() ?>
<?php
$params = [
$plugin->getVendor(),
$plugin->getPackage(),
];
if (isset($podcast)) {
$params[] = $podcast->id;
}
if (isset($episode)) {
$params[] = $episode->id;
}
?>
<?= $this->section('content') ?>
<?= view('plugins/_settings', [
'plugin' => $plugin,
'action' => route_to(sprintf('plugins-settings-%s-action', $type), ...$params),
'type' => $type,
'context' => $context,
]) ?>
<?= $this->endSection() ?>