Merge branch 'dev_profiling' of git.d3data.de:DanielS/DebugBar into dev_profiling

This commit is contained in:
Daniel Seifert 2022-08-01 22:27:28 +02:00
commit f36b13970e
Signed by: DanielS
GPG Key ID: 6A513E13AEE66170
2 changed files with 12 additions and 14 deletions

View File

@ -98,16 +98,6 @@ class DebugBarComponent extends BaseController
return new SmartyCollector(Registry::getUtilsView()->getSmarty()); return new SmartyCollector(Registry::getUtilsView()->getSmarty());
} }
/**
* @return string|null
*/
public function render()
{
$this->getParent()->addTplParam('debugBarRenderer', $this->debugBarRenderer);
$this->getParent()->addTplParam('debugBarComponent', $this);
return parent::render();
}
/** /**
* @param $object * @param $object
* @param $propName * @param $propName
@ -149,4 +139,12 @@ class DebugBarComponent extends BaseController
$property->setAccessible(true); $property->setAccessible(true);
$property->setValue($this->debugBar, $collectors); $property->setValue($this->debugBar, $collectors);
} }
/**
* @return JavascriptRenderer
*/
public function getRenderer(): JavascriptRenderer
{
return $this->debugBarRenderer;
}
} }

View File

@ -51,9 +51,9 @@ class ShopControl_DebugBar extends ShopControl_DebugBar_parent
if (!isAdmin()) { if (!isAdmin()) {
/** @var DebugBarComponent $debugBarComponent */ /** @var DebugBarComponent $debugBarComponent */
$debugBarComponent = Registry::getConfig()->getActiveView()->getComponent(DebugBarComponent::class); $debugBarComponent = Registry::getConfig()->getActiveView()->getComponent(DebugBarComponent::class);
echo $debugBarComponent->debugBarRenderer->renderHead(); echo $debugBarComponent->getRenderer()->renderHead();
$debugBarComponent->addTimelineMessures(); $debugBarComponent->addTimelineMessures();
echo $debugBarComponent->debugBarRenderer->render(); echo $debugBarComponent->getRenderer()->render();
} }
} }
} }