public function getDescription(Student $student) { $nfcTagNumber = $student->getNfcTag() ? $student->getNfcTag()->getNumber() : NULL; return "Поповнення рахунку для студента {$student->getFullName()}" . ($nfcTagNumber ? " (за номером картки {$nfcTagNumber})" : ""); }
private function processActivationNfcTag(Student $student, SettingDecimal $settingNfcTagActivationFee) { $student->setTotalLimit(bcsub($student->getTotalLimit(), $settingNfcTagActivationFee->getSettingValue(), 2)); $student->getNfcTag()->activate(); $this->_manager->persist($student); }