function String::get_formula

Get the formula for this argument.

$this->ensureMyTable() MUST have been called prior to this.

2 calls to String::get_formula()
String::query in drupal/core/modules/views/lib/Drupal/views/Plugin/views/argument/String.php
Build the query based upon the formula
String::summary_query in drupal/core/modules/views/lib/Drupal/views/Plugin/views/argument/String.php
Build the summary query based on a string

File

drupal/core/modules/views/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\argument

Code

function get_formula() {
  return "SUBSTRING({$this->tableAlias}.{$this->realField}, 1, " . intval($this->options['limit']) . ")";
}