예제 #1
0
 /**
  * get Miis Toolbar instance
  * @return MiisToolbar
  */
 public static function getInstance()
 {
     if (is_null(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
예제 #2
0
 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;
         }
     }
 }
예제 #3
0
 public static function hideToolBar($hide = true)
 {
     $bar = MiisToolbar::getInstance();
     // Add an edit button.
     $bar->setHide($hide);
 }