public function validateForUpdate($sourceObject, $propertiesToSkip = array())
 {
     if (!is_null($this->endTime)) {
         $this->validateEndTime($sourceObject->getId());
     }
     return parent::validateForUpdate($sourceObject, $propertiesToSkip);
 }
 public function validateForUpdate($sourceObject, $propertiesToSkip = array())
 {
     if ($this->parentId !== null) {
         $this->validateParentId($sourceObject->getId());
     }
     if ($this->text !== null) {
         $this->validatePropertyMaxLength("text", CuePointPeer::MAX_TEXT_LENGTH);
     }
     if (!is_null($this->startTime) || !is_null($this->endTime)) {
         $this->validateEndTime($sourceObject->getId());
     }
     return parent::validateForUpdate($sourceObject, $propertiesToSkip);
 }
 public function validateForUpdate($sourceObject, $propertiesToSkip = array())
 {
     parent::validateForUpdate($sourceObject, $propertiesToSkip);
     $dbEntry = entryPeer::retrieveByPK($this->entryId);
     $kQuiz = QuizPlugin::validateAndGetQuiz($dbEntry);
     $this->validateUserEntry();
     if (!$kQuiz->getAllowAnswerUpdate()) {
         throw new KalturaAPIException(KalturaQuizErrors::ANSWER_UPDATE_IS_NOT_ALLOWED, $sourceObject->getEntryId());
     }
 }
Example #4
0
 public function validateForUpdate($sourceObject, $propertiesToSkip = array())
 {
     /* @var $sourceObject Annotation */
     if (!$this->isNull('text')) {
         $this->validatePropertyMaxLength("text", CuePointPeer::MAX_TEXT_LENGTH);
     }
     if ($this->parentId) {
         $this->validateParentId($sourceObject->getId());
     }
     if ($this->parentId || $sourceObject->getParentId()) {
         $this->validateEndTime($sourceObject);
     }
     return parent::validateForUpdate($sourceObject, $propertiesToSkip);
 }
Example #5
0
 public function validateForUpdate($sourceObject, $propertiesToSkip = array())
 {
     $this->validateEndTime($sourceObject);
     return parent::validateForUpdate($sourceObject, $propertiesToSkip);
 }