Beispiel #1
0
 /**
  * @param Entity_Tree $tree
  * @param Entity_Block $block
  * @return bool
  */
 public function updateBlock($tree, $block)
 {
     $old = new Entity_Tree();
     $old->init($this->treeDAO->getOne($tree->getId()));
     $link = rtrim($old->getLink(), $old->getName()) . $tree->getName();
     $tree->setLink($link);
     $block->setId($old->getTypeId());
     return $this->blockDAO->update($block) && $this->treeDAO->updateTree($tree);
 }
Beispiel #2
0
 public function getBlocks($id)
 {
     $tree = new DAO_Types_Block();
     $id = $id == '/' ? 'main' : $id;
     return $tree->getBlocksForPage($id);
 }