You are here

public function Shipment::setData in Commerce Shipping 8.2

Sets a shipment data value with the given key.

Parameters

string $key: The key.

mixed $value: The value.

Return value

$this

Overrides ShipmentInterface::setData

1 call to Shipment::setData()
Shipment::populateFromProposedShipment in src/Entity/Shipment.php
Populates the shipment from the given proposed shipment.

File

src/Entity/Shipment.php, line 459

Class

Shipment
Defines the shipment entity class.

Namespace

Drupal\commerce_shipping\Entity

Code

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