You are here

public function PriceList::setStartDate in Commerce Pricelist 8

Same name and namespace in other branches
  1. 8.2 src/Entity/PriceList.php \Drupal\commerce_pricelist\Entity\PriceList::setStartDate()

Sets the price list start date.

Parameters

\Drupal\Core\Datetime\DrupalDateTime $start_date: The price list start date.

Return value

$this

Overrides PriceListInterface::setStartDate

File

src/Entity/PriceList.php, line 157

Class

PriceList
Defines the Price list entity.

Namespace

Drupal\commerce_pricelist\Entity

Code

public function setStartDate(DrupalDateTime $start_date) {
  $this
    ->get('start_date')->value = $start_date
    ->format('Y-m-d');
  return $this;
}