GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
class-gv-source-internal.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\Internal_Source class.
11  *
12  * Data that comes from within the View itself (like custom content).
13  */
14 class Internal_Source extends Source {
15 
16  /**
17  * @var string The identifier of the backend used for this source.
18  *
19  * @api
20  * @since 2.0
21  */
22  public static $backend = self::BACKEND_INTERNAL;
23 
24  /**
25  * Get a \GV\Field by Field ID for this data source.
26  *
27  * @param int $field_id The internal field ID (custom content, etc.)
28  *
29  * @return \GV\Field|null The requested field or null if not found.
30  */
31  public static function get_field( /** varargs */ ) {
32  $args = func_get_args();
33 
34  if ( ! is_array( $args ) || count( $args ) != 1 ) {
35  gravityview()->log->error( '{source} expects 1 arguments for ::get_field ($field_id)', array( 'source' => __CLASS__ ) );
36  return null;
37  }
38 
39  /** Unwrap the arguments. */
40  list( $field_id ) = $args;
41 
42  /** Wrap it up into a \GV\Field. */
43  return \GV\Internal_Field::by_id( $field_id );
44  }
45 }
If this file is called directly, abort.
static get_field()
Get a by Field ID for this data source.
If this file is called directly, abort.
gravityview()
The main GravityView wrapper function.
if(false !==strpos( $value, '00:00')) $field_id
string $field_id ID of the field being displayed
Definition: time.php:22