/** * @param ScrollData $scrollData * @param string $html */ protected function addCategoryBlock(ScrollData $scrollData, $html) { $blockLabel = $this->translator->trans('orob2b.catalog.product.section.catalog'); $blockId = $scrollData->addBlock($blockLabel); $subBlockId = $scrollData->addSubBlock($blockId); $scrollData->addSubBlockData($blockId, $subBlockId, $html); }
/** * @param ScrollData $scrollData * @param string $html */ protected function addShoppingListBlock(ScrollData $scrollData, $html) { $blockLabel = $this->translator->trans('orob2b.shoppinglist.product.add_to_shopping_list.label'); $blockId = $scrollData->addBlock($blockLabel); $subBlockId = $scrollData->addSubBlock($blockId); $scrollData->addSubBlockData($blockId, $subBlockId, $html); }
/** * @param ScrollData $scrollData * @param string $html */ protected function addProductPricesBlock(ScrollData $scrollData, $html) { $blockLabel = $this->translator->trans('orob2b.pricing.productprice.entity_plural_label'); $blockId = $scrollData->addBlock($blockLabel); $subBlockId = $scrollData->addSubBlock($blockId); $scrollData->addSubBlockData($blockId, $subBlockId, $html); }
/** * @param ScrollData $scrollData * @param string $html */ protected function addSalesOrdersBlock(ScrollData $scrollData, $html) { $blockLabel = $this->translator->trans('orob2b.order.sales_orders.label'); $blockId = $scrollData->addBlock($blockLabel); $subBlockId = $scrollData->addSubBlock($blockId); $scrollData->addSubBlockData($blockId, $subBlockId, $html); }
/** * @param array $expected * @param string $title * @param int|null null $priority * @param string|null $class * @param bool $useSubBlockDivider * @dataProvider addBlockDataProvider */ public function testAddBlock(array $expected, $title, $priority = null, $class = null, $useSubBlockDivider = true) { $this->assertEquals(0, $this->scrollData->addBlock($title, $priority, $class, $useSubBlockDivider)); $this->assertEquals($expected, $this->scrollData->getData()); }