LocaleEvent.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace Drupal\locale;
  3. use Symfony\Component\EventDispatcher\Event;
  4. /**
  5. * Defines a Locale event.
  6. */
  7. class LocaleEvent extends Event {
  8. /**
  9. * The list of Language codes for updated translations.
  10. *
  11. * @var string[]
  12. */
  13. protected $langCodes;
  14. /**
  15. * List of string identifiers that have been updated / created.
  16. *
  17. * @var string[]
  18. */
  19. protected $original;
  20. /**
  21. * Constructs a new LocaleEvent.
  22. *
  23. * @param array $lang_codes
  24. * Language codes for updated translations.
  25. * @param array $lids
  26. * (optional) List of string identifiers that have been updated / created.
  27. */
  28. public function __construct(array $lang_codes, array $lids = []) {
  29. $this->langCodes = $lang_codes;
  30. $this->lids = $lids;
  31. }
  32. /**
  33. * Returns the language codes.
  34. *
  35. * @return string[] $langCodes
  36. */
  37. public function getLangCodes() {
  38. return $this->langCodes;
  39. }
  40. /**
  41. * Returns the string identifiers.
  42. *
  43. * @return array $lids
  44. */
  45. public function getLids() {
  46. return $this->lids;
  47. }
  48. }