WellCommerce\Bundle\ShippingBundle\Provider\ShippingMethodProviderInterface::getCosts PHP Méthode

getCosts() public méthode

public getCosts ( WellCommerce\Bundle\ShippingBundle\Calculator\ShippingSubjectInterface $subject ) : Doctrine\Common\Collections\Collection
$subject WellCommerce\Bundle\ShippingBundle\Calculator\ShippingSubjectInterface
Résultat Doctrine\Common\Collections\Collection
    public function getCosts(ShippingSubjectInterface $subject) : Collection;

Usage Example

 /**
  * {@inheritdoc}
  */
 public function getProductDefaultTemplateData(ProductInterface $product) : array
 {
     $shippingMethodCosts = $this->shippingMethodProvider->getCosts(new ProductContext($product));
     $variants = $this->variantHelper->getVariants($product);
     $attributes = $this->variantHelper->getAttributes($product);
     return ['product' => $product, 'shippingCosts' => $shippingMethodCosts, 'variants' => json_encode($variants), 'attributes' => $attributes];
 }
All Usage Examples Of WellCommerce\Bundle\ShippingBundle\Provider\ShippingMethodProviderInterface::getCosts
ShippingMethodProviderInterface