getObject(); $type = $invoice->getOrigData() === null ? LogEntryTypes::TYPE_NEW : LogEntryTypes::TYPE_EDIT; return [ LogEntry::TYPE => $type, LogEntry::ITEM => __('Invoice for Order #%1', $invoice->getOrder()->getRealOrderId()), LogEntry::CATEGORY => self::CATEGORY, LogEntry::CATEGORY_NAME => __('Invoice'), LogEntry::ELEMENT_ID => (int)$invoice->getId(), LogEntry::PARAMETER_NAME => 'invoice_id' ]; } }