Пример #1
0
 /**
  * @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);
 }
Пример #3
0
 /**
  * @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);
 }
Пример #5
0
 /**
  * @expectedException \LogicException
  * @expectedExceptionMessage Subblock 0 is not defined
  */
 public function testAddSubBlockDataNoSubBlockException()
 {
     $this->scrollData->setData([ScrollData::DATA_BLOCKS => [0 => [ScrollData::SUB_BLOCKS => []]]]);
     $this->scrollData->addSubBlockData(0, 0, 'html');
 }