/** * Get the count of admins * * @return int */ public function GetAdminCount() { $c = new Criteria(); $c->add(VocabularyHasUserPeer::IS_ADMIN_FOR, TRUE); $c->add(VocabularyHasUserPeer::VOCABULARY_ID, $this->getVocabularyId()); return VocabularyHasUserPeer::doCount($c); }
/** * Returns the number of related VocabularyHasUsers. * * @param Criteria $criteria * @param boolean $distinct * @param Connection $con * @throws PropelException */ public function countVocabularyHasUsers($criteria = null, $distinct = false, $con = null) { // include the Peer class include_once 'lib/model/om/BaseVocabularyHasUserPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } $criteria->add(VocabularyHasUserPeer::USER_ID, $this->getId()); return VocabularyHasUserPeer::doCount($criteria, $distinct, $con); }