You are here

function Iid::title_query in Views (for Drupal 7) 8.3

Override the behavior of title(). Get the title of the category.

Overrides Numeric::title_query

File

lib/Views/aggregator/Plugin/views/argument/Iid.php, line 28
Definition of Views\aggregator\Plugin\views\argument\Iid.

Class

Iid
Argument handler to accept an aggregator item id.

Namespace

Views\aggregator\Plugin\views\argument

Code

function title_query() {
  $titles = array();
  $placeholders = implode(', ', array_fill(0, sizeof($this->value), '%d'));
  $result = db_select('aggregator_item')
    ->condition('iid', $this->value, 'IN')
    ->fields(array(
    'title',
  ))
    ->execute();
  foreach ($result as $term) {
    $titles[] = check_plain($term->title);
  }
  return $titles;
}