protected function WebformSubmissionCastToNumberTrait::castToDataType in Webform Views Integration 8.5
Cast a given SQL snippet to data type expected by this handler.
Parameters
string $value: SQL snippet that should be casted
Return value
string SQL snippet that casts provided $value to necessary data type
4 calls to WebformSubmissionCastToNumberTrait::castToDataType()
- WebformSubmissionFieldNumeric::clickSort in src/
Plugin/ views/ field/ WebformSubmissionFieldNumeric.php - Adds an ORDER BY clause to the query for click sort columns.
- WebformSubmissionFieldNumericSort::query in src/
Plugin/ views/ sort/ WebformSubmissionFieldNumericSort.php - Called to add the sort to a query.
- WebformSubmissionNumericFilter::opBetween in src/
Plugin/ views/ filter/ WebformSubmissionNumericFilter.php - Filters by operator between.
- WebformSubmissionNumericFilter::opSimple in src/
Plugin/ views/ filter/ WebformSubmissionNumericFilter.php
File
- src/
Plugin/ views/ WebformSubmissionCastToNumberTrait.php, line 19
Class
- WebformSubmissionCastToNumberTrait
- Trait to cast a SQL expression to numeric data type.
Namespace
Drupal\webform_views\Plugin\viewsCode
protected function castToDataType($value) {
return "({$value} + 0)";
}