|
|
@@ -94,6 +94,28 @@ class RouteBase {
|
|
|
User::authByRequest();
|
|
|
}
|
|
|
|
|
|
+ public function menu() {
|
|
|
+ $getLink = array($this, 'getLink');
|
|
|
+ echo UI::h('ul', [], array_map(
|
|
|
+ function ($method) use ($getLink) {
|
|
|
+ $action = substr($method, 0, -6);
|
|
|
+ return UI::h('li', [],
|
|
|
+ UI::h('a', [
|
|
|
+ 'href' => $getLink($action)
|
|
|
+ ], $action)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ , array_filter(
|
|
|
+ get_class_methods($this)
|
|
|
+ , function ($method) {
|
|
|
+ if ('Action' != substr($method, -6)) return false;
|
|
|
+ if ('parseMessageFromStorageTestAction' == $method) return false;
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ )
|
|
|
+ ));
|
|
|
+ }
|
|
|
+
|
|
|
public function reinstall() {
|
|
|
$clsName = get_class($this);
|
|
|
if ('Route_UrlAction' == substr($clsName, 0, strlen('Route_UrlAction'))) {
|