public function ThirdMethod::execute in JSON-RPC 2.x
Executes the action with the parameters passed in.
Parameters
\Drupal\jsonrpc\Object\ParameterBag $params: The parameters.
Return value
mixed The result of the execution.
Overrides ExecutableWithParamsInterface::execute
File
- tests/
modules/ jsonrpc_test/ src/ Plugin/ jsonrpc/ Method/ ThirdMethod.php, line 25
Class
- ThirdMethod
- Third test method.
Namespace
Drupal\jsonrpc_test\Plugin\jsonrpc\MethodCode
public function execute(ParameterBag $params) {
return new Response(Handler::SUPPORTED_VERSION, $this
->currentRequest()
->id(), 'invalid', NULL, new HeaderBag([
'foo' => 'oof',
'hello' => NULL,
'bye' => 'bye!',
]));
}