/** * get Miis Toolbar instance * @return MiisToolbar */ public static function getInstance() { if (is_null(self::$instance)) { self::$instance = new self(); } return self::$instance; }
public function render($view, $data = null, $return = false) { if ($this->beforeRender($view)) { $bar = MiisToolbar::getInstance()->render(); $output = $this->renderPartial($view, $data, true); if (($layoutFile = $this->getLayoutFile($this->layout)) !== false) { $output = $this->renderFile($layoutFile, array('content' => $output, 'toolbar' => $bar), true); } $this->afterRender($view, $output); $output = $this->processOutput($output); if ($return) { return $output; } else { echo $output; } } }
public static function hideToolBar($hide = true) { $bar = MiisToolbar::getInstance(); // Add an edit button. $bar->setHide($hide); }