1 | <?php |
||
19 | class image extends \uix\ui\control { |
||
20 | |||
21 | /** |
||
22 | * The type of object |
||
23 | * |
||
24 | * @since 1.0.0 |
||
25 | * @access public |
||
26 | * @var string |
||
27 | */ |
||
28 | public $type = 'image'; |
||
29 | |||
30 | /** |
||
31 | * Checks if the current control is active. |
||
32 | * |
||
33 | * @since 1.0.0 |
||
34 | * @access public |
||
35 | */ |
||
36 | public function is_active() { |
||
45 | |||
46 | /** |
||
47 | * Define core UIX scripts - override to register core ( common scripts for |
||
48 | * uix type ) |
||
49 | * |
||
50 | * @since 1.0.0 |
||
51 | * @access public |
||
52 | */ |
||
53 | 1 | public function set_assets() { |
|
62 | |||
63 | /** |
||
64 | * Returns the main input field for rendering |
||
65 | * |
||
66 | * @since 1.0.0 |
||
67 | * @see \uix\ui\uix |
||
68 | * @access public |
||
69 | * @return string Input field HTML string |
||
70 | */ |
||
71 | 1 | public function input() { |
|
83 | 1 | ||
84 | /** |
||
85 | * Returns code needed for the preview image. |
||
86 | * |
||
87 | * @since 3.0.0 |
||
88 | * @see \uix\ui\uix |
||
89 | * @access public |
||
90 | * |
||
91 | * @param string $preview_size The size of the preview image. |
||
92 | * |
||
93 | * @return string HTML string of the preview. |
||
94 | */ |
||
95 | public function preview( $preview_size ) { |
||
104 | |||
105 | /** |
||
106 | * Render the Control preview. |
||
107 | * |
||
108 | * @since 1.0.0 |
||
109 | * @access public |
||
110 | * |
||
111 | * @param string $preview_size The size of the preview. |
||
112 | * |
||
113 | * @return string HTML of rendered preview. |
||
114 | */ |
||
115 | private function get_preview( $preview_size ) { |
||
124 | |||
125 | /** |
||
126 | * Get the URL of the image of the control. |
||
127 | * |
||
128 | * @since 3.0.0 |
||
129 | * @access public |
||
130 | * |
||
131 | * @param string $size The size of image to get url for. |
||
132 | * |
||
133 | * @return string URL to the requested image. |
||
134 | */ |
||
135 | public function get_url( $size ) { |
||
148 | } |
||
149 |