You are here

public function Order::setData in Commerce Core 8.2

Sets an order data value with the given key.

Parameters

string $key: The key.

mixed $value: The value.

Return value

$this

Overrides OrderInterface::setData

2 calls to Order::setData()
Order::preSave in modules/order/src/Entity/Order.php
Acts on an entity before the presave hook is invoked.
Order::setRefreshState in modules/order/src/Entity/Order.php
Sets the order refresh state.

File

modules/order/src/Entity/Order.php, line 557

Class

Order
Defines the order entity class.

Namespace

Drupal\commerce_order\Entity

Code

public function setData($key, $value) {
  $this
    ->get('data')
    ->__set($key, $value);
  return $this;
}