You are here

public function ProductForm::__construct in Commerce Core 8.2

Constructs a new ProductForm object.

Parameters

\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository.

\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle info.

\Drupal\Component\Datetime\TimeInterface $time: The time.

\Drupal\Core\Datetime\DateFormatterInterface $date_formatter: The date formatter.

Overrides ContentEntityForm::__construct

File

modules/product/src/Form/ProductForm.php, line 41

Class

ProductForm
Defines the product add/edit form.

Namespace

Drupal\commerce_product\Form

Code

public function __construct(EntityRepositoryInterface $entity_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time, DateFormatterInterface $date_formatter) {
  parent::__construct($entity_repository, $entity_type_bundle_info, $time);
  $this->dateFormatter = $date_formatter;
}