You are here

public function VariationAddToCartFormatter::setEntityQuery in Commerce Variation Add to Cart 8

Sets entity query.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

File

src/Plugin/Field/FieldFormatter/VariationAddToCartFormatter.php, line 59

Class

VariationAddToCartFormatter
Plugin implementation of the 'variation_add_to_cart_form' formatter.

Namespace

Drupal\commerce_variation_add_to_cart\Plugin\Field\FieldFormatter

Code

public function setEntityQuery(EntityTypeManagerInterface $entity_type_manager) {
  $this->entityQuery = $entity_type_manager
    ->getStorage('commerce_product_attribute')
    ->getQuery();
}