Table.class.php (792B)
1 <?php 2 3 namespace template_engine\components; 4 5 class TableComponent extends HtmlComponent 6 { 7 public $filter = true; 8 9 public $width = '100%'; 10 11 public function begin() 12 { 13 echo '<div class="or-table-wrapper">'; 14 15 if ( $this->filter) 16 echo '<div class="or-table-filter"><input type="search" name="filter" placeholder="'.$this->htmlvalue('message:SEARCH_FILTER').'" /></div>'; 17 18 echo '<div class="or-table-area">'; 19 echo '<table'; 20 21 if ( !empty($this->class)) 22 echo ' class="'.$this->htmlvalue($this->class).'"'; 23 24 if ( !empty($this->width)) 25 echo ' width="'.$this->htmlvalue($this->width).'"'; 26 27 echo '>'; 28 } 29 30 public function end() 31 { 32 echo '</table>'; 33 echo '</div>'; 34 echo '</div>'; 35 } 36 } 37 38 ?>