GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
|
If this file is called directly, abort. More...
Public Member Functions | |
get_item ( $request) | |
Get one view. More... | |
get_item_permissions_check ( $request) | |
get_items ( $request) | |
Get a collection of views. More... | |
get_items_permissions_check ( $request) | |
get_sub_item ( $request) | |
Get one entry from view. More... | |
get_sub_item_permissions_check ( $request) | |
get_sub_items_permissions_check ( $request) | |
prepare_entry_for_response ( $view, $entry, \WP_REST_Request $request, $context, $class=null) | |
Prepare the item for the REST response. More... | |
prepare_view_for_response ( $view_post, \WP_REST_Request $request) | |
Prepare the item for the REST response. More... | |
Public Member Functions inherited from Route | |
__call ( $method, $args) | |
Fallback if subclass doesn't define routes. More... | |
create_item ( $request) | |
Create one item from the collection. More... | |
create_item_permissions_check ( $request) | |
Check if a given request has access to create items. More... | |
create_sub_item ( $request) | |
Create one item from the collection. More... | |
delete_item ( $request) | |
Delete one item from the collection. More... | |
delete_item_permissions_check ( $request) | |
Check if a given request has access to delete a specific item. More... | |
delete_sub_item ( $request) | |
Delete one item from the collection for sub items. More... | |
get_item ( $request) | |
Get one item from the collection. More... | |
get_item_permissions_check ( $request) | |
Check if a given request has access to get a specific item. More... | |
get_items ( $request) | |
Get a collection of items. More... | |
get_items_permissions_check ( $request) | |
Check if a given request has access to get items. More... | |
get_sub_item ( $request) | |
Get one item from the collection. More... | |
get_sub_items ( $request) | |
Get a collection of items. More... | |
prepare_item_for_response ( $item, $request) | |
Prepare the item for the REST response. More... | |
register_routes () | |
Register the routes for the objects of the controller. More... | |
update_item ( $request) | |
Update one item from the collection. More... | |
update_item_permissions_check ( $request) | |
Check if a given request has access to update a specific item. More... | |
update_sub_item ( $request) | |
Update one item from the collection for sub items. More... | |
Protected Attributes | |
$route_name = 'views' | |
Route Name. More... | |
$sub_type = 'entries' | |
Protected Attributes inherited from Route | |
$route_name | |
$sub_type | |
Additional Inherited Members | |
Protected Member Functions inherited from Route | |
get_route_name () | |
Get route name. More... | |
get_sub_type () | |
Get sub_type. More... | |
not_implemented () | |
Generic response for routes not yet implemented. More... | |
prepare_item_for_database ( $request) | |
Prepare the item for create or update operation. More... | |
If this file is called directly, abort.
Definition at line 18 of file class-gv-rest-views-route.php.
get_item | ( | $request | ) |
Get one view.
Callback for /v1/views/{id}/
\WP_REST_Request | $request | Full data about the request. |
Definition at line 81 of file class-gv-rest-views-route.php.
References $url, $view_id, and Views_Route\prepare_view_for_response().
get_item_permissions_check | ( | $request | ) |
\WP_REST_Request | $request |
gravityview/view/output/rest
Disable rest output. Final chance. bool | Enable or not. | |
\GV\View | $view | The view. |
Definition at line 417 of file class-gv-rest-views-route.php.
References $url, $view_id, and View\by_id().
Referenced by Views_Route\get_sub_items_permissions_check(), and Views_Route\prepare_view_for_response().
get_items | ( | $request | ) |
Get a collection of views.
Callback for GET /v1/views/
\WP_REST_Request | $request | Full data about the request. |
Definition at line 47 of file class-gv-rest-views-route.php.
References GVCommon\get_all_views(), and Views_Route\prepare_view_for_response().
get_items_permissions_check | ( | $request | ) |
Definition at line 500 of file class-gv-rest-views-route.php.
Referenced by Views_Route\get_sub_item_permissions_check().
get_sub_item | ( | $request | ) |
Get one entry from view.
Callback for /v1/views/{id}/entries/{id}/
\WP_REST_Request | $request | Full data about the request. |
Definition at line 343 of file class-gv-rest-views-route.php.
References $entry, $format, $url, $view_id, GF_Entry\by_id(), View\by_id(), Utils\get(), and Views_Route\prepare_entry_for_response().
get_sub_item_permissions_check | ( | $request | ) |
Definition at line 461 of file class-gv-rest-views-route.php.
References $entry, $url, $view_id, GF_Entry\by_id(), View\by_id(), Entry\get_endpoint_name(), Views_Route\get_items_permissions_check(), GVCommon\has_cap(), GravityView_Entry_Approval_Status\is_approved(), and GravityView_Entry_Approval\meta_key.
get_sub_items_permissions_check | ( | $request | ) |
Definition at line 505 of file class-gv-rest-views-route.php.
References Views_Route\get_item_permissions_check().
prepare_entry_for_response | ( | $view, | |
$entry, | |||
\WP_REST_Request | $request, | ||
$context, | |||
$class = null |
|||
) |
Prepare the item for the REST response.
\GV\View | $view | The view. |
\GV\Entry | $entry | WordPress representation of the item. |
\WP_REST_Request | $request | Request object. |
string | $context | The context (directory, single) |
string | $class | The value renderer. Default: null (raw value) |
gravityview/rest/entry/fields
Allow more entry fields that are output in regular REST requests. array | $allowed | The allowed ones, default by_visible, by_position( "context_*" ), i.e. as set in the view. |
\GV\View | $view | The view. |
\GV\Entry | $entry | The entry. |
\WP_REST_Request | $request | Request object. |
string | $context | The context (directory, single) |
Modify non-unique IDs (custom, id, etc.) to be unique and not gobbled up.
gravityview/api/field/key
Filter the key name in the results for JSON output. string | $field_id | The ID. Should be unique or keys will be gobbled up. |
\GV\View | $view | The view. |
\GV\Entry | $entry | The entry. |
\WP_REST_Request | $request | Request object. |
string | $context | The context (directory, single) |
Custom fields (and perhaps some others) will require rendering as they don't contain an intrinsic value (for custom their value is stored in the view and requires a renderer). We force the CSV template to take over in such cases, it's good enough for most cases.
Definition at line 112 of file class-gv-rest-views-route.php.
References $class, $entries, $entry, $field, $field_id, $format, $output, $post, $url, $view_id, Internal_Field\by_id(), GF_Field\by_id(), View\by_id(), endswitch, View_Collection\from_post(), Utils\get(), and Route\get_sub_items().
Referenced by Views_Route\get_sub_item().
prepare_view_for_response | ( | $view_post, | |
\WP_REST_Request | $request | ||
) |
Prepare the item for the REST response.
\WP_Post | $view_post | WordPress representation of the item. |
\WP_REST_Request | $request | Request object. |
Definition at line 368 of file class-gv-rest-views-route.php.
References View\from_post(), Views_Route\get_item_permissions_check(), and GVCommon\has_cap().
Referenced by Views_Route\get_item(), and Views_Route\get_items().
|
protected |
|
protected |
Definition at line 36 of file class-gv-rest-views-route.php.