赵宇飞/lazy-tracy

懒加载的 Tracy 工具栏

1.0.2 2019-06-04 08:51 UTC

This package is auto-updated.

Last update: 2024-09-06 23:06:53 UTC


README

通过 Ajax 请求懒加载 Tracy 面板内容。

安装

建议使用 Composer 进行安装

composer require pilotcz/lazy-tracy

使用方法

use PilotCz\LazyTracy\Panel;

class CustomTracyPanel extends Panel
{
    /**
     * Tracy constructor.
     * @param LinkGenerator $linkGenerator
     * @throws InvalidLinkException
     */
    public function __construct(LinkGenerator $linkGenerator)
    {
        $url = $linkGenerator->link('System:gitPanel');
        
        $this->setUid(self::class);
        $this->setUrl($url);
        $this->setTabText('Tab Text Here');
        $this->setTabIcon('<svg>....</svg>');
    }
}