Elcodi\Plugin\CustomShippingBundle\Controller\Component\ShippingRangeComponentController::listComponentAction PHP Method

listComponentAction() public method

As a component, this action should not return all the html macro, but only the specific component
public listComponentAction ( Elcodi\Plugin\CustomShippingBundle\Entity\Interfaces\CarrierInterface $carrier ) : array
$carrier Elcodi\Plugin\CustomShippingBundle\Entity\Interfaces\CarrierInterface Carrier
return array Result
    public function listComponentAction(CarrierInterface $carrier)
    {
        $shippingRanges = $this->get('elcodi.repository.shipping_range')->findBy(['carrier' => $carrier]);
        return ['paginator' => $shippingRanges, 'carrier' => $carrier];
    }
ShippingRangeComponentController