/**
  *  Handles HTTP GET /Links/GetAllFrom/ requests.
  *  Get requested ammount of graph links since specified identifier.
  *
  *  Renders array of \NetAssist\Graph\Link into JSON.
  *  @param int  $id   Identifier to start fetching from
  *  @param int  $take Ammount of links to get
  */
 public function getAllFromIdAction($id, $take)
 {
     //disable view rendering, we render JSON
     $this->view->setRenderLevel(View::LEVEL_NO_RENDER);
     $id = intval($id);
     $take = intval($take);
     //get $take links from specific identifier $id
     $links = $this->_linksRepo->GetAllByLastId($id, $take);
     //send links as JSON
     $this->sendJsonResponse($links);
 }
 /**
  *  Handles HTTP GET /Nodes/GetAllFrom/ requests.
  *  Get requested ammount of graph links since specified identifier.
  *
  *  Renders array of \NetAssist\Graph\Nodes into JSON.
  *  @param int  $id   Identifier to start fetching from
  *  @param int  $take Ammount of links to get
  */
 public function getAllFromIdAction($id, $take)
 {
     //disable view rendering, we render JSON
     $this->view->setRenderLevel(View::LEVEL_NO_RENDER);
     $id = intval($id);
     $take = intval($take);
     //get nodes from repository
     $nodes = $this->_nodesRepo->GetAllByLastId($id, $take);
     //append positions
     $nodes = $this->appendUserPositions($nodes);
     //send nodes as JSON
     $this->sendJsonResponse($nodes);
 }