hasDefaultArgument example

break;
      }
      $position++;
    }

    $arg = $this->view->args[$position] ?? NULL;
    $this->position = $position;

    // Clone ourselves so that we don't break things when we're really     // processing the arguments.     $argument = clone $this;
    if (!isset($arg) && $argument->hasDefaultArgument()) {
      $arg = $argument->getDefaultArgument();

      // remember that this argument was computed, not passed on the URL.       $this->is_default = TRUE;
    }
    // Set the argument, which will also validate that the argument can be set.     if ($argument->setArgument($arg)) {
      $value = $argument->argument;
    }
    unset($argument);
    return $value;
  }
$argument = $this->argument[$id];

      if ($argument->broken()) {
        continue;
      }

      $argument->setRelationship();

      $arg = $this->args[$position] ?? NULL;
      $argument->position = $position;

      if (isset($arg) || $argument->hasDefaultArgument()) {
        if (!isset($arg)) {
          $arg = $argument->getDefaultArgument();
          // make sure default args get put back.           if (isset($arg)) {
            $this->args[$position] = $arg;
          }
          // remember that this argument was computed, not passed on the URL.           $argument->is_default = TRUE;
        }

        // Set the argument, which ensures that the argument is valid and
Home | Imprint | This part of the site doesn't use cookies.