NumericArgumentValidator.php in Zircon Profile 8
Same filename and directory in other branches
File
core/modules/views/src/Plugin/views/argument_validator/NumericArgumentValidator.phpView 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
Name | Description |
---|---|
NumericArgumentValidator | Validate whether an argument is numeric or not. |