<td><?php echo NagiosHostgroupPeer::doCount(new Criteria()); ?> </td> </tr> <tr class="odd"> <td><strong>Total Nagios Service Groups:</strong></td> <td><?php echo NagiosServiceGroupPeer::doCount(new Criteria()); ?> </td> </tr> <tr> <td><strong>Total Nagios Host Templates:</strong></td> <td><?php echo NagiosHostTemplatePeer::doCount(new Criteria()); ?> </td> </tr> <tr class="odd"> <td><strong>Total Nagios Service Templates:</strong></td> <td><?php echo NagiosServiceTemplatePeer::doCount(new Criteria()); ?> </td> </tr> <tr> <td><strong>Total Nagios Hosts:</strong></td> <td><?php echo NagiosHostPeer::doCount(new Criteria()); ?>
/** * Returns the number of related NagiosHostTemplate objects. * * @param Criteria $criteria * @param boolean $distinct * @param PropelPDO $con * @return int Count of related NagiosHostTemplate objects. * @throws PropelException */ public function countNagiosHostTemplatesRelatedByNotificationPeriod(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) { if ($criteria === null) { $criteria = new Criteria(NagiosTimeperiodPeer::DATABASE_NAME); } else { $criteria = clone $criteria; } if ($distinct) { $criteria->setDistinct(); } $count = null; if ($this->collNagiosHostTemplatesRelatedByNotificationPeriod === null) { if ($this->isNew()) { $count = 0; } else { $criteria->add(NagiosHostTemplatePeer::NOTIFICATION_PERIOD, $this->id); $count = NagiosHostTemplatePeer::doCount($criteria, $con); } } else { // criteria has no effect for a new object if (!$this->isNew()) { // the following code is to determine if a new query is // called for. If the criteria is the same as the last // one, just return count of the collection. $criteria->add(NagiosHostTemplatePeer::NOTIFICATION_PERIOD, $this->id); if (!isset($this->lastNagiosHostTemplateRelatedByNotificationPeriodCriteria) || !$this->lastNagiosHostTemplateRelatedByNotificationPeriodCriteria->equals($criteria)) { $count = NagiosHostTemplatePeer::doCount($criteria, $con); } else { $count = count($this->collNagiosHostTemplatesRelatedByNotificationPeriod); } } else { $count = count($this->collNagiosHostTemplatesRelatedByNotificationPeriod); } } return $count; }