Example #1
0
 /**
  * Process a smarty view, set the resource handler of this page and set the region name
  * @param zibo\core\View $widgetView view of the widget
  * @param int $widgetId id of the widget
  * @param string $regionName name of the region
  * @return null
  */
 protected function processSmartyView(View $widgetView, $widgetId, $regionName)
 {
     if (!$widgetView instanceof SmartyView) {
         return;
     }
     $widgetView->setResourceHandler($this->resourceHandler);
     $widgetView->getEngine()->compile_id = $widgetId;
     $widgetView->set('_widgetId', $widgetId);
     $widgetView->set('_region', $regionName);
     $widgetView->set('_node', $this->node);
     $widgetSubviews = $widgetView->getSubviews();
     foreach ($widgetSubviews as $widgetSubview) {
         $this->processSmartyView($widgetSubview, $widgetId, $regionName);
     }
 }