materio-base-legacy/includes/flag_lists_handler_argument_fid.inc
bachy 04d628c609 first import from 7.x-1.1
Signed-off-by: bachy <git@g-u-i.net>
2012-10-17 15:19:21 +02:00

27 lines
583 B
PHP

<?php
/**
* @file
* Provide list fid argument handler.
*/
/**
* Argument handler to accept a list id.
*/
class flag_lists_handler_argument_fid extends views_handler_argument_numeric {
/**
* Override the behavior of title(). Get the title of the list.
*/
function title_query() {
$titles = array();
$result = db_select('flag_lists_flags', 'fl')
->fields('fl', array('title'))
->condition('fl.fid', $this->value, 'IN')
->execute();
foreach ($result as $term) {
$titles[] = check_plain($term->title);
}
return $titles;
}
}