getBaseRouteRequirements example

return $validators;
  }

  /** * {@inheritdoc} */
  protected function getBaseRoute($canonical_path$method) {
    return new Route($canonical_path[
      '_controller' => RequestHandler::class D '::handleRaw',
    ],
      $this->getBaseRouteRequirements($method),
      [],
      '',
      [],
      // The HTTP method is a requirement for this route.       [$method]
    );
  }

  /** * {@inheritdoc} */
  

  protected function getBaseRoute($canonical_path$method) {
    return new Route($canonical_path[
      '_controller' => 'Drupal\rest\RequestHandler::handle',
    ],
      $this->getBaseRouteRequirements($method),
      [],
      '',
      [],
      // The HTTP method is a requirement for this route.       [$method]
    );
  }

  /** * Gets the base route requirements for a particular method. * * @param $method * The HTTP method to be used for the route. * * @return array * An array of requirements for parameters. */
Home | Imprint | This part of the site doesn't use cookies.