public invoice ( Sonata\Component\Invoice\InvoiceInterface $invoice ) | ||
$invoice | Sonata\Component\Invoice\InvoiceInterface |
public function invoice(InvoiceInterface $invoice)
{
if (!$invoice->getId()) {
throw new \RuntimeException('The invoice is not persisted into the database');
}
$this->generateReference($invoice, $this->registry->getManager()->getClassMetadata(get_class($invoice))->table['name']);
}