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