From 478504986a348bb53765e137a6ea8293929954aa Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sun, 9 Apr 2017 15:01:54 -0400 Subject: Add pad function insertStage() --- app/class/pad.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'app/class/pad.class.php') diff --git a/app/class/pad.class.php b/app/class/pad.class.php index 7c53f30..d062b0c 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,17 @@ class pad extends object $pad->issueNumb = 0; return $pad; } + + /* + * 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(); + } } ?> -- cgit v1.2.3 From 8a1a277c3cf747cbb82c9dcb660a925963f635a5 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Sun, 9 Apr 2017 17:48:27 -0400 Subject: Add pad function getStages() --- app/class/pad.class.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/class/pad.class.php') diff --git a/app/class/pad.class.php b/app/class/pad.class.php index d062b0c..a5c771b 100644 --- a/app/class/pad.class.php +++ b/app/class/pad.class.php @@ -84,6 +84,16 @@ class pad extends object 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 */ -- cgit v1.2.3