public function Invoice::hasItems in Commerce Invoice 8.2
Gets whether the invoice has invoice items.
Return value
bool TRUE if the invoice has invoice items, FALSE otherwise.
Overrides InvoiceInterface::hasItems
File
- src/
Entity/ Invoice.php, line 246
Class
- Invoice
- Defines the invoice entity class.
Namespace
Drupal\commerce_invoice\EntityCode
public function hasItems() {
return !$this
->get('invoice_items')
->isEmpty();
}