/** * Set status for affected component * * @see setAffectedItemStatus() * @see setAffectedBuildStatus() * @see setAffectedEditionStatus() * * @param \thebuggenie\core\entities\Component $item The component to set status for * @param \thebuggenie\core\entities\Datatype $status The status to set * * @return boolean */ public function setAffectedComponentStatus($item, $status) { if (tables\IssueAffectsComponent::getTable()->setStatusByIssueIDandComponentID($this->getID(), $item->getID(), $status->getID())) { $this->touch(); $this->addLogEntry(tables\Log::LOG_AFF_DELETE, framework\Context::getI18n()->__("'%item_name' -> '%status_name", array('%item_name' => $item->getName(), '%status_name' => $status->getName()))); return true; } return false; }
/** * Removes an existing component from the edition * * @param \thebuggenie\core\entities\Component|integer $component */ public function removeComponent($component) { $component_id = $component instanceof \thebuggenie\core\entities\Component ? $component->getID() : $component; tables\EditionComponents::getTable()->removeEditionComponent($this->getID(), $component_id); }