function String::get_formula in Views (for Drupal 7) 8.3
Get the formula for this argument.
$this->ensureMyTable() MUST have been called prior to this.
2 calls to String::get_formula()
- String::query in lib/
Drupal/ views/ Plugin/ views/ argument/ String.php - Build the query based upon the formula
- String::summary_query in lib/
Drupal/ views/ Plugin/ views/ argument/ String.php - Build the summary query based on a string
File
- lib/
Drupal/ views/ Plugin/ views/ argument/ String.php, line 175 - Definition of Drupal\views\Plugin\views\argument\String.
Class
- String
- Basic argument handler to implement string arguments that may have length limits.
Namespace
Drupal\views\Plugin\views\argumentCode
function get_formula() {
return "SUBSTRING({$this->tableAlias}.{$this->realField}, 1, " . intval($this->options['limit']) . ")";
}