You are here

ProductAttributeMapper.php in Commerce Core 8.2

File

modules/product/src/ConfigTranslation/ProductAttributeMapper.php
View source
<?php

namespace Drupal\commerce_product\ConfigTranslation;

use Drupal\config_translation\ConfigEntityMapper;

/**
 * Provides a configuration mapper for product attributes.
 */
class ProductAttributeMapper extends ConfigEntityMapper {

  /**
   * {@inheritdoc}
   */
  public function getAddRoute() {
    $route = parent::getAddRoute();
    $route
      ->setDefault('_form', '\\Drupal\\commerce_product\\Form\\ProductAttributeTranslationAddForm');
    return $route;
  }

  /**
   * {@inheritdoc}
   */
  public function getEditRoute() {
    $route = parent::getEditRoute();
    $route
      ->setDefault('_form', '\\Drupal\\commerce_product\\Form\\ProductAttributeTranslationEditForm');
    return $route;
  }

}

Classes

Namesort descending Description
ProductAttributeMapper Provides a configuration mapper for product attributes.