Convert return type of dynamic pages
This commit is contained in:
parent
8a0b5e3e3a
commit
71f62f0e9c
@ -1,8 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
function getDynamicPermission($file): int {
|
function getDynamicPermission($file): int {
|
||||||
include_once($file);
|
return include_once($file)["parameters"]["minimal_permission_level"];
|
||||||
return $page_parameters["minimal_permission_level"];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function generateNavigation(): string
|
function generateNavigation(): string
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
function renderDynamicPage($page_file): array
|
function renderDynamicPage($page_file): array
|
||||||
{
|
{
|
||||||
require_once $page_file;
|
return require_once $page_file;
|
||||||
$page_parameters = get_parameters();
|
|
||||||
$page_content = render();
|
|
||||||
return ["output" => $page_content, "parameters" => $page_parameters];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function parsePageTag($input): array
|
function parsePageTag($input): array
|
||||||
|
@ -20,3 +20,5 @@ function render(): string
|
|||||||
|
|
||||||
return ob_get_clean();
|
return ob_get_clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return render();
|
@ -19,3 +19,5 @@ function render(): string
|
|||||||
|
|
||||||
return ob_get_clean();
|
return ob_get_clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return ["output" => render(), "parameters" => $page_parameters];
|
Loading…
Reference in New Issue
Block a user