* Fix bug #49648.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user