Group.class.php (883B)
1 <?php 2 3 namespace template_engine\components; 4 5 class GroupComponent extends Component 6 { 7 8 public $open = true; 9 public $show = true; 10 public $title; 11 public $icon; 12 13 public function begin() 14 { 15 echo '<fieldset'; 16 echo ' class="toggle-open-close'; 17 echo '<?php echo '.$this->value($this->open).'?" open":" closed" ?>'; 18 echo '<?php echo '.$this->value($this->show).'?" show":"" ?>'; 19 echo '">'; 20 21 if ( !empty($this->title)) 22 { 23 echo '<legend class="on-click-open-close">'; 24 if ( !empty($this->icon)) 25 echo '<img src="/themes/default/images/icon/method/'.$this->htmlvalue($this->icon).'.svg" />'; 26 27 echo '<div class="arrow arrow-right on-closed"></div><div class="arrow arrow-down on-open"></div>'; 28 echo $this->htmlvalue($this->title); 29 echo '</legend>'; 30 } 31 echo '<div class="closable">'; 32 } 33 34 35 public function end() { 36 echo '</div></fieldset>'; 37 } 38 } 39 40 ?>