class CastSql
Same name in other branches
- 10 core/modules/views/src/Plugin/views/query/CastSql.php \Drupal\views\Plugin\views\query\CastSql
Cast handling in SQL.
Hierarchy
- class \Drupal\views\Plugin\views\query\CastSql implements \Drupal\views\Plugin\views\query\CastSqlInterface
Expanded class hierarchy of CastSql
1 string reference to 'CastSql'
- views.services.yml in core/
modules/ views/ views.services.yml - core/modules/views/views.services.yml
1 service uses CastSql
- views.cast_sql in core/
modules/ views/ views.services.yml - Drupal\views\Plugin\views\query\CastSql
File
-
core/
modules/ views/ src/ Plugin/ views/ query/ CastSql.php, line 8
Namespace
Drupal\views\Plugin\views\queryView source
class CastSql implements CastSqlInterface {
/**
* {@inheritdoc}
*/
public function getFieldAsInt(string $field) : string {
return "CAST({$field} AS INTEGER)";
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
CastSql::getFieldAsInt | public | function | Overrides CastSqlInterface::getFieldAsInt |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.