Exemplo n.º 1
0
 public function setUp()
 {
     $this->pageinst = new Page();
     $this->pageinst->setName("test");
     $this->pageinst->setTitle("test");
     $this->pageinst->setPublished(true);
     $this->pageinst->setPublic(true);
     $block = new ContentBlock();
     $block->setName("testblock");
     $block->setContent("<h1>This is a block</h1>");
     $block->setBlockStyle(new CenteredBlockStyle());
     $pageBlock = new PageBlock();
     $pageBlock->setBlock($block);
     $pageBlock->setBlockOrder(1);
     $this->pageinst->addPageBlock($pageBlock);
 }
Exemplo n.º 2
0
 /**
  * @param $block Block
  * @param $blockOrder int
  */
 public function addBlock($block, $blockOrder)
 {
     $pageblock = new PageBlock();
     $pageblock->setBlock($block);
     $pageblock->setBlockOrder($blockOrder);
     $this->pageBlocks->add($pageblock);
     $pageblock->setPage($this);
 }