You are here

public static function Error::invalidParams in JSON-RPC 8

Same name and namespace in other branches
  1. 2.x src/Object/Error.php \Drupal\jsonrpc\Object\Error::invalidParams()

Constructs a new invalid params error.

Parameters

mixed $data: More specific information about the error.

\Drupal\Core\Cache\CacheableDependencyInterface $cacheability: (optional) A cacheable dependency.

Return value

static

6 calls to Error::invalidParams()
AddPermissionToRole::execute in modules/jsonrpc_core/src/Plugin/jsonrpc/Method/AddPermissionToRole.php
Executes the action with the parameters passed in.
EntityParameterFactory::doTransform in src/ParameterFactory/EntityParameterFactory.php
Plugins::create in modules/jsonrpc_core/src/Plugin/jsonrpc/Method/Plugins.php
Creates a new Plugin.
Plugins::execute in modules/jsonrpc_core/src/Plugin/jsonrpc/Method/Plugins.php
RpcRequestFactory::denormalizeParam in src/Shaper/RpcRequestFactory.php
Denormalizes a single JSON-RPC request object parameter.

... See full list

File

src/Object/Error.php, line 176

Class

Error
Error class to help implement JSON RPC's spec for errors.

Namespace

Drupal\jsonrpc\Object

Code

public static function invalidParams($data = NULL, CacheableDependencyInterface $cacheability = NULL) {
  return new static(static::INVALID_PARAMS, static::$errorMessages[static::INVALID_PARAMS], $data ?: static::$errorMeanings[static::INVALID_PARAMS], $cacheability);
}