forked from CoreSphere/ConsoleBundle
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
link the console in the profiler toolbar
- Loading branch information
1 parent
f6929ba
commit d28e073
Showing
4 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the CoreSphereConsoleBundle. | ||
* | ||
* (c) Laszlo Korte <me@laszlokorte.de> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace CoreSphere\ConsoleBundle\DataCollector; | ||
|
||
use Symfony\Component\HttpFoundation\Request; | ||
use Symfony\Component\HttpFoundation\Response; | ||
use Symfony\Component\HttpKernel\DataCollector\DataCollector AS DataCollectorBase; | ||
|
||
class DataCollector extends DataCollectorBase | ||
{ | ||
|
||
public function collect(Request $request, Response $response, \Exception $exception = null) | ||
{ | ||
} | ||
|
||
|
||
public function getName() | ||
{ | ||
return 'coresphere_console'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace CoreSphere\ConsoleBundle\DependencyInjection; | ||
|
||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; | ||
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | ||
use Symfony\Component\Config\FileLocator; | ||
|
||
class CoreSphereConsoleExtension extends Extension | ||
{ | ||
public function load(array $configs, ContainerBuilder $container) | ||
{ | ||
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | ||
$loader->load('toolbar_listener.yml'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
services: | ||
coresphere_console.toolbar: | ||
class: CoreSphere\ConsoleBundle\DataCollector\DataCollector | ||
tags: | ||
- { name: data_collector, template: "CoreSphereConsoleBundle:Toolbar:toolbar", id: "coresphere_console" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% extends 'WebProfilerBundle:Profiler:layout.html.twig' %} | ||
|
||
{% block toolbar %} | ||
{% set icon %} | ||
<a href="{{ path('console') }}" class="coresphere_console_popover"> | ||
<img width="13" height="28" alt="Console" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAcCAYAAABh2p9gAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ | ||
bWFnZVJlYWR5ccllPAAAAG5JREFUeNpi/P//PwM1ARMDlcGogZQDlhMnTlAtmi0sLBip70IkNiOF | ||
rsMwkKGiouL/CE42Bw4cAGOqGejg4AA3mGouRDaYnGSD1YXoFhCyhIVYm4l16UguvmB5keLCAVTk | ||
UNOFjKO13ggwECDAAAMNHZ7ErsJjAAAAAElFTkSuQmCC"/> | ||
<span>Console</span> | ||
</a> | ||
{% endset %} | ||
|
||
{% include 'WebProfilerBundle:Profiler:toolbar_item.html.twig' with { 'link': false } %} | ||
{% endblock %} |