mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 01:42:17 +00:00
treemenu trial
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
|
||||
*/
|
||||
|
||||
/**
|
||||
* Description of InOutLib
|
||||
*
|
||||
* @author bambi
|
||||
*/
|
||||
class InOutLib
|
||||
{
|
||||
public function getSubMenu()
|
||||
{
|
||||
return [
|
||||
'name' => 'International',
|
||||
'link' => 'inout',
|
||||
'children' => [
|
||||
[
|
||||
'name' => 'Incoming',
|
||||
'link' => 'inout/incoming',
|
||||
'leaf' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Outgoing',
|
||||
'link' => 'inout/outgoing',
|
||||
'leaf' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Gemeinsame Studien',
|
||||
'link' => 'inout/gemeinsamestudien',
|
||||
'leaf' => true
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
|
||||
*/
|
||||
|
||||
/**
|
||||
* Description of InOutLib
|
||||
*
|
||||
* @author bambi
|
||||
*/
|
||||
class StgLib
|
||||
{
|
||||
public function getSubMenu()
|
||||
{
|
||||
return [
|
||||
'name' => 'International',
|
||||
'link' => 'inout',
|
||||
'children' => [
|
||||
[
|
||||
'name' => 'Incoming',
|
||||
'link' => 'inout/incoming',
|
||||
'leaf' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Outgoing',
|
||||
'link' => 'inout/outgoing',
|
||||
'leaf' => true
|
||||
],
|
||||
[
|
||||
'name' => 'Gemeinsame Studien',
|
||||
'link' => 'inout/gemeinsamestudien',
|
||||
'leaf' => true
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
require_once APPPATH . 'library/treemenu/TreeMenuLib.php';
|
||||
/**
|
||||
* Description of StvMenuLib
|
||||
*
|
||||
* @author bambi
|
||||
*/
|
||||
class StvMenuLib extends TreeMenuLib
|
||||
{
|
||||
public function getSubMenu()
|
||||
{
|
||||
return [
|
||||
'StvMenuLib' => null
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
|
||||
*/
|
||||
|
||||
/**
|
||||
* Description of InOutLib
|
||||
*
|
||||
* @author bambi
|
||||
*/
|
||||
abstract class TreeMenuLib
|
||||
{
|
||||
protected $ci;
|
||||
protected $children_config;
|
||||
|
||||
public function __construct($children_config)
|
||||
{
|
||||
$this->ci = get_instance();
|
||||
$this->children_config = $children_config;
|
||||
foreach($this->children_config as $child_config)
|
||||
{
|
||||
$grandchildren_config = isset($child_config['children']) ? $child_config['children'] : [];
|
||||
$this->ci->load->library($child_config->library, $grandchildren_config);
|
||||
}
|
||||
}
|
||||
|
||||
public function getNode($name)
|
||||
{
|
||||
$node = array(
|
||||
'name' => $name
|
||||
);
|
||||
|
||||
return $node;
|
||||
}
|
||||
|
||||
public abstract function getSubMenu();
|
||||
}
|
||||
Reference in New Issue
Block a user