Class zhuravljov\yii\queue\DebugPanel

Inheritancezhuravljov\yii\queue\DebugPanel » yii\debug\Panel
Source Code https://github.com/yiisoft/yii2-queue/blob/master/src/DebugPanel.php

Class Panel

Method Details

Hide inherited methods

getDetail() public method

public void getDetail ( )

                public function getDetail()
{
    $count = count($this->data['jobs']);
    $jobs = [];
    foreach ($this->data['jobs'] as $serialized) {
        $jobs[] = unserialize($serialized);
    }
    $html = VarDumper::dumpAsString($jobs, 10, true);
    return <<<HTML
Pushed {$count} jobs</h1>
ml}
;
}

            
getName() public method

public void getName ( )

                public function getName()
{
    return 'Queue';
}

            
getSummary() public method

public void getSummary ( )

                public function getSummary()
{
    $url = $this->getUrl();
    $count = count($this->data['jobs']);
    return <<<HTML
 class="yii-debug-toolbar__block">
<a href="{$url}">Queue <span class="yii-debug-toolbar__label">{$count}</span></a>
v>
;
}

            
init() public method

public void init ( )

                public function init()
{
    parent::init();
    Event::on(Queue::class, Queue::EVENT_ON_PUSH, function (Event $event) {
        $this->_jobs[] = serialize($event->job);
    });
}

            
save() public method

public void save ( )

                public function save()
{
    return ['jobs' => $this->_jobs];
}