2
// $Id: views_handler_argument_term_node_tid_depth_modifier.inc,v 1.1 2008/09/03 19:21:30 merlinofchaos Exp $
5
* Argument handler for to modify depth for a previous term.
7
* This handler is actually part of the node table and has some restrictions,
8
* because it uses a subquery to find nodes with
10
class views_handler_argument_term_node_tid_depth_modifier extends views_handler_argument {
11
function options_form(&$form, &$form_state) { }
13
function pre_query() {
14
// We don't know our argument yet, but it's based upon our position:
15
$argument = isset($this->view->args[$this->position]) ? $this->view->args[$this->position] : NULL;
16
if (!is_numeric($argument)) {
24
if ($argument < -10) {
28
// figure out which argument preceded us.
29
$keys = array_reverse(array_keys($this->view->argument));
31
foreach ($keys as $key) {
32
if ($key == $this->options['id']) {
41
if (empty($this->view->argument[$key])) {
45
if (isset($handler)) {
49
$handler = &$this->view->argument[$key];
50
if (empty($handler->definition['accept depth modifier'])) {
55
$handler->options['depth'] = $argument;