You are here

ContentLockViewsHandlerFilterLocked.inc in Content locking (anti-concurrent editing) 7.2

Same filename and directory in other branches
  1. 7.3 views/ContentLockViewsHandlerFilterLocked.inc

Handler to filter based on locked nodes.

File

views/ContentLockViewsHandlerFilterLocked.inc
View source
<?php

/**
 * @file
 * Handler to filter based on locked nodes.
 */

/**
 * Class ContentLockViewsHandlerFilterLocked.
 */
class ContentLockViewsHandlerFilterLocked extends views_handler_filter_boolean_operator {

  /**
   * Query.
   */
  public function query() {
    $this
      ->ensure_my_table();
    if (empty($this->value)) {
      $this->query
        ->add_where($this->options['group'], $this->table_alias . ".timestamp", "NULL", "=");
    }
    else {
      $this->query
        ->add_where($this->options['group'], $this->table_alias . ".timestamp", "NULL", "<>");
    }
  }

}

Classes

Namesort descending Description
ContentLockViewsHandlerFilterLocked Class ContentLockViewsHandlerFilterLocked.