예제 #1
0
파일: User.php 프로젝트: hfiguiere/frontend
 /**
  * Returns the number of tutorials for the current page
  *
  * @return int
  */
 public function numberOfTutorials()
 {
     if (!$this->isAdmin()) {
         return 0;
     }
     $tutorial = new Tutorial();
     $unseen = $tutorial->getUnseen();
     if ($unseen === false) {
         return 0;
     }
     return count($unseen);
 }