Sonata\Component\Generator\MysqlReference::invoice PHP Method

invoice() public method

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']);
    }