Sonata\Component\Invoice\InvoiceStatusRenderer::handlesObject PHP Method

handlesObject() public method

public handlesObject ( $object, $statusName = null )
    public function handlesObject($object, $statusName = null)
    {
        return $object instanceof InvoiceInterface;
    }

Usage Example

 public function testHandles()
 {
     $renderer = new InvoiceStatusRenderer();
     $invoice = new \DateTime();
     $this->assertFalse($renderer->handlesObject($invoice));
     $invoice = $this->getMock('Sonata\\Component\\Invoice\\InvoiceInterface');
     $this->assertTrue($renderer->handlesObject($invoice));
 }
InvoiceStatusRenderer