Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website] / web / core / lib / Drupal / Core / ParamConverter / ParamConverterManagerInterface.php
1 <?php
2
3 namespace Drupal\Core\ParamConverter;
4
5 use Symfony\Component\Routing\RouteCollection;
6
7 /**
8  * Provides an interface for a parameter converter manager.
9  */
10 interface ParamConverterManagerInterface {
11
12   /**
13    * Registers a parameter converter with the manager.
14    *
15    * @param \Drupal\Core\ParamConverter\ParamConverterInterface $param_converter
16    *   The added param converter instance.
17    * @param string $id
18    *   The parameter converter service id to register.
19    *
20    * @return $this
21    */
22   public function addConverter(ParamConverterInterface $param_converter, $id);
23
24   /**
25    * Lazy-loads converter services.
26    *
27    * @param string $id
28    *   The service id of converter service to load.
29    *
30    * @return \Drupal\Core\ParamConverter\ParamConverterInterface
31    *   The loaded converter service identified by the given service id.
32    *
33    * @throws \InvalidArgumentException
34    *   If the given service id is not a registered converter.
35    */
36   public function getConverter($id);
37
38   /**
39    * Saves a list of applicable converters to each route.
40    *
41    * @param \Symfony\Component\Routing\RouteCollection $routes
42    *   A collection of routes to apply converters to.
43    */
44   public function setRouteParameterConverters(RouteCollection $routes);
45
46   /**
47    * Invokes the registered converter for each defined parameter on a route.
48    *
49    * @param array $defaults
50    *   The route defaults array.
51    *
52    * @return array
53    *   The modified defaults.
54    *
55    * @throws \Drupal\Core\ParamConverter\ParamNotConvertedException
56    *   If one of the assigned converters returned NULL because the given
57    *   variable could not be converted.
58    */
59   public function convert(array $defaults);
60
61 }