You are here

NumericArgumentValidator.php in Zircon Profile 8

File

core/modules/views/src/Plugin/views/argument_validator/NumericArgumentValidator.php
View source
<?php

/**
 * @file
 * Contains \Drupal\views\Plugin\views\argument_validator\NumericArgumentValidator.
 */
namespace Drupal\views\Plugin\views\argument_validator;


/**
 * Validate whether an argument is numeric or not.
 *
 * @ingroup views_argument_validate_plugins
 *
 * @ViewsArgumentValidator(
 *   id = "numeric",
 *   title = @Translation("Numeric")
 * )
 */
class NumericArgumentValidator extends ArgumentValidatorPluginBase {
  public function validateArgument($argument) {
    return is_numeric($argument);
  }

}

Classes

Namesort descending Description
NumericArgumentValidator Validate whether an argument is numeric or not.