1 <?php
2 3 4 5 6 7 8 9 10
11 namespace uix\ui;
12
13 14 15 16 17 18
19 class section extends panel {
20
21 22 23 24 25 26 27
28 public $type = 'section';
29
30
31
32 33 34 35 36 37
38 public function set_assets() {
39
40 $this->assets['style']['sections'] = $this->url . 'assets/css/sections' . UIX_ASSET_DEBUG . '.css';
41
42 parent::set_assets();
43 }
44
45 46 47 48 49 50 51
52 public function render(){
53
54 if( !isset( $this->struct['active'] ) )
55 $this->struct['active'] = 'true';
56
57 $output = '<div id="' . esc_attr( $this->id() ) . '" class="uix-section" aria-hidden="' . esc_attr( $this->struct['active'] ) . '">' . $this->description();
58
59 $output .='<div class="uix-section-content">';
60
61 $output .= $this->render_template();
62 $output .= $this->render_children();
63
64 $output .= '</div></div>';
65
66 return $output;
67 }
68
69
70 }