Class zhuravljov\yii\queue\DebugPanel
Inheritance | zhuravljov\yii\queue\DebugPanel » yii\debug\Panel |
---|---|
Source Code | https://github.com/yiisoft/yii2-queue/blob/master/src/DebugPanel.php |
Class Panel
Public Methods
Method Details
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}
;
}
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>
;
}
public void init ( ) |
public function init()
{
parent::init();
Event::on(Queue::class, Queue::EVENT_ON_PUSH, function (Event $event) {
$this->_jobs[] = serialize($event->job);
});
}