| @@ 15-28 (lines=14) @@ | ||
| 12 | */ |
|
| 13 | class LeftAndMainExtension extends BaseLeftAndMainExtension |
|
| 14 | { |
|
| 15 | public function accessedCMS() |
|
| 16 | { |
|
| 17 | DebugBar::withDebugBar(function (\DebugBar\DebugBar $debugbar) { |
|
| 18 | /* @var $timeData DebugBar\DataCollector\TimeDataCollector */ |
|
| 19 | $timeData = $debugbar->getCollector('time'); |
|
| 20 | if (!$timeData) { |
|
| 21 | return; |
|
| 22 | } |
|
| 23 | if ($timeData->hasStartedMeasure("init")) { |
|
| 24 | $timeData->stopMeasure("init"); |
|
| 25 | } |
|
| 26 | $timeData->startMeasure("cms_accessed", "cms accessed"); |
|
| 27 | }); |
|
| 28 | } |
|
| 29 | ||
| 30 | public function init() |
|
| 31 | { |
|
| @@ 30-43 (lines=14) @@ | ||
| 27 | }); |
|
| 28 | } |
|
| 29 | ||
| 30 | public function init() |
|
| 31 | { |
|
| 32 | DebugBar::withDebugBar(function (\DebugBar\DebugBar $debugbar) { |
|
| 33 | /* @var $timeData DebugBar\DataCollector\TimeDataCollector */ |
|
| 34 | $timeData = $debugbar->getCollector('time'); |
|
| 35 | if (!$timeData) { |
|
| 36 | return; |
|
| 37 | } |
|
| 38 | if ($timeData->hasStartedMeasure("cms_accessed")) { |
|
| 39 | $timeData->stopMeasure("cms_accessed"); |
|
| 40 | } |
|
| 41 | $timeData->startMeasure("cms_init", "cms init"); |
|
| 42 | }); |
|
| 43 | } |
|
| 44 | } |
|
| 45 | ||