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 / actions / base-rest-page-action.php

base-rest-page-action.php in JetFormBuilder — Dynamic Blocks Form Builder 3.6.6, at includes/admin/single-pages/actions/base-rest-page-action.php

29 lines 652 B
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\Actions;
5
6 use Jet_Form_Builder\Admin\Pages\Actions\Base_Page_Action;
7 use Jet_Form_Builder\Rest_Api\Rest_Endpoint;
8 use Jet_Form_Builder\Rest_Api\Traits\Rest_Fetch_Endpoint;
9
10 // If this file is called directly, abort.
11 if ( ! defined( 'WPINC' ) ) {
12 die;
13 }
14
15 abstract class Base_Rest_Page_Action extends Base_Page_Action implements Rest_Fetch_Endpoint {
16
17 public function get_payload(): array {
18 return array();
19 }
20
21 public function to_array(): array {
22 return parent::to_array() + array(
23 'endpoint' => ( new Rest_Endpoint( $this ) )->to_array(),
24 'payload' => $this->get_payload(),
25 );
26 }
27
28 }
29