Пример #1
0
 public function render($return = true)
 {
     $views = $this->dashboard->getDispatchedViews();
     if (!$views) {
         $this->set('columns', array());
         return parent::render();
     }
     $columns = array();
     foreach ($views as $columnNumber => $widgetViews) {
         $columns[$columnNumber] = array();
         foreach ($widgetViews as $widgetId => $widgetView) {
             if (!$widgetView) {
                 continue;
             }
             $widget = $this->dashboard->getWidget($widgetId);
             $title = $widget->getTitle();
             $content = $this->renderView($widgetView);
             $propertiesAction = null;
             if ($this->propertiesAction && $widget->hasProperties()) {
                 $propertiesAction = $this->propertiesAction . $widgetId;
             }
             $widgetView = new WidgetView($widgetId, $title, $content, $propertiesAction, $widget->isMinimized());
             $columns[$columnNumber][$widgetId] = $this->renderView($widgetView);
         }
     }
     $this->set('columns', $columns);
     return parent::render($return);
 }
Пример #2
0
 /**
  * Renders this view
  * @param boolean $return True to return the rendered view, false to send it to the output
  * @return null|string
  */
 public function render($return = true)
 {
     $this->set('title', $this->title);
     $this->set('headers', $this->headers);
     $this->set('rows', $this->rows);
     return parent::render($return);
 }
Пример #3
0
 /**
  * Renders this view
  * @param boolean $return flag to return or output the rendered view
  * @return null|string
  */
 public function render($return = true)
 {
     $phpinfo = $this->getPhpInfoHtml();
     $this->set('phpinfo', $phpinfo);
     return parent::render($return);
 }
 public function render($return = true)
 {
     $content = $this->renderView($this->propertiesView);
     $this->set('content', $content);
     return parent::render($return);
 }
Пример #5
0
 /**
  * Render the page
  * @param boolean $return true to get the rendered view back, false to output the rendered view
  * @return string the rendered view if $return is set to true
  */
 public function render($return = true)
 {
     $regions = array();
     if ($this->dispatchedViews) {
         foreach ($this->dispatchedViews as $regionName => $widgetViews) {
             $regions[$regionName] = array();
             foreach ($widgetViews as $widgetId => $widgetView) {
                 if (!$widgetView) {
                     continue;
                 }
                 $this->resourceHandler->setTemplateId($widgetId);
                 $this->processSmartyView($widgetView, $widgetId, $regionName);
                 $regions[$regionName][$widgetId] = $this->renderView($widgetView);
             }
         }
     }
     $this->resourceHandler->setTemplateId($this->node->id);
     $this->getEngine()->compile_id = $this->node->id;
     $this->set('regions', $regions);
     $this->set('node', $this->node);
     return parent::render($return);
 }