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  * <hr> separator. Mainly used for formatting
15  *
16  * @since 1.0.0
17  */
18 class separator 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 = 'separator';
28 
29     /**
30      * Enqueues specific tabs assets for the active pages
31      *
32      * @since 1.0.0
33      * @access protected
34      */
35     protected function enqueue_active_assets(){
36         parent::enqueue_active_assets();
37         ?><style type="text/css">
38         #control-<?php echo $this->id(); ?> {
39             border-color: <?php echo $this->base_color(); ?>;
40         }
41         #<?php echo $this->id(); ?> span.uix-control-label {
42             color: <?php echo $this->base_color(); ?>;
43         }
44         </style>
45         <?php
46     }
47 
48     /**
49      * Return null alwasy since a separator should not show up as an input.
50      * @since 1.0.0
51      * @access public
52      * @return mixed $data
53      */
54     public function get_data(){
55         return null;
56     }
57 
58     /**
59      * Returns the main input field for rendering
60      *
61      * @since 1.0.0
62      * @see \uix\ui\uix
63      * @access public
64      * @return string 
65      */
66     public function input(){
67 
68         return '<hr class="uix-separator" id="control-' . esc_attr( $this->id() ) . '" />';
69 
70     }
71 
72 }
UIX Documentation API documentation generated by ApiGen