You are here

public function Handler::availableMethods in JSON-RPC 8

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

The methods which are available to the given account.

Parameters

\Drupal\Core\Session\AccountInterface $account: (optional). The account for which to get available methods. Defaults to the current user.

Return value

\Drupal\jsonrpc\MethodInterface[] The methods.

Overrides HandlerInterface::availableMethods

File

src/Handler.php, line 77

Class

Handler
Manages all the JSON-RPC business logic.

Namespace

Drupal\jsonrpc

Code

public function availableMethods(AccountInterface $account = NULL) {
  return array_filter($this
    ->supportedMethods(), function (MethodInterface $method) {
    return $method
      ->access('execute');
  });
}