Set route and optionally additional parameters for specific DataSource.

@param DataSourceViewInterface $dataSource
@param $route
@param array $additional_parameters
192755
public function setRoute(DataSourceViewInterface $dataSource, $route, array $additional_parameters = [])
    {
        $this->routes[$dataSource->getName()] = $route;
        $this->additional_parameters[$dataSource->getName()] = $additional_parameters;
    }
184176
public function setDatasource(\TechPromux\DynamicQueryBundle\Entity\DataSource $datasource)
    {
        $this->datasource = $datasource;

        return $this;
    }
895796
public function setRoute($route, array $params = array())
    {
        $this->route = $route;
        $this->routeParams = $params;

        return $this;
    }
934900
protected function addBreadcrumbRoute($title, $route, array $parameters = [], array $data = [])
    {
        return $this->addBreadcrumb($title, route($route, $parameters), $data);
    }
1220953
public function setDataSource(DataSourceInterface $dataSource)
    {
        $this->dataSource = $dataSource;
        $this->dataSource->initialize($this);
    }
1199431
public function route($route, $content, array $parameters = [], array $attributes = [])
    {
        $route = [$route, $parameters];

        $this->makeSubItem('route', compact('route', 'content', 'attributes'));
    }
891451
public function prepareDataSource(array $dataSource)
    {
        if (isset($dataSource['data']['items'])) {
            foreach ($dataSource['data']['items'] as &$item) {
                $name = $this->getData('name');
                if (isset($item[PostInterface::ID])) {
                    $item[$name]['edit'] = [
                        'href'  => $this->urlBuilder->getUrl($this->editUrl, [
                            PostInterface::ID => $item[PostInterface::ID],
                        ]),
                        'label' => __('Edit'),
                    ];
                    $item[$name]['delete'] = [
                        'href'    => $this->urlBuilder->getUrl(
                            self::POST_URL_PATH_DELETE, [PostInterface::ID => $item[PostInterface::ID]]),
                        'label'   => __('Delete'),
                        'confirm' => [
                            'title'   => __('Delete ${ $.$data.name }'),
                            'message' => __('Are you sure you wan\'t to delete a ${ $.$data.name } record?'),
                        ],
                    ];
                }
            }
        }

        return $dataSource;
    }
1305040
public static function getData(Request $request, DataSourceInterface $source, $prefix = '')
    {
        $source->setPageSize((int) ($request->get($prefix.'ps', $source->getPageSize())));
        $source->setPageNumber((int) ($request->get($prefix.'pn', $source->getPageNumber())));
        $source->setSortColumns((array) $request->get($prefix.'sc', []));
        $source->setParameters((array) $request->get($prefix.'p', []));

        return [
            'rows' => $source->getRows(),
            'size' => $source->getSize(),
            'pageSize' => $source->getPageSize(),
            'pageNumber' => $source->getPageNumber(),
            'pageCount' => $source->getPageCount(),
            'sortColumns' => $source->getSortColumns(),
        ];
    }
108582
static function Url(PageUrl $pageUrl, array $additionalParameters = array())
    {
        $list = new PageParamListProvider($pageUrl);
        $params = $list->ToArray();
        foreach ($additionalParameters as $key => $value) {
            $params[$key] = $value;
        }
        return self::PageUrl($pageUrl->GetPage(), $params, $pageUrl->GetFragment());
    }
1163833
protected function substituteImplicitBindings(Route $route)
    {
        $parameters = $route->parameters();

        foreach ($this->signatureParameters($route) as $parameter) {
            $id    = $parameters[$parameter->name];
            $class = $parameter->getClass()->getName();

            if ($repository = $this->registry->getRepository($class)) {
                if ($parameter->getClass()->implementsInterface(UrlRoutable::class)) {
                    $name = call_user_func([$class, 'getRouteKeyName']);

                    $entity = $repository->findOneBy([
                        $name => $id
                    ]);
                } else {
                    $entity = $repository->find($id);
                }

                if (is_null($entity) && !$parameter->isDefaultValueAvailable()) {
                    throw EntityNotFoundException::fromClassNameAndIdentifier($class, ['id' => $id]);
                }

                $route->setParameter($parameter->name, $entity);
            }
        }
    }
665062
private function addRoute(RouteCollection $routeCollection, string $resourceClass, string $operationName, array $operation, ResourceMetadata $resourceMetadata, string $operationType): void
    {
        $resourceShortName = $resourceMetadata->getShortName();

        if (isset($operation['route_name'])) {
            return;
        }

        if (!isset($operation['method'])) {
            throw new RuntimeException(sprintf('Either a "route_name" or a "method" operation attribute must exist for the operation "%s" of the resource "%s".', $operationName, $resourceClass));
        }

        if (null === $controller = $operation['controller'] ?? null) {
            $controller = sprintf('%s%s_%s', self::DEFAULT_ACTION_PATTERN, strtolower($operation['method']), $operationType);

            if (!$this->container->has($controller)) {
                throw new RuntimeException(sprintf('There is no builtin action for the %s %s operation. You need to define the controller yourself.', $operationType, $operation['method']));
            }
        }

        $path = trim(trim($resourceMetadata->getAttribute('route_prefix', '')), '/');
        $path .= $this->operationPathResolver->resolveOperationPath($resourceShortName, $operation, $operationType, $operationName);

        $route = new Route(
            $path,
            [
                '_controller' => $controller,
                '_format' => null,
                '_api_resource_class' => $resourceClass,
                sprintf('_api_%s_operation_name', $operationType) => $operationName,
            ] + ($operation['defaults'] ?? []),
            $operation['requirements'] ?? [],
            $operation['options'] ?? [],
            $operation['host'] ?? '',
            $operation['schemes'] ?? [],
            [$operation['method']],
            $operation['condition'] ?? ''
        );

        $routeCollection->add(RouteNameGenerator::generate($operationName, $resourceShortName, $operationType), $route);
    }
953681
private function getTemplates(DataSourceViewInterface $dataSource)
    {
        $templates = [];

        if (isset($this->themes[$dataSource->getName()])) {
            $templates[] = $this->themes[$dataSource->getName()];
        }

        $templates[] = $this->themes[self::DEFAULT_THEME];

        return $templates;
    }
96872
protected function forward($source, array $parameters = array())
    {
        $path = $this->reverseRouter->getPath($source, $parameters);

        if ($path !== null) {
            $this->request->setUri($this->request->getUri()->withPath($path));

            $this->loader->load($this->request, $this->response, $this->context);
        } else {
            throw new RuntimeException('Could not find route for source ' . $source);
        }
    }
382707
public function addRoute($method, $route, $action, $extra = [])
	{
		$name = (isset($extra["name"])) ? $extra["name"] : $route;

		if (isset($this->rawRoutes[$name])) {
			$Route = $this->rawRoutes[$name];
		} else {
			$Route              = clone $this->Route;
			$Route->route       = $this->baseUri.$route;
			$Route->name 		= $name;
		}

		$Route->addExtra($extra);
		$methods = [];
		if ("ANY" === $method) {
			$methods["GET"]  = $action;
			$methods["POST"] =& $methods["GET"];
			$methods["PUT"]  =& $methods["GET"];

			$Route->methods = $methods;
			$Route->action = $action;

			$this->rawRoutes[$name] = $Route;
		} else {

			$arrayedMethod = (array) $method;
			$count = count($arrayedMethod);

			for ($i = 0; $i < $count; $i++) {
				if (!isset($this->allowedMethods[$arrayedMethod[$i]])) {
					throw new InvalidMethodException("Method: " . $arrayedMethod[$i] . " is not valid");
				}
				$method = $arrayedMethod[$i];
				$Route->action = $action;
				$Route->method = $method;
				$Route->name = $name;
				$this->rawRoutes[$name] = $Route;
			}
		}


		return $Route;
	}
1332862
public function specifyAdditionalParameters(array $data, array $additionalParams): array
    {
        foreach ($additionalParams as $param) {
            $method = 'get' . ucfirst($param);
            if (method_exists($this, $method)) {
                $value = $this->{$method}();
                if ($value) {
                    $data[$param] = $value;
                }
            }
        }
        return $data;
    }
73704
public void setDataSource(XADataSource dataSource) {
		this.dataSource = dataSource;
		setClassName(DirectXADataSource.class.getName());
		setDriverProperties(new Properties());
	}
226454
public OTAUpdateInfo withAdditionalParameters(java.util.Map<String, String> additionalParameters) {
        setAdditionalParameters(additionalParameters);
        return this;
    }