コード例 #1
0
 public function renderField()
 {
     //Find the real render to do the job.
     $impl = $this->controller->getFieldRender($this->tableDd->getNormalizedType($this->field));
     $this->render = CalemReportUtil::getRenderInstance($impl);
     $this->render->init($this->id, $this->info, $this->controller);
     return $this->render->render();
 }
コード例 #2
0
 /**
  * Rendering Excel is supported for list type report only at this time.
  */
 public function renderExcel($customInfo)
 {
     $this->customInfo = $customInfo;
     $this->tableDd = $this->controller->getModelItem()->getTableDd();
     //Get grid out and render it.
     $itemInfo = CalemReportUtil::getItemInfo(self::GRID_ID, $this->info, $this->tableDd);
     $impl = $this->controller->getReportRender($itemInfo);
     //Created an instance
     if (!$impl) {
         $this->logger->error("Error in locating render for: " . var_export($itemInfo, true));
     }
     $render = CalemReportUtil::getRenderInstance($impl);
     //Init the render
     $render->init(self::GRID_ID, $itemInfo, $this->controller);
     $render->renderExcel();
 }
コード例 #3
0
 public function renderOneItem($cid, $checkAcl = true)
 {
     if ($checkAcl && !$this->checkViewAcl($cid)) {
         return;
     }
     $itemInfo = CalemReportUtil::getItemInfo($cid, $this->info, $this->tableDd);
     $impl = $this->controller->getReportRender($itemInfo);
     //Created an instance
     if (!$impl) {
         $this->logger->error("Error in locating render for: " . var_export($itemInfo, true));
     }
     $render = CalemReportUtil::getRenderInstance($impl);
     //Init the render
     $render->init($cid, $itemInfo, $this->controller);
     $doc = $render->render();
     $this->append($doc);
 }