Commit 968a67fd authored by bojanz's avatar bojanz

Issue #3010225 followup: clean up ProductVariationFieldRenderer dependencies.

parent 7d8ab841
......@@ -21,7 +21,7 @@ services:
commerce_product.variation_field_renderer:
class: Drupal\commerce_product\ProductVariationFieldRenderer
arguments: ['@entity_type.manager', '@entity_field.manager']
arguments: ['@entity_type.manager']
commerce_product.product_route_context:
class: Drupal\commerce_product\ContextProvider\ProductRouteContext
......
......@@ -6,25 +6,10 @@ use Drupal\commerce_product\Entity\ProductVariationInterface;
use Drupal\Core\Ajax\AjaxResponse;
use Drupal\Core\Ajax\ReplaceCommand;
use Drupal\Core\Render\Element;
use Drupal\Core\Entity\EntityFieldManagerInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
class ProductVariationFieldRenderer implements ProductVariationFieldRendererInterface {
/**
* The entity type manager.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* The entity field manager.
*
* @var \Drupal\Core\Entity\EntityFieldManagerInterface
*/
protected $entityFieldManager;
/**
* The product variation view builder.
*
......@@ -37,12 +22,8 @@ class ProductVariationFieldRenderer implements ProductVariationFieldRendererInte
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager.
* @param \Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager
* The entity field manager.
*/
public function __construct(EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager) {
$this->entityTypeManager = $entity_type_manager;
$this->entityFieldManager = $entity_field_manager;
public function __construct(EntityTypeManagerInterface $entity_type_manager) {
$this->variationViewBuilder = $entity_type_manager->getViewBuilder('commerce_product_variation');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment