mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-15 10:14:55 +02:00
Feature: auto-load pages in plugins/*/pages/*.php
This commit is contained in:
@@ -57,6 +57,15 @@ class Plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$routes = [];
|
$routes = [];
|
||||||
|
|
||||||
|
$pluginPages = glob(PLUGINS . '*/pages/*.php');
|
||||||
|
foreach ($pluginPages as $file) {
|
||||||
|
$file = str_replace(PLUGINS, 'plugins/', $file);
|
||||||
|
$name = pathinfo($file, PATHINFO_FILENAME);
|
||||||
|
|
||||||
|
$routes[] = [['get', 'post'], $name, $file, 1000];
|
||||||
|
}
|
||||||
|
|
||||||
foreach(self::getAllPluginsJson() as $plugin) {
|
foreach(self::getAllPluginsJson() as $plugin) {
|
||||||
$warningPreTitle = 'Plugin: ' . $plugin['name'] . ' - ';
|
$warningPreTitle = 'Plugin: ' . $plugin['name'] . ' - ';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user