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() |
||
44 | |||
45 | /** |
||
46 | * @param string $name |
||
47 | * @param mixed ...$args |
||
48 | * @return void |
||
49 | */ |
||
50 | public function action( $name, ...$args ) |
||
54 | |||
55 | /** |
||
56 | * @param string $name |
||
57 | * @param mixed ...$args |
||
58 | * @return mixed |
||
59 | */ |
||
60 | public function filter( $name, ...$args ) |
||
64 | |||
65 | /** |
||
66 | * @param string $key |
||
67 | * @param mixed $fallback |
||
68 | * @param string $group |
||
69 | * @return string|array |
||
70 | */ |
||
71 | public function getMetaValue( $key, $fallback = '', $group = '' ) |
||
77 | |||
78 | /** |
||
79 | * @return array |
||
80 | * @filter rwmb_meta_boxes |
||
81 | */ |
||
82 | public function register() |
||
95 | |||
96 | /** |
||
97 | * @return string |
||
98 | * @filter rwmb_outer_html |
||
99 | */ |
||
100 | public function renderField( $html, $field ) |
||
106 | |||
107 | /** |
||
108 | * @return bool |
||
109 | * @filter rwmb_show |
||
110 | */ |
||
111 | public function show( $bool, array $metabox ) |
||
120 | |||
121 | /** |
||
122 | * @return int |
||
123 | */ |
||
124 | protected function getPostId() |
||
131 | |||
132 | /** |
||
133 | * @return array |
||
134 | */ |
||
135 | protected function getPostTypes() |
||
144 | |||
145 | /** |
||
146 | * @return bool |
||
147 | */ |
||
148 | protected function hasPostType( array $metabox ) |
||
155 | |||
156 | /** |
||
157 | * @return void |
||
158 | */ |
||
159 | protected function normalize( array $metaboxes, array $defaults = [] ) |
||
174 | |||
175 | /** |
||
176 | * @param string $depends |
||
177 | * @param string $parentId |
||
178 | * @return string |
||
179 | */ |
||
180 | protected function normalizeDepends( $depends, array $data, $parentId ) |
||
186 | |||
187 | /** |
||
188 | * @param string $name |
||
189 | * @param string $parentId |
||
190 | * @return string |
||
191 | */ |
||
192 | protected function normalizeFieldName( $name, array $data, $parentId ) |
||
196 | |||
197 | /** |
||
198 | * @return array |
||
199 | */ |
||
200 | protected function normalizeFields( array $fields, array $data, $parentId ) |
||
215 | |||
216 | /** |
||
217 | * @param string $id |
||
218 | * @param string $parentId |
||
219 | * @return string |
||
220 | */ |
||
221 | protected function normalizeId( $id, array $data, $parentId ) |
||
225 | |||
226 | /** |
||
227 | * @param mixed $types |
||
228 | * @return array |
||
229 | */ |
||
230 | protected function normalizePostTypes( $types ) |
||
234 | |||
235 | /** |
||
236 | * @return array |
||
237 | */ |
||
238 | protected function normalizeValidation( array $validation, array $data, $parentId ) |
||
249 | |||
250 | /** |
||
251 | * @return array |
||
252 | */ |
||
253 | protected function setDependencies( array $metabox ) |
||
267 | } |
||
268 |