Ejemplo n.º 1
0
 private function IsBorrowable(UserBook $userBook)
 {
     // test if user owns the book
     if (!$userBook->getIsOwned()) {
         return false;
     }
     // test if books is not lent
     $activeLending = $userBook->getActiveLending();
     if ($activeLending) {
         return false;
     }
     return true;
 }
 public function getActiveLending()
 {
     $this->__load();
     return parent::getActiveLending();
 }