This commit is contained in:
tianshujie
2024-05-15 14:34:36 +08:00
parent 8473821ed9
commit 0310c56b18
3 changed files with 27 additions and 27 deletions
+26
View File
@@ -1019,4 +1019,30 @@ class apiModel extends model
'addedDate' => !empty($data->addedDate) ? $data->addedDate : helper::now()
);
}
/**
* 获取接口类型数据。
* Get Type list.
*
* @param int $libID
* @access protected
* @return array
*/
public function getTypeList(int $libID): array
{
$typeList = array();
foreach($this->lang->api->paramsTypeOptions as $key => $item)
{
$typeList[$key] = $item;
}
/* Get all struct by libID. */
$structs = $this->api->getStructListByLibID($libID);
foreach($structs as $struct)
{
$typeList[$struct->id] = $struct->name;
}
return $typeList;
}
}