You are here

Long2IpField.php in IP address manager 7.2

Same filename and directory in other branches
  1. 8.2 src/Plugin/views/field/Long2IpField.php

Contains the ip_views_handler_field_long2ip class.

File

src/Plugin/views/field/Long2IpField.php
View source
<?php

/**
 * @file
 * Contains the ip_views_handler_field_long2ip class.
 */

/**
 * A handler to provide proper displays IP Long values
 */
class Long2IpField extends views_handler_field {

  // @TODO option to link or not to address manage page
  function render($values) {
    $value = $this
      ->get_value($values);
    $long2ip = !empty($value) ? long2ip($value) : NULL;
    return !empty($long2ip) ? $long2ip : NULL;
  }

}

Classes

Namesort descending Description
Long2IpField A handler to provide proper displays IP Long values