echo $locate->getCapacity() ? $locate->getCapacity() : '-'; ?> </td> <td><?php echo $locate->getLocationCategoryId() ? $locate->getLocationCategory()->toString() : '-'; ?> </td> <td><?php echo $locate->getLocationConditionId() ? $locate->getLocationCondition()->toString() : '-'; ?> </td> <td style="text-align: center;"> <?php $c = new Criteria(); $c->add(FacilityLocationPeer::LOCATION_ID, $locate->getId()); $count = FacilityLocationPeer::doCount($c); ?> <?php echo link_to_remote($count, array('url' => 'locate/listFacility?id=' . $locate->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'white')); ?> </td> </tr> <?php } ?> <?php } ?> </tbody> </table>
public function countFacilityLocations($criteria = null, $distinct = false, $con = null) { include_once 'lib/model/om/BaseFacilityLocationPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } $criteria->add(FacilityLocationPeer::FACILITY_ID, $this->getId()); return FacilityLocationPeer::doCount($criteria, $distinct, $con); }