public static function CalendarHelper::getViewArgumentValues in Calendar 8
Returns all the argument values for the specified view's current display.
Parameters
\Drupal\views\ViewExecutable $view: An executed view.
string $value: The date argument value.
\Drupal\calendar\DateArgumentWrapper|null $argument_handler: (optional) A date argument wrapper object. If not specified it will be derived from the view.
Return value
string[] An associative array of argument values keyed by the "arg_" prefix followed by the URL position.
File
- src/
CalendarHelper.php, line 1001
Class
- CalendarHelper
- Defines Gregorian Calendar date values.
Namespace
Drupal\calendarCode
public static function getViewArgumentValues(ViewExecutable $view, $value, $argument_handler = NULL) {
$arg_values = [];
if (!isset($argument_handler)) {
$argument_handler = static::getDateArgumentHandler($view);
}
$current_position = 0;
/** @var \Drupal\views\Plugin\views\argument\ArgumentPluginBase $handler */
foreach ($view->argument as $name => $handler) {
if ($current_position != $argument_handler
->getPosition()) {
$arg_values["arg_{$current_position}"] = $handler
->getValue();
}
else {
$arg_values["arg_{$current_position}"] = $value;
}
$current_position++;
}
return $arg_values;
}