eZ\Bundle\EzPublishDebugBundle\Collector\EzPublishCoreCollector::getPanelTemplate PHP Method

getPanelTemplate() public method

Returns panel template to use for given collector name.
public getPanelTemplate ( string $collectorName ) : string
$collectorName string Name of corresponding collector.
return string
    public function getPanelTemplate($collectorName)
    {
        if (!isset($this->data['panelTemplates'][$collectorName])) {
            return null;
        }
        return $this->data['panelTemplates'][$collectorName];
    }

Usage Example

 public function testGetPanelTemplate()
 {
     $collector = $this->getMock('\\Symfony\\Component\\HttpKernel\\DataCollector\\DataCollectorInterface');
     $name = 'foobar';
     $collector->expects($this->once())->method('getName')->will($this->returnValue($name));
     $panelTemplate = 'toolbar.html.twig';
     $this->mainCollector->addCollector($collector, $panelTemplate, 'foo');
     $this->assertSame($panelTemplate, $this->mainCollector->getPanelTemplate($name));
 }