GravityView  2.5
The best, easiest way to display Gravity Forms entries on your website.
class-gv-source.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\Source class.
11  *
12  * Contains the source for \GV\Field values.
13  *
14  * For example, "gravityview" fields, like custom content, are sourced
15  * from the \GV\View and its \GV\Field configuration. While "gravityforms"
16  * fields are sourced from \GV\Entry instances.
17  */
18 abstract class Source {
19 
20  /**
21  * @var string BACKEND_INTERNAL The backend identifier for special GravityView data sources
22  * like custom content and the like. Not really a form, but a source nevertheless.
23  */
24  const BACKEND_INTERNAL = 'internal';
25 
26  /**
27  * @var string BACKEND_GRAVITYFORMS The backend identifier for special GravityView data sources
28  * like custom content and the like. Not really a form, but a source nevertheless.
29  */
30  const BACKEND_GRAVITYFORMS = 'gravityforms';
31 
32  /**
33  * @var string The identifier of the backend used for this source.
34  *
35  * @see Constant backend identifiers above and \GV\Source subclasses.
36  *
37  * @api
38  * @since 2.0
39  */
40  public static $backend = null;
41 
42  /**
43  * Get a \GV\Field instance by ID.
44  *
45  * Accepts a variable number of arguments, see implementations.
46  *
47  * @return \GV\Field|null A \GV\Field instance.
48  */
49  public static function get_field( /** varargs */ ) {
50  gravityview()->log->error( '{source}::get_field not implemented in {source}', array( 'source' => get_called_class() ) );
51  return null;
52  }
53 }
static get_field()
Get a instance by ID.
If this file is called directly, abort.
gravityview()
Definition: _stubs.php:26