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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
<?php
namespace AutomateWoo\Actions;
use AutomateWoo\Fields\Field;
/** * Interface ActionInterface * * @since 5.2.0 */ interface ActionInterface {
/** * Get the action's name. * * @return string */ public function get_name();
/** * Set the action's name. * * @param string $name */ public function set_name( $name );
/** * Get the action's title. * * @param bool $prepend_group * * @return string */ public function get_title( $prepend_group = false );
/** * Get the action's group. * * @return string */ public function get_group();
/** * Get the action's description. * * @return string */ public function get_description();
/** * Gets specific field belonging to the action. * * @param string $name * * @return Field|false */ public function get_field( $name );
/** * Gets the action's fields. * * @return Field[] */ public function get_fields();
/** * Get a list of required field names. * * @since 6.0.10 * * @return Field[] */ public function get_required_fields(): array;
/** * Set the action's options. * * @param array $options */ public function set_options( $options );
/** * Returns an option for use when running the action. * * Option value will already have been sanitized by it's field ::sanitize_value() method. * * @param string $field_name * @param bool $process_variables * @param bool $allow_html * * @return mixed Will vary depending on the field type specified in the action's fields. */ public function get_option( $field_name, $process_variables = false, $allow_html = false );
/** * Get an option for use when editing the action. * * The value will be already sanitized by the field object. * This is used to displaying an option value for editing. * * @param string $field_name * * @return mixed */ public function get_option_raw( $field_name );
/** * Run the action. * * @throws \Exception When an error occurs. */ public function run(); }
|