transfer = $transfer; $this->payment_methods = ($payment_methods) ?: Modules::getPaymentMethods('all'); // From account Hide $this->hideFromAccount = $hideFromAccount; $this->hideFromAccountTitle = $hideFromAccountTitle; $this->hideFromAccountName = $hideFromAccountName; $this->hideFromAccountNumber = $hideFromAccountNumber; $this->hideFromAccountBankName = $hideFromAccountBankName; $this->hideFromAccountBankPhone = $hideFromAccountBankPhone; $this->hideFromAccountBankAddress = $hideFromAccountBankAddress; // From account text $this->textFromAccountTitle = $this->getTextFromAccountTitle($textFromAccountTitle); $this->textFromAccountNumber = $this->getTextFromAccountNumber($textFromAccountNumber); // To account Hide $this->hideToAccount = $hideToAccount; $this->hideToAccountTitle = $hideToAccountTitle; $this->hideToAccountName = $hideToAccountName; $this->hideToAccountNumber = $hideToAccountNumber; $this->hideToAccountBankName = $hideToAccountBankName; $this->hideToAccountBankPhone = $hideToAccountBankPhone; $this->hideToAccountBankAddress = $hideToAccountBankAddress; // To account text $this->textToAccountTitle = $this->getTextToAccountTitle($textToAccountTitle); $this->textToAccountNumber = $this->getTextToAccountNumber($textToAccountNumber); // Detail Information Hide checker $this->hideDetails = $hideDetails; $this->hideDetailTitle = $hideDetailTitle; $this->hideDetailDate = $hideDetailDate; $this->hideDetailPaymentMethod = $hideDetailPaymentMethod; $this->hideDetailReference = $hideDetailReference; $this->hideDetailDescription = $hideDetailDescription; $this->hideDetailAmount = $hideDetailAmount; // Related Information Text $this->textDetailTitle = $this->getTextDetailTitle($textDetailTitle); $this->textDetailDate = $this->getTextDetailDate($textDetailDate); $this->textDetailPaymentMethod = $this->getTextDetailPaymentMethod($textDetailPaymentMethod); $this->textDetailReference = $this->getTextDetailReference($textDetailReference); $this->textDetailDescription = $this->getTextDetailDescription($textDetailDescription); $this->textDetailAmount = $this->getTextDetailAmount($textDetailAmount); } protected function getTextFromAccountTitle($textToAccountTitle) { if (!empty($textToAccountTitle)) { return $textToAccountTitle; } return 'transfers.from_account'; } protected function getTextFromAccountNumber($textFromAccountNumber) { if (!empty($textFromAccountNumber)) { return $textFromAccountNumber; } return 'accounts.number'; } protected function getTextToAccountTitle($textFromAccountTitle) { if (!empty($textFromAccountTitle)) { return $textFromAccountTitle; } return 'transfers.to_account'; } protected function getTextToAccountNumber($textToAccountNumber) { if (!empty($textToAccountNumber)) { return $textToAccountNumber; } return 'accounts.number'; } protected function getTextDetailTitle($textDetailTitle) { if (!empty($textDetailTitle)) { return $textDetailTitle; } return 'transfers.details'; } protected function getTextDetailDate($textDetailDate) { if (!empty($textDetailDate)) { return $textDetailDate; } return 'general.date'; } protected function getTextDetailPaymentMethod($textDetailPaymentMethod) { if (!empty($textDetailPaymentMethod)) { return $textDetailPaymentMethod; } return 'general.payment_methods'; } protected function getTextDetailReference($textDetailReference) { if (!empty($textDetailReference)) { return $textDetailReference; } return 'general.reference'; } protected function getTextDetailDescription($textDetailDescription) { if (!empty($textDetailDescription)) { return $textDetailDescription; } return 'general.description'; } protected function getTextDetailAmount($textDetailAmount) { if (!empty($textDetailAmount)) { return $textDetailAmount; } return 'general.amount'; } }