Esempio n. 1
0
 /**
  * Renders an additional line-break after the opening tag when it
  * is in MultiLine text mode.
  * @param THtmlWriter the writer used for the rendering purpose^M
  */
 public function renderBeginTag($writer)
 {
     parent::renderBeginTag($writer);
     if ($this->getTextMode() === 'MultiLine') {
         $writer->write("\n");
     }
 }
Esempio n. 2
0
 /**
  * Renders the repeated items.
  * @param THtmlWriter writer for the rendering purpose
  * @param IRepeatInfoUser repeat information user
  */
 public function renderRepeater($writer, IRepeatInfoUser $user)
 {
     if ($this->_repeatLayout === TRepeatLayout::Table) {
         $control = new TTable();
         if ($this->_caption !== '') {
             $control->setCaption($this->_caption);
             $control->setCaptionAlign($this->_captionAlign);
         }
     } else {
         if ($this->_repeatLayout === TRepeatLayout::Raw) {
             $this->renderRawContents($writer, $user);
             return;
         } else {
             $control = new TWebControl();
         }
     }
     $control->setID($user->getClientID());
     $control->copyBaseAttributes($user);
     if ($user->getHasStyle()) {
         $control->getStyle()->copyFrom($user->getStyle());
     }
     $control->renderBeginTag($writer);
     $writer->writeLine();
     if ($this->_repeatDirection === TRepeatDirection::Vertical) {
         $this->renderVerticalContents($writer, $user);
     } else {
         $this->renderHorizontalContents($writer, $user);
     }
     $control->renderEndTag($writer);
 }
Esempio n. 3
0
 public function renderBeginTag($writer)
 {
     parent::renderBeginTag($writer);
     $writer->renderBeginTag('p');
     $paf = "<img src=\"http://chart.apis.google.com/chart?";
     if ($this->_chart_type == "t") {
         $paf .= "cht=" . $this->_chart_type;
         $paf .= "&chtm=" . $this->_chart_type_map;
         $paf .= "&chld=" . $this->_chart_type_country;
     } else {
         $paf .= "cht=" . $this->_chart_type;
     }
     $paf .= "&chs=" . $this->_chart_size;
     $paf .= "&chl=" . $this->array2string($this->_chart_label);
     $paf .= "&chd=" . $this->_chart_data_encoding . ":" . $this->array2string($this->_chart_data);
     $paf .= "&chco=" . $this->_chart_color;
     $paf .= "\" alt=\"Green Source Trade\" />";
     $writer->write($paf);
 }
Esempio n. 4
0
 /**
  * Renders the openning tag for the table control which will render table caption if present.
  * @param THtmlWriter the writer used for the rendering purpose
  */
 public function renderBeginTag($writer)
 {
     parent::renderBeginTag($writer);
     if (($caption = $this->getCaption()) !== '') {
         if (($align = $this->getCaptionAlign()) !== TTableCaptionAlign::NotSet) {
             $writer->addAttribute('align', strtolower($align));
         }
         $writer->renderBeginTag('caption');
         $writer->write($caption);
         $writer->renderEndTag();
     }
 }
Esempio n. 5
0
 /**
  * Renders the datagrid.
  * @param THtmlWriter writer for the rendering purpose
  */
 public function render($writer)
 {
     if ($this->getHasControls()) {
         $this->groupCells();
         if ($this->_useEmptyTemplate) {
             $control = new TWebControl();
             $control->setID($this->getClientID());
             $control->copyBaseAttributes($this);
             if ($this->getHasStyle()) {
                 $control->getStyle()->copyFrom($this->getStyle());
             }
             $control->renderBeginTag($writer);
             $this->renderContents($writer);
             $control->renderEndTag($writer);
         } else {
             if ($this->getViewState('ItemCount', 0) > 0) {
                 $this->applyItemStyles();
                 if ($this->_topPager) {
                     $this->_topPager->renderControl($writer);
                     $writer->writeLine();
                 }
                 $this->renderTable($writer);
                 if ($this->_bottomPager) {
                     $writer->writeLine();
                     $this->_bottomPager->renderControl($writer);
                 }
             }
         }
     }
 }
Esempio n. 6
0
 /**
  * Renders the openning tag for the TabPanel control which will render TabPanel menu.
  * @param THtmlWriter the writer used for the rendering purpose
  */
 public function renderBeginTag($writer)
 {
     parent::renderBeginTag($writer);
 }
Esempio n. 7
0
 /**
  * Renders the openning tag for the control (including attributes)
  * @param THtmlWriter the writer used for the rendering purpose
  */
 public function renderBeginTag($writer)
 {
     parent::renderBeginTag($writer);
     if (($text = $this->getGroupingText()) !== '') {
         $writer->renderBeginTag('fieldset');
         $writer->renderBeginTag('legend');
         $writer->write($text);
         $writer->renderEndTag();
     }
 }
Esempio n. 8
0
 public function renderBeginTag($writer)
 {
     parent::renderBeginTag($writer);
     $writer->write("\n");
     $writer->addAttribute('class', $this->_CssClass);
     $writer->renderBeginTag('ul');
     $writer->write("\n");
 }