namibia
df0489e1eeeeab5a9bd44e1d84fce49924fe1bac
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
<?php namespace Auction\Service; /** * Manage Question data. * @author andre.fourie */ class Question extends \Auction\DataBin\Question { /** * ExecuteAfter: Create. * Send notification. * @param array $meta * @param object|null $jobRecord * @param object|null $record * @param \Workspace\Utility\ServiceInputParams $contract * @return array */ public function notify($meta, $jobRecord, $record, \Workspace\Utility\ServiceInputParams $contract) { $vehicle = $jobRecord->stock->type->model->make->name . ', ' . $jobRecord->stock->type->model->name . ', ' . $jobRecord->stock->type->name . ' (' . $jobRecord->stock->vehicleYear->name . ')'; $oNotify = new \Utility\Comms\Notification(); if (!is_null($jobRecord->company->tradeCenter)) { $oNotify->sendFromTemplate( null, null, $jobRecord->company->tradeCenter->id, null, $jobRecord->company->tradeCenter->contact->email, null, null, 'auction-question', array( 'first_name' => $jobRecord->company->tradeCenter->contact->firstName, 'family_name' => $jobRecord->company->tradeCenter->contact->familyName, 'dealer' => $record->company->name, 'vehicle' => $vehicle, 'question' => $record->question )); } else { $oNotify->sendFromTemplate( null, null, $jobRecord->company->id, $jobRecord->createdBy->id, $jobRecord->createdBy->email, null, null, 'auction-question', array( 'first_name' => $jobRecord->createdBy->firstName, 'family_name' => $jobRecord->createdBy->familyName, 'dealer' => $record->company->name, 'vehicle' => $vehicle, 'question' => $record->question )); } } } |
Commits for namibiamodule/Auction/src/Auction/Service/Question.php
Revision | Author | Commited | Message |
---|---|---|---|
df0489 ... | Mark | Fri 14 Oct, 2016 10:01:00 +0000 | initial commit |