예제 #1
0
 public function canCopyConfiguration()
 {
     if (!is_null($this->getSubjectConfiguration())) {
         return false;
     }
     if (!$this->canBeEdited()) {
         return false;
     }
     if (!$this->getSchoolYear()->getIsActive()) {
         return false;
     }
     $c = new Criteria();
     $c->add(CareerSchoolYearPeer::CAREER_ID, $this->getCareerId());
     $c->add(CareerSchoolYearPeer::SCHOOL_YEAR_ID, SchoolYearPeer::retrieveCurrent()->getId(), Criteria::NOT_EQUAL);
     return CareerSchoolYearPeer::doCount($c) != 0;
 }