Esempio n. 1
0
 public function canBeActivated()
 {
     if ($this->getIsActive()) {
         return false;
     }
     $c = new Criteria();
     $c->add(LicensePeer::PERSON_ID, $this->getPersonId());
     $c->add(LicensePeer::IS_ACTIVE, true);
     return LicensePeer::doCount($c) == 0;
 }
Esempio n. 2
0
 public function getIsInLicense()
 {
     $c = new Criteria();
     $c->add(LicensePeer::PERSON_ID, $this->getId());
     $c->add(LicensePeer::IS_ACTIVE, true);
     return LicensePeer::doCount($c) != 0;
 }