You are here

public function CommerceProductInlineEntityFormController::__construct in Inline Entity Form 7

Overrides EntityInlineEntityFormController::__construct

File

includes/commerce_product.inline_entity_form.inc, line 10
Defines the inline entity form controller for Commerce Products.

Class

CommerceProductInlineEntityFormController
@file Defines the inline entity form controller for Commerce Products.

Code

public function __construct($entityType, array $settings) {
  $this->entityType = $entityType;
  $this->settings = $settings + $this
    ->defaultSettings();

  // Convert the old product-specific variation language setting.
  if (!empty($settings['use_variation_language']) && empty($settings['override_labels'])) {
    $this->settings['override_labels'] = TRUE;
    $this->settings['label_singular'] = 'variation';
    $this->settings['label_plural'] = 'variations';
    unset($this->settings['use_variation_language']);
  }
}