<commit_before><?php

namespace Miaoxing\User;

use Miaoxing\Plugin\Service\User;

class Plugin extends \Miaoxing\Plugin\BasePlugin
{
    protected $name = '用户';

    protected $description = '';

    protected $adminNavId = 'user';

    public function onAdminNavGetNavs(&$navs, &$categories, &$subCategories)
    {
        $categories['user'] = [
            'name' => '用户',
            'sort' => 600,
        ];

        $subCategories['user'] = [
            'parentId' => 'user',
            'name' => '用户',
            'icon' => 'fa fa-user',
        ];

        $navs[] = [
            'parentId' => 'user',
            'url' => 'admin/user',
            'name' => '用户管理',
            'sort' => 1000,
        ];

        if (wei()->plugin->isInstalled('user-tag')) {
            $navs[] = [
                'parentId' => 'user',
                'url' => 'admin/user-tags',
                'name' => '标签管理',
            ];
        } else {
            $navs[] = [
                'parentId' => 'user',
                'url' => 'admin/groups',
                'name' => '分组管理',
            ];
        }

        $subCategories['user-setting'] = [
            'parentId' => 'user',
            'name' => '设置',
            'icon' => 'fa fa-gear',
            'sort' => 0,
        ];

        $navs[] = [
            'parentId' => 'user-setting',
            'url' => 'admin/user-settings',
            'name' => '功能设置',
        ];
    }

    public function onLinkToGetLinks(&$links, &$types)
    {
        $types['user'] = [
            'name' => '用户',
            'sort' => 600,
        ];

        $links[] = [
            'typeId' => 'user',
            'name' => '个人中心',
            'url' => 'user',
        ];<commit_msg>refactor: 用户的左侧菜单更新<commit_after><?php

namespace Miaoxing\User;

use Miaoxing\Plugin\Service\User;

class Plugin extends \Miaoxing\Plugin\BasePlugin
{
    protected $name = '用户';

    protected $description = '';

    protected $adminNavId = 'user';

    public function onAdminNavGetNavs(&$navs, &$categories, &$subCategories)
    {
        $categories['user'] = [
            'name' => '用户',
            'sort' => 600,
        ];

        $subCategories[] = [
            'parentId' => 'user',
            'url' => 'admin/user',
            'name' => '用户管理',
            'sort' => 1000,
        ];

        if (wei()->plugin->isInstalled('user-tag')) {
            $subCategories[] = [
                'parentId' => 'user',
                'url' => 'admin/user-tags',
                'name' => '标签管理',
            ];
        } else {
            $subCategories[] = [
                'parentId' => 'user',
                'url' => 'admin/groups',
                'name' => '分组管理',
            ];
        }

        $subCategories[] = [
            'parentId' => 'user',
            'url' => 'admin/user-settings',
            'name' => '功能设置',
        ];
    }

    public function onLinkToGetLinks(&$links, &$types)
    {
        $types['user'] = [
            'name' => '用户',
            'sort' => 600,
        ];

        $links[] = [
            'typeId' => 'user',
            'name' => '个人中心',
            'url' => 'user',
        ];
{'fraction_non_alphanumeric': 0.18606117943866288, 'fraction_numerical': 0.006622516556291391, 'mean_word_length': 1.3306392358559882, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 54, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5150670', 'n_tokens_mistral': 1061, 'n_tokens_neox': 1003, 'n_words': 171}