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 Controls
 4  *
 5  * @package   controls
 6  * @author    David Cramer
 7  * @license   GPL-2.0+
 8  * @link
 9  * @copyright 2016 David Cramer
10  */
11 namespace uix\ui\control;
12 
13 /**
14  * Template file include. for including custom control html/php
15  *
16  * @since 1.0.0
17  */
18 class template extends \uix\ui\control{
19 
20     /**
21      * The type of object
22      *
23      * @since       1.0.0
24      * @access public
25      * @var         string
26      */
27     public $type = 'template';
28 
29     /**
30      * Returns the main input field for rendering
31      *
32      * @since 1.0.0
33      * @see \uix\ui\uix
34      * @access public
35      * @return string 
36      */
37     public function input(){
38         $output = null;
39         if( !empty( $this->struct['template'] ) && file_exists( $this->struct['template'] ) ) {
40             ob_start();
41             include $this->struct['template'];
42             $output .= ob_get_clean();
43         }
44         return $output;
45     }
46 
47     /**
48      * Render the Control
49      *
50      * @since 1.0.0
51      * @see \uix\ui\uix
52      * @access public
53      * @return string HTML of rendered control
54      */
55     public function render(){
56 
57         $output = $this->input();
58 
59         return $output;
60     }
61 
62 }
UIX Documentation API documentation generated by ApiGen