UIX Documentation
  • Namespace
  • Class
  • Tree

Namespaces

  • None
  • uix
    • data
    • ui
      • control

Classes

  • uix\data\data
  • uix\ui
  • uix\ui\box
  • uix\ui\control
  • uix\ui\control\autocomplete
  • uix\ui\control\button
  • uix\ui\control\checkbox
  • uix\ui\control\color
  • uix\ui\control\editor
  • uix\ui\control\email
  • uix\ui\control\file
  • uix\ui\control\hidden
  • uix\ui\control\number
  • uix\ui\control\post_relation
  • uix\ui\control\radio
  • uix\ui\control\select
  • uix\ui\control\separator
  • uix\ui\control\slider
  • uix\ui\control\template
  • uix\ui\control\text
  • uix\ui\control\textarea
  • uix\ui\control\toggle
  • uix\ui\footer
  • uix\ui\grid
  • uix\ui\header
  • uix\ui\help
  • uix\ui\metabox
  • uix\ui\modal
  • uix\ui\notice
  • uix\ui\page
  • uix\ui\panel
  • uix\ui\post_type
  • uix\ui\repeat
  • uix\ui\section
  • uix\ui\uix

Interfaces

  • uix\data\load
  • uix\data\save

Functions

  • uix
  • uix_autoload_class
 1 <?php
 2 /**
 3  * UIX section
 4  *
 5  * @package   ui
 6  * @author    David Cramer
 7  * @license   GPL-2.0+
 8  * @link
 9  * @copyright 2016 David Cramer
10  */
11 namespace uix\ui;
12 
13 /**
14  * A generic holder for multiple controls. this panel type does not handle saving, but forms part of the data object tree.
15  *
16  * @since 1.0.0
17  * @see \uix\uix
18  */
19 class section extends panel {
20 
21     /**
22      * The type of object
23      *
24      * @since 1.0.0
25      * @access public
26      * @var      string
27      */
28     public $type = 'section';
29 
30 
31 
32     /**
33      * Define core page style
34      *
35      * @since 1.0.0
36      * @access public
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      * Render the complete section
47      *
48      * @since 1.0.0
49      * @access public
50      * @return string|null HTML of rendered notice
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 }
UIX Documentation API documentation generated by ApiGen