setDescription($journal->description); $entry->setDate($journal->date->format('Y-m-d')); $entry->setAmount($journal->amount); return $entry; } /** * @return array */ public static function getTypes() { // key = field name (see top of class) // value = field type (see csv.php under 'roles') return [ 'amount' => 'amount', 'date' => 'date-transaction', 'description' => 'description', ]; } /** * @return string */ public function getAmount() { return $this->amount; } /** * @param string $amount */ public function setAmount(string $amount) { $this->amount = $amount; } /** * @return string */ public function getDate() { return $this->date; } /** * @param string $date */ public function setDate(string $date) { $this->date = $date; } /** * @return string */ public function getDescription() { return $this->description; } /** * @param string $description */ public function setDescription(string $description) { $this->description = $description; } }