You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.2KB

  1. <?php
  2. namespace App\Email\Members;
  3. use App\Kintone\Models\SeasonTicketContractEntry;
  4. use App\Kintone\Models\SeasonTicketContractSelection;
  5. use App\Logic\SeasonTicketContractSelectionManager;
  6. class SelectionNotice extends Members
  7. {
  8. public function __construct(
  9. private SeasonTicketContractSelection $selection,
  10. private SeasonTicketContractEntry $entry,
  11. ) {
  12. parent::__construct(null);
  13. }
  14. public function getTemplateName(): string
  15. {
  16. return 'emails.members.selection_notice';
  17. }
  18. public function getSubject(): string
  19. {
  20. return "##TODO## 選考通知";
  21. }
  22. public function getMemberParams(): array
  23. {
  24. $manager = new SeasonTicketContractSelectionManager($this->selection);
  25. return [
  26. 'customer_name' => $this->entry->customerName,
  27. 'parking_name' => $this->entry->parkingName,
  28. 'url' => $this->getAppUrl([
  29. 'season-ticket-contract',
  30. 'selection', 'entry',
  31. $this->selection->getRecordId(),
  32. $this->entry->getRecordId(),
  33. $manager->getHash($this->entry->getRecordId())
  34. ]),
  35. ];
  36. }
  37. }