public function Invoice::unsetData in Commerce Invoice 8.2
File
- src/
Entity/ Invoice.php, line 497
Class
- Invoice
- Defines the invoice entity class.
Namespace
Drupal\commerce_invoice\EntityCode
public function unsetData($key) {
if (!$this
->get('data')
->isEmpty()) {
$data = $this
->get('data')
->first()
->getValue();
unset($data[$key]);
$this
->set('data', $data);
}
return $this;
}