public static function DevelGenerateBase::isNumber in Devel 8.3
Same name and namespace in other branches
- 8 devel_generate/src/DevelGenerateBase.php \Drupal\devel_generate\DevelGenerateBase::isNumber()
- 8.2 devel_generate/src/DevelGenerateBase.php \Drupal\devel_generate\DevelGenerateBase::isNumber()
- 4.x devel_generate/src/DevelGenerateBase.php \Drupal\devel_generate\DevelGenerateBase::isNumber()
Check if a given param is a number.
Parameters
mixed $number: The parameter to check.
Return value
bool TRUE if the parameter is a number, FALSE otherwise.
3 calls to DevelGenerateBase::isNumber()
- MenuDevelGenerate::validateDrushParams in devel_generate/
src/ Plugin/ DevelGenerate/ MenuDevelGenerate.php - Responsible for validating Drush params.
- TermDevelGenerate::validateDrushParams in devel_generate/
src/ Plugin/ DevelGenerate/ TermDevelGenerate.php - Responsible for validating Drush params.
- VocabularyDevelGenerate::validateDrushParams in devel_generate/
src/ Plugin/ DevelGenerate/ VocabularyDevelGenerate.php - Responsible for validating Drush params.
File
- devel_generate/
src/ DevelGenerateBase.php, line 168
Class
- DevelGenerateBase
- Provides a base DevelGenerate plugin implementation.
Namespace
Drupal\devel_generateCode
public static function isNumber($number) {
if ($number == NULL) {
return FALSE;
}
if (!is_numeric($number)) {
return FALSE;
}
return TRUE;
}