WebformSubmissionFieldNumeric.php in Webform Views Integration 8.5
File
src/Plugin/views/field/WebformSubmissionFieldNumeric.php
View source
<?php
namespace Drupal\webform_views\Plugin\views\field;
use Drupal\webform_views\Plugin\views\WebformSubmissionCastToNumberTrait;
class WebformSubmissionFieldNumeric extends WebformSubmissionField {
use WebformSubmissionCastToNumberTrait;
public function clickSort($order) {
$this
->ensureMyTable();
$field = $this->query
->addField(NULL, $this
->castToDataType($this->tableAlias . '.' . $this->realField), $this->realField . '_sort');
$params = $this->options['group_type'] != 'group' ? [
'function' => $this->options['group_type'],
] : [];
$this->query
->addOrderBy(NULL, NULL, $order, $field, $params);
}
}