-
Notifications
You must be signed in to change notification settings - Fork 10
/
WP_Form_Component.php
57 lines (47 loc) · 1.04 KB
/
WP_Form_Component.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
interface WP_Form_Component {
/**
* @return string The rendered component, as defined by its current view
*/
public function render();
/**
* @return string The component type
*/
public function get_type();
/**
* @return string The component's ID
*/
public function get_id();
/**
* @return string The component's name
*/
public function get_name();
/**
* @return WP_Form_View_Interface The view that
* will render the component
*/
public function get_view();
/**
* @return int The sorting priority
* of the component. Smaller numbers
* come before larger numbers.
*/
public function get_priority();
/**
* @return array A list of errors for this component
*/
public function get_errors();
/**
* Set an error on this component.
*
* @param string $error
* @return WP_Form_Component
*/
public function set_error( $error );
/**
* Clear all errors that have been set on this component.
*
* @return WP_Form_Component
*/
public function clear_errors();
}