You are here

interface ParameterDefinitionInterface in JSON-RPC 8

Same name and namespace in other branches
  1. 2.x src/ParameterDefinitionInterface.php \Drupal\jsonrpc\ParameterDefinitionInterface

Interface to implement a parameter definition.

Hierarchy

Expanded class hierarchy of ParameterDefinitionInterface

All classes that implement ParameterDefinitionInterface

6 files declare their use of ParameterDefinitionInterface
EntityParameterFactory.php in src/ParameterFactory/EntityParameterFactory.php
JsonRpcParameterDefinition.php in src/Annotation/JsonRpcParameterDefinition.php
PaginationParameterFactory.php in src/ParameterFactory/PaginationParameterFactory.php
ParameterFactoryBase.php in src/ParameterFactory/ParameterFactoryBase.php
RawParameterFactory.php in src/ParameterFactory/RawParameterFactory.php

... See full list

File

src/ParameterDefinitionInterface.php, line 8

Namespace

Drupal\jsonrpc
View source
interface ParameterDefinitionInterface {

  /**
   * The name of the parameter if the params are by-name, an offset otherwise.
   *
   * @return string|int
   *   The ID.
   */
  public function getId();

  /**
   * The description of the parameter for the method.
   *
   * @return \Drupal\Core\StringTranslation\TranslatableMarkup
   *   The description.
   */
  public function getDescription();

  /**
   * Whether the parameter is required.
   *
   * @return bool
   *   True if this is a required parameter.
   */
  public function isRequired();

  /**
   * Gets the parameter schema.
   *
   * Can be derived from the type when the schema property is not defined.
   *
   * @return array
   *   The schema.
   */
  public function getSchema();

  /**
   * Get the parameter factory class.
   *
   * @return string
   *   The parameter factory.
   */
  public function getFactory();

}

Members

Namesort descending Modifiers Type Description Overrides
ParameterDefinitionInterface::getDescription public function The description of the parameter for the method. 1
ParameterDefinitionInterface::getFactory public function Get the parameter factory class. 1
ParameterDefinitionInterface::getId public function The name of the parameter if the params are by-name, an offset otherwise. 1
ParameterDefinitionInterface::getSchema public function Gets the parameter schema. 1
ParameterDefinitionInterface::isRequired public function Whether the parameter is required. 1