You are here

public function similar_handler_argument_nid::validate_arg in Similar Entries 7.2

Same name and namespace in other branches
  1. 6.2 views/similar_handler_argument_nid.inc \similar_handler_argument_nid::validate_arg()

Validates that the argument works.

Overrides views_handler_argument::validate_arg

File

views/similar_handler_argument_nid.inc, line 254
Defines the Similar entries node ID argument.

Class

similar_handler_argument_nid
Defines the similar entries View node ID argument.

Code

public function validate_arg($arg) {
  if (!parent::validate_arg($arg)) {
    return FALSE;
  }
  if (!empty($this->options['break_phrase'])) {
    views_break_phrase($this->argument, $this);
  }
  else {
    $this->value = array(
      $this->argument,
    );
  }
  $this->view->nids = $this->value;
  return TRUE;
}