GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
class-gv-renderer-entry-edit.php
Go to the documentation of this file.
1 <?php
2 namespace GV;
3 
4 /** If this file is called directly, abort. */
5 if ( ! defined( 'GRAVITYVIEW_DIR' ) ) {
6  die();
7 }
8 
9 /**
10  * The \GV\Edit_Entry_Renderer class.
11  *
12  * The edit entry renderer.
13  */
15 
16  /**
17  * Renders a an editable \GV\Entry instance.
18  *
19  * @param \GV\Entry $entry The Entry instance to render.
20  * @param \GV\View $view The View connected to the entry.
21  * @param \GV\Request $request The request context we're currently in. Default: `gravityview()->request`
22  *
23  * @todo Just a wrapper around the old code. Cheating. Needs rewrite :)
24  *
25  * @api
26  * @since 2.0
27  *
28  * @return string The rendered Entry edit screen.
29  */
30  public function render( Entry $entry, View $view, Request $request = null ) {
31  $entries = new \GV\Entry_Collection();
32  $entries->add( $entry );
33 
35  'view' => $view,
36  'entries' => $entries,
37  ) );
38 
39  ob_start();
40  do_action( 'gravityview_edit_entry', null, $entry, $view, $request );
41 
43 
44  return ob_get_clean();
45  }
46 }
If this file is called directly, abort.
If this file is called directly, abort.
$entries
static pop()
Restores last saved state and context.
Definition: _mocks.php:410
static push( $configuration)
Set the state depending on the provided configuration.
Definition: _mocks.php:400
render(Entry $entry, View $view, Request $request=null)
Renders a an editable instance.
If this file is called directly, abort.
If this file is called directly, abort.
If this file is called directly, abort.
$entry
Definition: notes.php:27