base-list-box.php
2 years ago
base-meta-box.php
2 years ago
base-table-box.php
2 years ago
meta-box-options-converter.php
2 years ago
meta-box-options.php
2 years ago
meta-box-update-callback.php
2 years ago
meta-table-options-converter.php
2 years ago
meta-table-options.php
2 years ago
meta-box-options-converter.php
35 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace Jet_Form_Builder\Admin\Single_Pages\Meta_Boxes; |
| 5 | |
| 6 | use Jet_Form_Builder\Classes\Arrayable\Arrayable; |
| 7 | |
| 8 | // If this file is called directly, abort. |
| 9 | if ( ! defined( 'WPINC' ) ) { |
| 10 | die; |
| 11 | } |
| 12 | |
| 13 | class Meta_Box_Options_Converter implements Arrayable { |
| 14 | |
| 15 | protected $editable_table = false; |
| 16 | protected $editable_table_control = false; |
| 17 | |
| 18 | public function __construct( Meta_Box_Options $box ) { |
| 19 | $this->editable_table = $box->is_editable_table(); |
| 20 | $this->editable_table_control = $box->is_editable_table_control(); |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * Get the instance as an array. |
| 25 | * |
| 26 | * @return array |
| 27 | */ |
| 28 | public function to_array(): array { |
| 29 | return array( |
| 30 | 'is_editable_table' => $this->editable_table, |
| 31 | 'is_editable_table_control' => $this->editable_table_control, |
| 32 | ); |
| 33 | } |
| 34 | } |
| 35 |