/** * @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); }
/** * @expectedException \LogicException * @expectedExceptionMessage Block 0 is not defined */ public function testAddSubBlockException() { $this->scrollData->setData([ScrollData::DATA_BLOCKS => []]); $this->scrollData->addSubBlock(0); }