Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function compose(): void |
||
16 | { |
||
17 | if (empty($this->name)) { |
||
18 | throw BlockException::forEmptyName(); |
||
19 | } |
||
20 | |||
21 | CarbonFieldsBlock::make($this->name) |
||
22 | ->add_fields($this->fields()) |
||
|
|||
23 | ->set_description($this->description) |
||
24 | ->set_category($this->category) |
||
25 | ->set_icon($this->icon) |
||
26 | ->set_keywords($this->keywords) |
||
27 | ->set_inner_blocks($this->nested) |
||
28 | ->set_inner_blocks_position($this->nestedPosition) |
||
29 | ->set_inner_blocks_template($this->nestedTemplates) |
||
30 | ->set_inner_blocks_template_lock($this->nestedLock) |
||
31 | ->set_allowed_inner_blocks($this->nestedBlocks) |
||
32 | ->set_parent($this->parent) |
||
33 | ->set_render_callback([$this, 'render']); |
||
34 | } |
||
36 |