summaryrefslogtreecommitdiffstats
path: root/app/class/pad.class.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/class/pad.class.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/app/class/pad.class.php b/app/class/pad.class.php
index 7c53f30..a5c771b 100644
--- a/app/class/pad.class.php
+++ b/app/class/pad.class.php
@@ -14,6 +14,7 @@
require_once "class/object.class.php";
require_once "class/agent.class.php";
+require_once "class/stage.class.php";
/*
* This class models Scrott pads. Pads are the space for projects to track
@@ -82,6 +83,27 @@ class pad extends object
$pad->issueNumb = 0;
return $pad;
}
+
+ /*
+ * Get an array of all stages under this pad. The array is in
+ * proper sequential order.
+ */
+ public function getStages() : array
+ {
+ $stage = new stage($this->stage);
+ return $stage->getArray();
+ }
+
+ /*
+ * Insert a stage object at the front of this pad's pipeline
+ */
+ public function insertStage(stage $stage) : void
+ {
+ $stage->stage = $this->stage;
+ $this->stage = $stage->guid;
+ $stage->saveObj();
+ $this->saveObj();
+ }
}
?>