version 0.2 beta nibiru framework, added onclick to the navbar json configuration, added a new dispatcher class that can handle actions as well, removed the dirty method calls fro the constructor $this->pageAction() and the navbar call, added ODBC support, and a postgress class. Overall improved the core functions of the framework.

This commit is contained in:
Stephan Kasdorf
2017-07-19 08:58:06 +02:00
parent 8a2bb432f7
commit 4a8e3493ab
14 changed files with 577 additions and 40 deletions

28
core/c/json-navigation.php Normal file → Executable file
View File

@@ -44,7 +44,7 @@ class JsonNavigation extends Config
*/
private static function setFileContentString( )
{
self::$_file_content_string = file_get_contents( Settings::SETTINGS_PATH . self::getConfig()["SETTINGS"]["navigation"] );
self::$_file_content_string = file_get_contents( Settings::SETTINGS_PATH . parent::getInstance()->getConfig()["SETTINGS"]["navigation"] );
}
/**
@@ -60,7 +60,7 @@ class JsonNavigation extends Config
*/
private static function setFileContentArray( )
{
self::$_file_content_array = file( Settings::SETTINGS_PATH . self::getConfig()["SETTINGS"]["navigation"] );
self::$_file_content_array = file( Settings::SETTINGS_PATH . parent::getInstance()->getConfig()["SETTINGS"]["navigation"] );
}
/**
@@ -116,12 +116,24 @@ class JsonNavigation extends Config
$keys = array_keys($value);
for($i=0; sizeof($keys)>$i;$i++)
{
self::$_navigation_array[] = array(
'title' => $keys[$i],
'icon' => $value[$keys[$i]]["icon"],
'link' => $value[$keys[$i]]["link"],
'tooltip' => $value[$keys[$i]]["tooltip"],
);
if(array_key_exists('link', $value[$keys[$i]]))
{
self::$_navigation_array[] = array(
'title' => $keys[$i],
'icon' => $value[$keys[$i]]["icon"],
'link' => $value[$keys[$i]]["link"],
'tooltip' => $value[$keys[$i]]["tooltip"]
);
}
elseif(array_key_exists('onclick', $value[$keys[$i]]))
{
self::$_navigation_array[] = array(
'title' => $keys[$i],
'icon' => $value[$keys[$i]]["icon"],
'tooltip' => $value[$keys[$i]]["tooltip"],
'onclick' => $value[$keys[$i]]["onclick"]
);
}
}
}
}