You are here

protected function OrderBalanceFieldItemList::computeValue in Commerce Core 8.2

Computes the values for an item list.

Overrides ComputedItemListTrait::computeValue

File

modules/order/src/OrderBalanceFieldItemList.php, line 18

Class

OrderBalanceFieldItemList
Computed field item list for the 'balance' commerce_order field.

Namespace

Drupal\commerce_order

Code

protected function computeValue() {

  /** @var \Drupal\commerce_order\Entity\OrderInterface $order */
  $order = $this
    ->getEntity();
  $this->list[0] = $this
    ->createItem(0, $order
    ->getBalance());
}