GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
_mocks.isnull.php
Go to the documentation of this file.
1 <?php
2 namespace GV\Mocks;
3 
4 /**
5  * Gravity Forms GF_Query does not support NULL condition clauses.
6  *
7  * Implement them as needed.
8  */
9 class GF_Query_Condition_IS_NULL extends \GF_Query_Condition {
10  private $override_placeholder = '{GF_Query_Condition_IS_NULL_override}';
11 
12  public function __construct( $left = null, $operator = null, $right = null ) {
13  parent::__construct( $left, self::EQ, new \GF_Query_Literal( $this->override_placeholder ) );
14  }
15 
16  public function sql( $query ) {
17  return str_replace( "= '{$this->override_placeholder}'", 'IS NULL', parent::sql( $query ) );
18  }
19 }
__construct( $left=null, $operator=null, $right=null)
Gravity Forms GF_Query does not support NULL condition clauses.