You are here

public function Product::setCreatedTime in Commerce Core 8.2

Sets the product creation timestamp.

Parameters

int $timestamp: The product creation timestamp.

Return value

$this

Overrides ProductInterface::setCreatedTime

File

modules/product/src/Entity/Product.php, line 121

Class

Product
Defines the product entity class.

Namespace

Drupal\commerce_product\Entity

Code

public function setCreatedTime($timestamp) {
  $this
    ->set('created', $timestamp);
  return $this;
}