|
|
@@ -4,7 +4,6 @@ declare(strict_types=1);
|
|
|
|
|
|
namespace SixShop\Core;
|
|
|
|
|
|
-use Random\RandomException;
|
|
|
use SixShop\Core\Exception\LogicException;
|
|
|
use think\Paginator;
|
|
|
use think\Response;
|
|
|
@@ -63,59 +62,4 @@ final class Helper
|
|
|
], $httpCode, $header, $options);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 构建树形结构选项
|
|
|
- * @param array $data 数据源
|
|
|
- * @param string $valueField 值字段
|
|
|
- * @param string $labelField 标签字段
|
|
|
- * @param string $parentField 父字段
|
|
|
- * @param int $parentId 父ID
|
|
|
- * @param string $childrenKey 子节点键
|
|
|
- * @param bool $preserveOriginal 是否保留原始数据
|
|
|
- *
|
|
|
- * @deprecated 函数已弃用, 请使用 build_tree_options()
|
|
|
- */
|
|
|
- public static function build_tree_options(
|
|
|
- array $data,
|
|
|
- string $valueField = 'id',
|
|
|
- string $labelField = 'name',
|
|
|
- string $parentField = 'parent_id',
|
|
|
- int $parentId = 0,
|
|
|
- string $childrenKey = 'children',
|
|
|
- bool $preserveOriginal = true
|
|
|
- ): array {
|
|
|
- return build_tree_options($data, $valueField, $labelField, $parentField, $parentId, $childrenKey, $preserveOriginal);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 生成随机密码
|
|
|
- * @param int $length 密码长度
|
|
|
- * @return string 生成的密码
|
|
|
- * @throws RandomException
|
|
|
- * @deprecated 函数已弃用, 请使用 secret_password()
|
|
|
- */
|
|
|
- public static function secret_password(int $length = 16): string
|
|
|
- {
|
|
|
- return secret_password($length);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * 获取插件目录
|
|
|
- * @param string $extensionID 插件ID
|
|
|
- * @return string 插件目录
|
|
|
- * @deprecated 函数已弃用, 请使用 extension_path()
|
|
|
- */
|
|
|
- public static function extension_path(string $extensionID = ''): string
|
|
|
- {
|
|
|
- return extension_path($extensionID);
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- *
|
|
|
- * @deprecated 废弃方法,请使用 extension_name_list 方法
|
|
|
- */
|
|
|
- public static function extension_name_list(): array
|
|
|
- {
|
|
|
- return extension_name_list();
|
|
|
- }
|
|
|
}
|