* Add processing of datasource viewType.

This commit is contained in:
wangyuting2
2022-06-08 14:23:42 +08:00
parent 6e05fa0cfa
commit 3fb390115c
+21
View File
@@ -229,6 +229,27 @@ class tree extends control
$title = $this->lang->tree->manageTrainpost;
$position[] = $this->lang->tree->manageTrainpost;
}
elseif(strpos($viewType, 'datasource') !== false)
{
$params = explode('_', $viewType);
if(count($params) == 2)
{
$datasourceID = $params[1];
$manageChild = 'manage' . ucfirst($viewType) . 'Child';
$datasource = $this->loadModel('workflowdatasource', 'flow')->getByID($datasourceID);
if($datasource)
{
$title = $datasource->name;
$position[] = $datasource->name;
$this->lang->tree->$manageChild = $title;
$root = new stdclass();
$root->name = $title;
$this->view->root = $root;
}
}
}
$parentModules = $this->tree->getParents($currentModuleID);
$this->view->title = $title;