public static function renderGraphMage2() { $shim = self::getShim(); $layout = $shim->getSingleton('core/layout'); $graph = self::getDotStart(); foreach (self::$_elementStack as $block_name) { $parent_name = $layout->getParentName($block_name); if (!$parent_name) { Prettylittlethingcom_Commercebug_Model_Shim::Log('Skipping ' . $block_name . ', no parent'); continue; } $line = '"' . $parent_name . '"' . '->' . '"' . $block_name . '"' . ' [style=solid]'; self::$_graphs[] = $line; if ($layout->isBlock($block_name) && ($block = $layout->getBlock($block_name))) { $template = $block->getTemplate() ? $block->getTemplate() : 'NO TEMPLATE'; $definition = '"' . $block_name . '"' . '[label="' . $block_name . '\\\\n' . str_replace('\\', '\\\\', get_class($block)) . '\\\\n' . $template . '"]'; } if ($layout->isContainer($block_name)) { $definition = '"' . $block_name . '"' . '[label="' . $block_name . '\\\\n' . 'CONTAINER\\n\\n"]'; } self::$_definitions[$block_name] = $definition; } $graph .= implode(";\n", self::$_graphs) . ';'; if (self::shouldRenderFullLabels()) { $graph .= implode(";\n", self::$_definitions) . ';'; } $graph .= '}'; return $graph; }
function getShim() { $shim = Prettylittlethingcom_Commercebug_Model_Shim::getInstance(); return $shim; }
public static function getInstance() { if (!self::$_instance) { self::$_instance = new Prettylittlethingcom_Commercebug_Model_Shim(); } return self::$_instance; }
<?php /** * Copyright © Pulsestorm LLC: All rights reserved */ $installer = $this; $shim = new Prettylittlethingcom_Commercebug_Model_Shim(); $o = $shim->getModel('admin/session'); // $o = Mage::getModel('admin/session'); if (is_object($o) && method_exists($o, 'refreshAcl') && is_callable(array($o, 'refreshAcl'))) { $o->refreshAcl(); }