You are here

Ip2LongArgument.php in IP address manager 8.2

Same filename and directory in other branches
  1. 7.2 src/Plugin/views/argument/Ip2LongArgument.php

File

src/Plugin/views/argument/Ip2LongArgument.php
View source
<?php

/**
 * @file
 * Contains \Drupal\ip\Plugin\views\argument\Ip2LongArgument.
 */
namespace Drupal\ip\Plugin\views\argument;

use Drupal\views\Plugin\views\argument\ArgumentPluginBase;

/**
 * Ip2long implementation of the base argument plugin.
 *
 * @ingroup views_argument_handlers
 *
 * @ViewsArgument("ip2long")
 */
class Ip2LongArgument extends ArgumentPluginBase {
  function query($group_by = FALSE) {
    $this
      ->ensureMyTable();
    $this->query
      ->addWhere(0, "{$this->tableAlias}.{$this->realField}", ip2long($this->argument));
  }

}

Classes

Namesort descending Description
Ip2LongArgument Ip2long implementation of the base argument plugin.