Right now it is 3.4.3 as mentioned above and I need to switch to at least 3.5.
Here is the index.php of my plugin:
<?php
/**
* See composer.json for meta info.
*/
load([
'webdev\\orderonline\\processor' => '/src/Processor.php',
'webdev\\orderonline\\spamProtector' => '/src/SpamProtector.php',
'webdev\\orderonline\\dbConnector' => '/src/DbConnector.php',
'webdev\\orderonline\\mailer' => '/src/Mailer.php'
], __DIR__);
Kirby::plugin('webdev/orderonline', [
'snippets' => [
'orderonline/form' => __DIR__ . '/snippets/form.php'
],
'templates' => [
'emails/order.html' => __DIR__. '/templates/emails/order.html.php',
'emails/order.text' => __DIR__. '/templates/emails/order.text.php'
],
'routes' => [
[
'pattern' => '(?:(:any)//?)?order',
'action' => function() { return Webdev\Orderonline\Processor::recipeOrder(); },
'method' => 'POST'
],
[
'pattern' => '(?:(:any)//?)?archivieren',
'action' => function() {
if (kirby()->user()) {
Db::update('orderonline', ['archiv' => '1'], ['id' => get('archive_id')]); go('/panel/site#order');
}
},
'method' => 'GET'
],
[
'pattern' => '(?:(:any)//?)?archiviere_alles',
'action' => function() {
if (kirby()->user()) {
Db::delete('orderonline'); go('/panel/site#order');
}
},
'method' => 'GET'
]
],
'fields' => [
'orderview' => [
'props' => [
'data' => function () {
return Db::first('orderonline', '*', 'archiv like "0"');
},
'data_archived' => function () {
return (string) Db::count('orderonline', 'archiv LIKE "1"');
}
]
]
],
'translations' => [
'de' => [
'onlineorder.vorname' => 'Vorname',
'onlineorder.nachname' => 'Nachname',
'onlineorder.geburtsdatum' => 'Geburtsdatum',
'onlineorder.tag' => 'Tag',
'onlineorder.monat' => 'Monat',
'onlineorder.jahr' => 'Jahr',
'onlineorder.mailadresse' => 'Mail-Adresse',
'onlineorder.telefon' => 'Telefon',
'onlineorder.max_anzahl_erreicht' => 'Maximale Anzahl erreicht',
'onlineorder.weitere_informationen' => 'weitere Informationen',
'onlineorder.pruefcode' => 'Prüfcode Spamschutz',
'onlineorder.bestellung_absenden' => 'Bestellung absenden'
],
'en' => [
'onlineorder.vorname' => 'Firstname',
'onlineorder.nachname' => 'Lastname',
'onlineorder.geburtsdatum' => 'Birthday',
'onlineorder.tag' => 'Day',
'onlineorder.monat' => 'Month',
'onlineorder.jahr' => 'Year',
'onlineorder.mailadresse' => 'Mail-address',
'onlineorder.telefon' => 'Phone',
'onlineorder.max_anzahl_erreicht' => 'Maximum reached',
'onlineorder.weitere_informationen' => 'more information',
'onlineorder.pruefcode' => 'Spam checkcode',
'onlineorder.bestellung_absenden' => 'Send Order'
]
]
]);