Mercurial > hg > isophonics-drupal-site
comparison core/modules/config_translation/src/Event/ConfigMapperPopulateEvent.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\config_translation\Event; | |
4 | |
5 use Drupal\config_translation\ConfigMapperInterface; | |
6 use Drupal\Core\Routing\RouteMatchInterface; | |
7 use Symfony\Component\EventDispatcher\Event; | |
8 | |
9 /** | |
10 * Provides a class for events related to configuration translation mappers. | |
11 */ | |
12 class ConfigMapperPopulateEvent extends Event { | |
13 | |
14 /** | |
15 * The configuration mapper this event is related to. | |
16 * | |
17 * @var \Drupal\config_translation\ConfigMapperInterface | |
18 */ | |
19 protected $mapper; | |
20 | |
21 /** | |
22 * The route match this event is related to. | |
23 * | |
24 * @var \Drupal\Core\Routing\RouteMatchInterface | |
25 */ | |
26 protected $routeMatch; | |
27 | |
28 /** | |
29 * Constructs a ConfigMapperPopulateEvent object. | |
30 * | |
31 * @param \Drupal\config_translation\ConfigMapperInterface $mapper | |
32 * The configuration mapper this event is related to. | |
33 * @param \Drupal\Core\Routing\RouteMatchInterface $route_match | |
34 * The route match this event is related to. | |
35 */ | |
36 public function __construct(ConfigMapperInterface $mapper, RouteMatchInterface $route_match) { | |
37 $this->mapper = $mapper; | |
38 $this->routeMatch = $route_match; | |
39 } | |
40 | |
41 /** | |
42 * Gets the configuration mapper this event is related to. | |
43 * | |
44 * @return \Drupal\config_translation\ConfigMapperInterface | |
45 * The configuration mapper this event is related to. | |
46 */ | |
47 public function getMapper() { | |
48 return $this->mapper; | |
49 } | |
50 | |
51 /** | |
52 * Gets the route match this event is related to. | |
53 * | |
54 * @return \Drupal\Core\Routing\RouteMatchInterface | |
55 * The route match this event is related to. | |
56 */ | |
57 public function getRouteMatch() { | |
58 return $this->routeMatch; | |
59 } | |
60 | |
61 } |