34 lines
1.1 KiB
PHP
34 lines
1.1 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
/**
|
|
* The zen file of api module of ZenTaoPMS.
|
|
*
|
|
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
|
|
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
|
|
* @author Shujie Tian<tianshujie@easycorp.ltd>
|
|
* @package api
|
|
* @link https://www.zentao.net
|
|
*/
|
|
class apiZen extends api
|
|
{
|
|
/**
|
|
* 设置文档树默认展开的节点。
|
|
* Set the default expanded nodes of the document tree.
|
|
*
|
|
* @param int $libID
|
|
* @param int $moduleID
|
|
* @access protected
|
|
* @return array
|
|
*/
|
|
protected function getDefacultNestedShow(int $libID, int $moduleID): array
|
|
{
|
|
if(!$libID && !$moduleID) return array();
|
|
if($libID && !$moduleID) return array("{$libID}" => true);
|
|
|
|
$module = $this->loadModel('tree')->getByID($moduleID);
|
|
$path = explode(',', trim($module->path, ','));
|
|
$path = implode(':', $path);
|
|
return array("{$libID}:{$path}" => true);
|
|
}
|
|
}
|