1 | <?php |
||
14 | class MetaBox extends Component |
||
15 | { |
||
16 | use Condition; |
||
17 | use Instruction; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | const ID = 'metaboxes'; |
||
23 | |||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | public $metaboxes = []; |
||
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | public function init() |
||
42 | |||
43 | /** |
||
44 | * @param string $name |
||
45 | * @param mixed ...$args |
||
46 | * @return void |
||
47 | */ |
||
48 | public function action( $name, ...$args ) |
||
52 | |||
53 | /** |
||
54 | * @param string $name |
||
55 | * @param mixed ...$args |
||
56 | * @return mixed |
||
57 | */ |
||
58 | public function filter( $name, ...$args ) |
||
62 | |||
63 | /** |
||
64 | * @param string $key |
||
65 | * @param mixed $fallback |
||
66 | * @param string $group |
||
67 | * @return string|array |
||
68 | */ |
||
69 | public function getMetaValue( $key, $fallback = '', $group = '' ) |
||
75 | |||
76 | /** |
||
77 | * @return array |
||
78 | * @filter rwmb_meta_boxes |
||
79 | */ |
||
80 | public function register() |
||
93 | |||
94 | /** |
||
95 | * @return string |
||
96 | * @filter rwmb_outer_html |
||
97 | */ |
||
98 | public function renderField( $html, $field ) |
||
104 | |||
105 | /** |
||
106 | * @return bool |
||
107 | * @filter rwmb_show |
||
108 | */ |
||
109 | public function show( $bool, array $metabox ) |
||
118 | |||
119 | /** |
||
120 | * @return int |
||
121 | */ |
||
122 | protected function getPostId() |
||
129 | |||
130 | /** |
||
131 | * @return array |
||
132 | */ |
||
133 | protected function getPostTypes() |
||
142 | |||
143 | /** |
||
144 | * @return bool |
||
145 | */ |
||
146 | protected function hasPostType( array $metabox ) |
||
153 | |||
154 | /** |
||
155 | * @return void |
||
156 | */ |
||
157 | protected function normalize( array $metaboxes, array $defaults = [] ) |
||
172 | |||
173 | /** |
||
174 | * @param string $depends |
||
175 | * @param string $parentId |
||
176 | * @return string |
||
177 | */ |
||
178 | protected function normalizeDepends( $depends, array $data, $parentId ) |
||
184 | |||
185 | /** |
||
186 | * @param string $name |
||
187 | * @param string $parentId |
||
188 | * @return string |
||
189 | */ |
||
190 | protected function normalizeFieldName( $name, array $data, $parentId ) |
||
194 | |||
195 | /** |
||
196 | * @return array |
||
197 | */ |
||
198 | protected function normalizeFields( array $fields, array $data, $parentId ) |
||
213 | |||
214 | /** |
||
215 | * @param string $id |
||
216 | * @param string $parentId |
||
217 | * @return string |
||
218 | */ |
||
219 | protected function normalizeId( $id, array $data, $parentId ) |
||
223 | |||
224 | /** |
||
225 | * @param mixed $types |
||
226 | * @return array |
||
227 | */ |
||
228 | protected function normalizePostTypes( $types ) |
||
232 | |||
233 | /** |
||
234 | * @return array |
||
235 | */ |
||
236 | protected function normalizeValidation( array $validation, array $data, $parentId ) |
||
247 | |||
248 | /** |
||
249 | * @return array |
||
250 | */ |
||
251 | protected function setDependencies( array $metabox ) |
||
265 | } |
||
266 |