3 namespace Drupal\config_translation\Event;
5 use Drupal\config_translation\ConfigMapperInterface;
6 use Drupal\Core\Routing\RouteMatchInterface;
7 use Symfony\Component\EventDispatcher\Event;
10 * Provides a class for events related to configuration translation mappers.
12 class ConfigMapperPopulateEvent extends Event {
15 * The configuration mapper this event is related to.
17 * @var \Drupal\config_translation\ConfigMapperInterface
22 * The route match this event is related to.
24 * @var \Drupal\Core\Routing\RouteMatchInterface
26 protected $routeMatch;
29 * Constructs a ConfigMapperPopulateEvent object.
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.
36 public function __construct(ConfigMapperInterface $mapper, RouteMatchInterface $route_match) {
37 $this->mapper = $mapper;
38 $this->routeMatch = $route_match;
42 * Gets the configuration mapper this event is related to.
44 * @return \Drupal\config_translation\ConfigMapperInterface
45 * The configuration mapper this event is related to.
47 public function getMapper() {
52 * Gets the route match this event is related to.
54 * @return \Drupal\Core\Routing\RouteMatchInterface
55 * The route match this event is related to.
57 public function getRouteMatch() {
58 return $this->routeMatch;