parent
037fee298b
commit
633dca6b76
|
@ -179,12 +179,12 @@ class Web extends EmbeddedWeb
|
||||||
*/
|
*/
|
||||||
public function getSharedNavigation($type)
|
public function getSharedNavigation($type)
|
||||||
{
|
{
|
||||||
$config = Config::app('navigation')->getConfigObject();
|
$config = Config::navigation($type === 'dashboard-pane' ? 'dashlet' : $type);
|
||||||
$config->setKeyColumn('name');
|
$config->getConfigObject()->setKeyColumn('name');
|
||||||
|
|
||||||
if ($type === 'dashboard-pane') {
|
if ($type === 'dashboard-pane') {
|
||||||
$panes = array();
|
$panes = array();
|
||||||
foreach ($config->select()->where('type', 'dashlet') as $dashletName => $dashletConfig) {
|
foreach ($config as $dashletName => $dashletConfig) {
|
||||||
if ($this->hasAccessToSharedNavigationItem($dashletConfig)) {
|
if ($this->hasAccessToSharedNavigationItem($dashletConfig)) {
|
||||||
// TODO: Throw ConfigurationError if pane or url is missing
|
// TODO: Throw ConfigurationError if pane or url is missing
|
||||||
$panes[$dashletConfig->pane][$dashletName] = $dashletConfig->url;
|
$panes[$dashletConfig->pane][$dashletName] = $dashletConfig->url;
|
||||||
|
@ -203,7 +203,7 @@ class Web extends EmbeddedWeb
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$items = array();
|
$items = array();
|
||||||
foreach ($config->select()->where('type', $type) as $name => $typeConfig) {
|
foreach ($config as $name => $typeConfig) {
|
||||||
if ($this->hasAccessToSharedNavigationItem($typeConfig)) {
|
if ($this->hasAccessToSharedNavigationItem($typeConfig)) {
|
||||||
$items[$name] = $typeConfig;
|
$items[$name] = $typeConfig;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue