File modules/template_engine/components/html/component_column/ColumnComponent.class.php

Last commit: Mon Mar 8 01:24:06 2021 +0100	Jan Dankert	New: Action menu on many lists; tables have now a fixed layout
1 <?php 2 3 namespace template_engine\components\html\component_column; 4 5 use template_engine\components\html\Component; 6 use template_engine\element\CMSElement; 7 8 class ColumnComponent extends Component 9 { 10 public $style; 11 public $class; 12 public $colspan; 13 public $rowspan; 14 public $header = false; 15 public $title; 16 public $url; 17 public $action; 18 public $id; 19 public $name; 20 21 public function createElement() 22 { 23 $column = new CMSElement( ($this->header?'th':'td') ); 24 25 if ( $this->style ) 26 $column->addAttribute('style',$this->style); 27 28 if ( $this->colspan ) 29 $column->addAttribute('colspan',$this->colspan); 30 31 if ( $this->rowspan ) 32 $column->addAttribute('rowspan',$this->rowspan); 33 34 if ( $this->rowspan ) 35 $column->addAttribute('rowspan',$this->rowspan); 36 if ( $this->title ) 37 $column->addAttribute('title',$this->title); 38 39 if ( $this->id ) 40 { 41 $column->addAttribute('data-name' ,$this->name ); 42 $column->addAttribute('data-action',$this->action); 43 $column->addAttribute('data-id' ,$this->id ); 44 } 45 if ( $this->class ) 46 $column->addStyleClass( Component::splitByComma($this->class) ); 47 48 return $column; 49 } 50 }
Download modules/template_engine/components/html/component_column/ColumnComponent.class.php
History Mon, 8 Mar 2021 01:24:06 +0100 Jan Dankert New: Action menu on many lists; tables have now a fixed layout Sun, 1 Nov 2020 22:27:37 +0100 Jan Dankert Refactoring: The active menu entrys are now controlled by the action class; The user switch function is now available as a menu entry. Wed, 14 Oct 2020 22:36:29 +0200 Jan Dankert Refactoring: Fixed the namespace in component classes, now the are able to be load by the standard autoloader. Wed, 14 Oct 2020 22:20:22 +0200 Jan Dankert Refactoring: Renamed component folders, because 'if' is no valid namespace fragment.