/**
  * Returns the number of related ApiLog objects.
  *
  * @param Criteria $criteria
  * @param boolean $distinct
  * @param PropelPDO $con
  * @return int             Count of related ApiLog objects.
  * @throws PropelException
  */
 public function countApiLogs(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
 {
     $partial = $this->collApiLogsPartial && !$this->isNew();
     if (null === $this->collApiLogs || null !== $criteria || $partial) {
         if ($this->isNew() && null === $this->collApiLogs) {
             return 0;
         }
         if ($partial && !$criteria) {
             return count($this->getApiLogs());
         }
         $query = ApiLogQuery::create(null, $criteria);
         if ($distinct) {
             $query->distinct();
         }
         return $query->filterByRemoteApp($this)->count($con);
     }
     return count($this->collApiLogs);
 }
 /**
  * Shows last api-log entry
  *
  * @param $id
  *
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function lastLogAction($id)
 {
     $oLog = ApiLogQuery::create()->findOneByRemoteAppId($id);
     $oRemoteApp = RemoteAppQuery::create()->findOneById($id);
     return $this->render('SlashworksAppBundle:RemoteApp:log.html.twig', array('oLog' => $oLog, 'remote_app' => $oRemoteApp));
 }