-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathWP_Form_Aggregate.php
More file actions
47 lines (41 loc) · 996 Bytes
/
Copy pathWP_Form_Aggregate.php
File metadata and controls
47 lines (41 loc) · 996 Bytes
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
<?php
/**
* A form component that can have children
*/
interface WP_Form_Aggregate extends WP_Form_Component {
/**
* Add a child component
*
* @param WP_Form_Component $element
* @param string $key A unique key for the component.
* Any existing component with the same key
* will be overwritten. If $key is empty,
* an attempt will be made to generate a
* unique key.
*
* @return WP_Form_Aggregate
*/
public function add_element( WP_Form_Component $element, $key = '' );
/**
* Remove a child component
*
* @param string $key
*
* @return WP_Form_Aggregate
*/
public function remove_element( $key );
/**
* Get the element with the given key
*
* @param string $key
*
* @return WP_Form_Component|NULL
*/
public function get_element( $key );
/**
* Get an array of all child components.
*
* @return WP_Form_Component[]
*/
public function get_children();
}