public function end()
 {
     $s = array();
     for ($i = 0, $size = sizeof($this->_actives); $i < $size; ++$i) {
         $s[] = strtr($this->activeLinkTemplate, array('{url}' => $this->_actives[$i]['url'], '{label}' => $this->_actives[$i]['label'], '{htmlOptions}' => Html::serializeHtmlOption($this->_actives[$i]['htmlOptions'])));
     }
     for ($i = 0, $size = sizeof($this->_inactive); $i < $size; ++$i) {
         $s[] = strtr($this->inactiveLinkTemplate, array('{label}' => $this->_inactive[$i]));
     }
     echo implode($s, $this->separator);
 }
Пример #2
0
 public function displayFootRow()
 {
     $s = '';
     foreach ($this->columns as $name => $column) {
         if (is_int($name)) {
             $name = $column;
         }
         if (is_scalar($column)) {
             $column = array('label' => $column);
         }
         if (!isset($column['htmlOption'])) {
             $column['htmlOption'] = array();
         }
         $s .= '<th' . Html::serializeHtmlOption($column['htmlOption']) . '>';
         if ('cb' == $name) {
             $s .= '<label><input class="check-all" type="checkbox"> &uarr;</label>';
         } else {
             $s .= $column['label'];
         }
         $s .= '</th>';
     }
     return $s;
 }
Пример #3
0
 public function render()
 {
     $html = '';
     $html .= '<table' . \Flywheel\Html\Html::serializeHtmlOption($this->tableHtmlOptions) . '>';
     $html .= '<thead>';
     $html .= $this->displayHeaderRow();
     $html .= '</thead>';
     $html .= '<tbody>';
     $html .= $this->displayRows();
     $html .= '</tbody>';
     $html .= '<tfoot>';
     $html .= $this->displayFootRow();
     $html .= '</tfoot>';
     $html .= '</table>';
     return $html;
 }