interface ServiceDefinitionInterface in Services 9.0.x
Same name and namespace in other branches
- 8.4 src/ServiceDefinitionInterface.php \Drupal\services\ServiceDefinitionInterface
Interface \Drupal\services\ServiceDefinitionInterface.
Hierarchy
- interface \Drupal\Core\Plugin\ContextAwarePluginInterface; interface \Drupal\Core\Cache\CacheableDependencyInterface
- interface \Drupal\services\ServiceDefinitionInterface
Expanded class hierarchy of ServiceDefinitionInterface
All classes that implement ServiceDefinitionInterface
File
- src/
ServiceDefinitionInterface.php, line 16
Namespace
Drupal\servicesView source
interface ServiceDefinitionInterface extends ContextAwarePluginInterface, CacheableDependencyInterface {
/**
* Returns a translated string for the service title.
*
* @return string
*/
public function getTitle();
/**
* Returns a translated string for the category.
*
* @return string
*/
public function getCategory();
/**
* Returns the appended path for the service.
*
* @return string
*/
public function getPath();
/**
* Returns a translated description for the constraint description.
*
* @return string
*/
public function getDescription();
/**
* Return an array of allowed methods.
*
* @return array
*/
public function getMethods();
/**
* Returns an array of service request arguments.
*
* @return array
*/
public function getArguments();
/**
* Returns a boolean if this service definition supports translations.
*
* @return bool
*/
public function supportsTranslation();
/**
* Checks access for the ServiceDefintion.
*
* @param \Symfony\Component\Routing\Route $route
* The route match object.
*/
public function processRoute(Route $route);
/**
* Processes the request and returns an array of data as appropriate.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* The request object.
* @param \Drupal\Core\Routing\RouteMatchInterface $route_match
* The route match object.
* @param \Symfony\Component\Serializer\SerializerInterface $serializer
* The serializer. Some methods might require the plugin to leverage the
* serializer after extracting the request contents.
*
* @return array
* The response.
*
* @throws \Symfony\Component\HttpKernel\Exception\HttpException
*/
public function processRequest(Request $request, RouteMatchInterface $route_match, SerializerInterface $serializer);
/**
* Allow plugins to alter the response object before it is returned.
*
* @param Response $response
* The response object that is about to be returned.
*/
public function processResponse(Response $response);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CacheableDependencyInterface:: |
public | function | The cache contexts associated with this object. | 34 |
CacheableDependencyInterface:: |
public | function | The maximum age for which this object may be cached. | 34 |
CacheableDependencyInterface:: |
public | function | The cache tags associated with this object. | 27 |
ContextAwarePluginInterface:: |
public | function | Gets a defined context. | 1 |
ContextAwarePluginInterface:: |
public | function |
Gets a specific context definition of the plugin. Overrides ContextAwarePluginInterface:: |
|
ContextAwarePluginInterface:: |
public | function |
Gets the context definitions of the plugin. Overrides ContextAwarePluginInterface:: |
|
ContextAwarePluginInterface:: |
public | function | Gets a mapping of the expected assignment names to their context names. | |
ContextAwarePluginInterface:: |
public | function | Gets the defined contexts. | 1 |
ContextAwarePluginInterface:: |
public | function | Gets the value for a defined context. | 1 |
ContextAwarePluginInterface:: |
public | function | Gets the values for all defined contexts. | 1 |
ContextAwarePluginInterface:: |
public | function | Set a context on this plugin. | 2 |
ContextAwarePluginInterface:: |
public | function | Sets a mapping of the expected assignment names to their context names. | |
ContextAwarePluginInterface:: |
public | function | Sets the value for a defined context. | 1 |
ContextAwarePluginInterface:: |
public | function | Validates the set values for the defined contexts. | 1 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |
ServiceDefinitionInterface:: |
public | function | Returns an array of service request arguments. | 1 |
ServiceDefinitionInterface:: |
public | function | Returns a translated string for the category. | 1 |
ServiceDefinitionInterface:: |
public | function | Returns a translated description for the constraint description. | 1 |
ServiceDefinitionInterface:: |
public | function | Return an array of allowed methods. | 1 |
ServiceDefinitionInterface:: |
public | function | Returns the appended path for the service. | 1 |
ServiceDefinitionInterface:: |
public | function | Returns a translated string for the service title. | 1 |
ServiceDefinitionInterface:: |
public | function | Processes the request and returns an array of data as appropriate. | 10 |
ServiceDefinitionInterface:: |
public | function | Allow plugins to alter the response object before it is returned. | 1 |
ServiceDefinitionInterface:: |
public | function | Checks access for the ServiceDefintion. | 1 |
ServiceDefinitionInterface:: |
public | function | Returns a boolean if this service definition supports translations. | 1 |