PluginProbe
JetFormBuilder — Dynamic Blocks Form Builder / 3.6.6
JetFormBuilder — Dynamic Blocks Form Builder v3.6.6
3.6.6.1 3.6.6 3.6.5.4 3.6.5.3 3.6.5.2 3.6.5.1 3.6.5 3.6.4.2 3.6.4.1 3.6.4 3.6.3.1 3.6.3 3.6.2.2 3.6.2.1 3.6.2 3.6.1.1 3.6.1 3.6.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 All 134 releases
jetformbuilder / includes / admin / single-pages / meta-boxes / base-list-box.php

base-list-box.php in JetFormBuilder — Dynamic Blocks Form Builder 3.6.6, at includes/admin/single-pages/meta-boxes/base-list-box.php

73 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 namespace Jet_Form_Builder\Admin\Single_Pages\Meta_Boxes;
5
6 use Jet_Form_Builder\Admin\Pages\Actions\Base_Page_Action;
7 use Jet_Form_Builder\Classes\Arrayable\Array_Tools;
8 use Jet_Form_Builder\Rest_Api\Rest_Endpoint;
9 use Jet_Form_Builder\Rest_Api\Traits\Rest_Fetch_Endpoint;
10 use JFB_Components\Admin\Page\Traits\Table_Advanced_Record_Prepare_Trait;
11
12 // If this file is called directly, abort.
13 if ( ! defined( 'WPINC' ) ) {
14 die;
15 }
16
17 abstract class Base_List_Box extends Base_Meta_Box implements
18 Rest_Fetch_Endpoint,
19 Meta_Box_Options {
20
21 use Table_Advanced_Record_Prepare_Trait;
22
23 final public function get_values(): array {
24 return $this->prepare_record( $this->get_list() );
25 }
26
27 public function get_raw_list( array $args ): array {
28 return array();
29 }
30
31 public function get_single(): array {
32 return array();
33 }
34
35 public function get_rest_url(): string {
36 return '';
37 }
38
39 public function get_rest_methods(): string {
40 return '';
41 }
42
43 public function is_editable_table(): bool {
44 return false;
45 }
46
47 public function is_editable_table_control(): bool {
48 return false;
49 }
50
51 /**
52 * @return Base_Page_Action[]
53 */
54 public function get_actions(): array {
55 return array();
56 }
57
58 public function to_array(): array {
59 return array_merge(
60 parent::to_array(),
61 ( new Meta_Box_Options_Converter( $this ) )->to_array(),
62 array(
63 'columns' => $this->get_columns_headings(),
64 'single_endpoint' => $this->get_single(),
65 'render_type' => self::TYPE_LIST,
66 'receive_url' => ( new Rest_Endpoint( $this ) )->to_array(),
67 'box_actions' => Array_Tools::to_array( $this->get_actions() ),
68 )
69 );
70 }
71
72 }
73