Sonata\ProductBundle\Block\RecentProductsBlockService::execute PHP Метод

execute() публичный Метод

public execute ( Sonata\BlockBundle\Block\BlockContextInterface $blockContext, Response $response = null )
$blockContext Sonata\BlockBundle\Block\BlockContextInterface
$response Symfony\Component\HttpFoundation\Response
    public function execute(BlockContextInterface $blockContext, Response $response = null)
    {
        $products = $this->getProductRepository()->findLastActiveProducts($blockContext->getSetting('number'));
        $params = array('context' => $blockContext, 'settings' => $blockContext->getSettings(), 'block' => $blockContext->getBlock(), 'products' => $products, 'currency' => $this->currencyDetector->getCurrency());
        return $this->renderResponse($blockContext->getTemplate(), $params, $response);
    }