Example #1
0
 /**
  *
  * @route("/schema/{block}",name="block_output_schema")
  * @return Response
  * @paramConverter("block", class="BlockDiagramBundle:Block")
  * @Template("BlockDiagramBundle:Output:schema.html.twig")
  */
 public function schemaAction(Block $block)
 {
     $block->setParent(null);
     $blocks = array();
     $blocks[] = $block;
     $blocks = array_merge($blocks, $block->getRecursiveChilds());
     return array('blocks' => $blocks);
 }
Example #2
0
 /**
  * get the starting Y position of the block
  * @return int
  */
 public function getAbsY()
 {
     //add the height due to the property list.
     //$offset = $this->getNativePropertiesHeight();
     if ($this->parent != null) {
         //add abs postion of the parent
         return $this->parent->getChildsAbsY() + $this->y;
     } else {
         return self::TOP_CHILD_MARGIN;
     }
 }