You are here

protected function CartResourceBase::getBaseRouteRequirements in Commerce Cart API 8

Gets the base route requirements for a particular method.

Parameters

$method: The HTTP method to be used for the route.

Return value

array An array of requirements for parameters.

Overrides ResourceBase::getBaseRouteRequirements

File

src/Plugin/rest/resource/CartResourceBase.php, line 84

Class

CartResourceBase
Abstract base class for cart resoruces.

Namespace

Drupal\commerce_cart_api\Plugin\rest\resource

Code

protected function getBaseRouteRequirements($method) {
  $requirements = parent::getBaseRouteRequirements($method);
  $requirements['_cart_api'] = 'TRUE';
  return $requirements;
}