/** * Checks if object is in a valid state * @access private */ function check() { parent::check(); if (empty($this->title)) { $this->throwError(1, _("Der Titel darf nicht leer sein.")); } if ($this->isTemplate() && $this->hasVoted()) { $this->throwError(2, _("Ungültiges Objekt: Bei einer Vorlage wurde abgestimmt.")); } if (!$this->isTemplate() && $this->isShared()) { $this->throwError(3, _("Ungültiges Objekt: Eine aktive Evaluation wurde freigegeben.")); } }
/** * Adds a child and sets the value to pos+1 * @access public * @param object EvaluationObject &$child The child object * @throws error */ function addChild(&$child) { parent::addChild($child); if ($child->getValue() == 0) { $child->setValue($child->getPosition() + 1); } }
/** * Adds a child * @access public * @param object EvaluationObject &$child The child object */ function addChild(&$child) { parent::addChild($child); $this->childType = $child->x_instanceof(); }
/** * Debugfunction * @access private */ function toString() { parent::toString(); echo "Anzahl der Stimmen: " . $this->getNumberOfVotes() . "<br>\n"; }